ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

As a general rule, I would refrain from calling ros::spinOnce() in a callback (except for, perhaps, some very specific scenarios).

ros::spinOnce() will process the next message in the queue, which is why you are getting the duplication there (because the callback is now calling itself).

For more info, I'll refer you to the following roscpp tutorial.