ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org |
![]() | 1 | initial version |
John,
If you are calling the planner directly (not using move_arm or the planning components visualizer) you'll need to call a service that gets the planning scene to all the arm navigation components - this tutorial offers an explanation of the current system design: http://www.ros.org/wiki/arm_navigation/Tutorials/Understanding%20the%20Planning%20Scene%20architecture
A lot of the diamondback tutorials haven't been updated for this.
Just add this to the tutorial code (I can also give python if that's easier), which will get the current scene from the monitor and pass it to the components:
//above your main
static const std::string SET_PLANNING_SCENE_DIFF_NAME = "/environment_server/set_planning_scene_diff";
//in your main or some other function
ros::service::waitForService(SET_PLANNING_SCENE_DIFF_NAME);
arm_navigation_msgs::SetPlanningSceneDiff::Request planning_scene_req;
arm_navigation_msgs::SetPlanningSceneDiff::Response planning_scene_res;
if(!set_planning_scene_diff_client.call(planning_scene_req, planning_scene_res)) {
ROS_WARN("Can't get planning scene");
return;
}