ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You can have a look at existing implementations of this:
These examples should both do what you want (and given the ubiquitous use of both approaches they should work :) ).