0
$\begingroup$

Rosanswers logo

Hi,

I have a problem when I build my package with catkin_make This is my code:

#include <ros/ros.h>
#include <moveit/move_group_interface/move_group.h>
int main(int argc, char **argv)
{
  ros::init(argc, argv, "mov_1");

  ros::AsyncSpinner spinner(1);
  spinner.start();

  move_group_interface::MoveGroup group("manipulator");
  group.setRandomTarget();
  group.move();
}

CMakeList.txt:

cmake_minimum_required(VERSION 2.8.3)
project(prueba_movimiento)

find_package(catkin REQUIRED COMPONENTS
  moveit_core
  roscpp
)
catkin_package(
  INCLUDE_DIRS include
  LIBRARIES prueba_movimiento
  CATKIN_DEPENDS moveit_core roscpp
  DEPENDS system_lib
)
include_directories(
  ${catkin_INCLUDE_DIRS}
)
add_executable(mov_1 src/mov_1.cpp)

target_link_libraries(mov_1
  moveit_move_group_interface
)

Error when I run catkin_make :

In file included from /opt/ros/hydro/include/moveit/robot_model/joint_model_group.h:41:0,
                 from /opt/ros/hydro/include/moveit/robot_model/robot_model.h:48,
                 from /opt/ros/hydro/include/moveit/robot_state/robot_state.h:41,
                 from /opt/ros/hydro/include/moveit/move_group_interface/move_group.h:40,
                 from /home/ramon/catkin_ws/src/prueba_movimiento/src/mov_1.cpp:2:
/opt/ros/hydro/include/moveit/robot_model/joint_model.h:47:26: fatal error: Eigen/Geometry: No such file or directory

How can I fix this??

Thanks.


Originally posted by rcj1986 on ROS Answers with karma: 121 on 2014-05-01

Post score: 4


Original comments

Comment by Dirk Thomas on 2014-05-01:
You should post you CMake file.

Comment by rcj1986 on 2014-05-01:
CMakeList.txt:

cmake_minimum_required(VERSION 2.8.3) project(prueba_movimiento)

find_package(catkin REQUIRED COMPONENTS moveit_core roscpp )

catkin_package(

INCLUDE_DIRS include

LIBRARIES prueba_movimiento

CATKIN_DEPENDS moveit_core roscpp

DEPENDS system_lib

)

include_directories( ${catkin_INCLUDE_DIRS} )

add_executable(mov_1 src/mov_1.cpp)

target_link_libraries(mov_1 moveit_move_group_interface )

Comment by Dirk Thomas on 2014-05-02:
Please edit your question and add your CMake there. In the comment the code is not really readable.

Comment by Dirk Thomas on 2014-05-02:
Please also add the exact error message you are getting.

Comment by Dirk Thomas on 2014-05-02:
Can you please add the following message to your CMake and post the result: message("moveit_core_INCLUDE_DIRS ${moveit_core_INCLUDE_DIRS}")

$\endgroup$

3 Answers 3

0
$\begingroup$

Rosanswers logo

Try adding these lines to your CMakeLists.txt:

find_package(Eigen REQUIRED)

include_directories(SYSTEM ${Boost_INCLUDE_DIR} ${EIGEN_INCLUDE_DIRS})

I did this after I saw the moveit pr2 tutorials by Sachin Chitta.


Originally posted by McMurdo with karma: 1247 on 2014-07-24

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$
0
$\begingroup$

Rosanswers logo

Linking CXX executable /home/ramon/catkin_ws/devel/lib/prueba_movimiento/mov_1

/usr/bin/ld: cannot find -lmoveit_move_group_interface

collect2: ld returned 1 exit status

make[2]: *** [/home/ramon/catkin_ws/devel/lib/prueba_movimiento/mov_1] Error 1

make[1]: *** [prueba_movimiento/CMakeFiles/mov_1.dir/all] Error 2

make: *** [all] Error 2

Invoking "make" failed


Originally posted by rcj1986 with karma: 121 on 2014-05-02

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by isura on 2014-05-09:
@rcj1986 please edit the original question when posting updates instead of posting an answer to your own question. Unless this was the answer to your own question.

$\endgroup$
0
$\begingroup$

Rosanswers logo

I had the same error . I solved it by adding find_package(catkin REQUIRED COMPONENTS moveit_ros_planning_interface) to my CMakeLIsts.txt file.


Originally posted by rohan with karma: 358 on 2014-07-24

This answer was NOT ACCEPTED on the original site

Post score: 9


Original comments

Comment by Burak Teke on 2017-10-25:
I've tried it and it works. I added that to my CMakeLists.txt and at the same time I added "moveit_ros_planning_interface" to my package.xml file as a dependency.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.