Build error for planning_interface::PlannerManager
I'm trying to load a motion planner based on the the name of planning plugin loaded from the ROS param server. I'm getting the following error while building with catkin_make (using Indigo):
Linking CXX executable /homes/radu/workspace/development/fetch/devel/lib/mira/test
/homes/radu/workspace/development/fetch/devel/lib/libRobotArm.so: undefined reference to `typeinfo for planning_interface::PlannerManager'
The code I'm testing is this (found in the tutorials):
robot_model_loader::RobotModelLoader robot_model_loader("robot_description");
robot_model::RobotModelPtr robot_model = robot_model_loader.getModel();
planning_scene::PlanningScenePtr planning_scene(new planning_scene::PlanningScene(robot_model));
boost::scoped_ptr<pluginlib::ClassLoader<planning_interface::PlannerManager>> planner_plugin_loader;
try
{
planner_plugin_loader.reset(new pluginlib::ClassLoader<planning_interface::PlannerManager>("moveit_core", "planning_interface::PlannerManager"));
}
catch (pluginlib::PluginlibException& ex)
{
ROS_FATAL_STREAM("Exception while creating planning plugin loader " << ex.what());
}
Asked by Radu on 2018-02-14 16:57:00 UTC
Answers
You likely need to add:
find_package(
...
moveit_ros_planning_interface
)
and
catkin_package(
...
moveit_ros_planning_interface
)
to CMakeLists. Also add this to package.xml:
<depend>moveit_ros_planning_interface</depend>
Asked by AndyZe on 2021-10-15 09:26:55 UTC
Comments