Hello,
When I create a move group interface in my main it builds (catkin_make) all good. However, the same thing if I have in my callBack it throws error. I have checked other posts and examples. I have added the headers correctly and hopefully my Cmakelist and package XML.
When I include: #include <moveit/move_group_interface/move_group.h> it throws warning of depreciation and for some reason doesn't work and suggests me to use this:
#include <moveit/move_group_interface/move_group_interface.h>
Using ROS Kinetic, Ubuntu 16.04.
Implementation:
static const std::string PLANNING_GROUP = "right_arm";
moveit::planning_interface::MoveGroupInterface move_group(PLANNING_GROUP);
Basically checking the tutorial here
Error:
/home/artc/catkin_ws/devel/lib/libsw_lib.so: undefined reference to `moveit::planning_interface::MoveGroupInterface::MoveGroupInterface(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::shared_ptr<tf::Transformer> const&, ros::WallDuration const&)'
/home/artc/catkin_ws/devel/lib/libsw_lib.so: undefined reference to `moveit::planning_interface::MoveGroupInterface::~MoveGroupInterface()'
collect2: error: ld returned 1 exit status
sawyer_robot/sawyer_interface/CMakeFiles/sw_node.dir/build.make:179: recipe for target '/home/artc/catkin_ws/devel/lib/sawyer_interface/sw_node' failed
make[2]: *** [/home/artc/catkin_ws/devel/lib/sawyer_interface/sw_node] Error 1
CMakeFiles/Makefile2:7765: recipe for target 'sawyer_robot/sawyer_interface/CMakeFiles/sw_node.dir/all' failed
make[1]: *** [sawyer_robot/sawyer_interface/CMakeFiles/sw_node.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2