ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Just as an explanation: MoveGroupInterface::getCurrentPose() relies on ROS spinning being active.Hence, the spinning needs to be started before this call. The only standard way to accomplish this (without blocking) is to use an AsyncSpinner. There is no issue in using more than one thread for the asynchronous spinner - despite the fact that message processing order is not guaranteed anymore.
ros::AsyncSpinner spinner(1);
spinner.start();