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

Revision history [back]

You could subscribe to the topic.topic (http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber(c%2B%2B)#roscpp_tutorials.2BAC8-Tutorials.2BAC8-WritingPublisherSubscriber.Writing_the_Subscriber_Node).

You could subscribe to the topic (http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber(c%2B%2B)#roscpp_tutorials.2BAC8-Tutorials.2BAC8-WritingPublisherSubscriber.Writing_the_Subscriber_Node).


EDIT

If you subscribe to the topic, the respective callback will be called every time a message is sent. If not, it will not be called. Then you can do what you want with the respective result.

You could subscribe to the topic (http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber(c%2B%2B)#roscpp_tutorials.2BAC8-Tutorials.2BAC8-WritingPublisherSubscriber.Writing_the_Subscriber_Node).


EDIT

If you subscribe to the topic, the respective callback will be called every time a message is sent. sent on this topic. If not, it will not be called. Then you can do what you want with the respective result.