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

Revision history [back]

click to hide/show revision 1
initial version

You can look at this tutorial to see how to create a client to call a given service. More details are available in the rospy service documentation

To call a service you need to create a service proxy. Each time you invoke that service proxy, it will send a request to the server and block until it gets a response. In your case you'll need two different service proxies, one for joint1_controller/torque_enable and one for joint2_controller/torque_enable.


rosservice is a utility to interact with services from the command line e.g.:

rosservice call [...]

This should not be used inside scripts that already have ros running.