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

Multiple subscribers to service

asked 2016-05-31 23:41:37 -0500

Rhapsodos gravatar image

Good evening,

I may have misunderstood the concept of ROS services, but is it possible to have multiple client calling for the same service?

For instance, I have a service running on a server that processes raw images and returns informations about them. Can I have a service that use those informations and another that register the output of server?

If yes, should I create a new node that publish the data, or is it possible to make the service directly speak with the database?

Thank you in advance, Julien Girard

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-06-01 02:45:01 -0500

JohnDoe2991 gravatar image

I may have misunderstood the concept of ROS services, but is it possible to have multiple client calling for the same service?

Yes, this is possible. A service-server offers a service, that any node can use. Each client sends some information to the service and gets a corresponding response. See also here for a simple example.

For instance, I have a service running on a server that processes raw images and returns informations about them. Can I have a service that use those informations and another that register the output of server?

So, if I understand correctly, you want to send some raw images to the service server and get information about them as a response? Yes, this is possible with a service server. If your server just processes the images it gets from an external non-ROS source and you want to use them in another ROS node, then it would be better to publish them as a topic.

edit flag offensive delete link more

Comments

Thank you very much for your explanation. Considering that I have nodes that uses differently inputs and outputs of this server, I will publish them on a topic.

Rhapsodos gravatar image Rhapsodos  ( 2016-06-02 03:08:54 -0500 )edit

Question Tools

Stats

Asked: 2016-05-31 23:41:37 -0500

Seen: 741 times

Last updated: Jun 02 '16