ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I've found the problem, I had to get the "locked" planning scene from a planning scene monitor to correctly initialize my robot state. Now, everything works.
Here's the relevant code :
planning_scene_monitor::PlanningSceneMonitorPtr planning_scene_monitor_ptr =
std::make_shared<planning_scene_monitor::PlanningSceneMonitor>("robot_description");
planning_scene_monitor_ptr->requestPlanningSceneState();
planning_scene_monitor::LockedPlanningSceneRO lps(planning_scene_monitor_ptr);
robot_state::RobotState robot_state(lps->getCurrentState());