ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Or I am supposed only to using Publisher insided the callback function such that it will publish properly??
No, you can publish anywhere else as well, except after ros::spin()
has returned.
At that point ROS has shut down, so no events (ie: incoming messages or service requests) will be processed, and neither will outgoing messages be transmitted.