ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
![]() | 1 | initial version |
You have:
int main(int argc, char** argv)
{
[..]
ros::AsyncSpinner spinner(1);
spinner.start();
[..]
ros::spin();
return 0;
}
That ros::spin()
should not be used here, as AsyncSpinner
is already processing your queues (that's what the error message also tells you).
If you don't have some other blocking action in your control flow of the node, you can use ros::waitForShutdown()
.
See the comments on ros::AsyncSpinner
on the ROS wiki: roscpp/Overview/Callbacks and Spinning: Multi-threaded Spinning.