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

Two tips:

  1. You can use any existing messages to create a service. More info on that can be found here.
  2. When you use numpy_msg, you're messages are actually going to be passed along as float32[] messages. The numpy_msg package just provides a nice way to serialize and deserialize float32[] messages directly into numpy arrays. More info on that here.

So you could have a service that, for example, takes a numpy array and int in the request, and responds with a new numpy array, that would look something like this:

int32 an_integer
float32[] input_array
---
float32[] output_array