Subscribe from service example
Hi,
lets say that I have a service that needs some additional resources which is available via topic. Is there some example how this can be implemented?
Thanks
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
The recommended way to do this is to have a subscription to the topic which stores the latest value in a persistent location. Then you can use that value in your service callback.
I'm not sure what the best practice is, but I've always used ros::topic::waitForMessage. It gets one message on the topic you specify.
Asked: 2013-01-10 21:44:23 -0600
Seen: 581 times
Last updated: Jan 11 '13