catkin_make target_link_libraries
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.
You should post you CMake file.
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 )
Please edit your question and add your CMake there. In the comment the code is not really readable.
Please also add the exact error message you are getting.
Can you please add the following message to your CMake and post the result: message("moveit_core_INCLUDE_DIRS ${moveit_core_INCLUDE_DIRS}")