Ask Your Question

question on one-to-many communication using rosservice

asked 2011-07-27 04:11:35 -0500

clark gravatar image

As known from the ROS documentation, message/topic is used for multi-to-multi but one-way communication, while service is recommended in case of request/reply. I suppose ros service is mainly used for one-to-one two-way transport. Then is ros service also suitable for one-to-many communication?

With a simple test program (adapted from the ros service server/client example program in tutorial), I observed that it's no problem for a single ros server to accept multiple client requests from different computers.

Then I can't help wondering that if certain variables/resources on the server side need be processed as response to client request, will a mutex be enough to make sure the shared resources can be properly handled. How does ros service handle requests in the bottom level, like queue?

thanks for the hints/advices in advance.


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-07-27 04:31:12 -0500

dornhege gravatar image

Section 4.1 on this page - the first point hints at the fact that services are handled by the normal spinning, i.e. they will be processed in order and not in parallel.

Then everything should go smooth without mutexes.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-07-27 04:11:35 -0500

Seen: 430 times

Last updated: Jul 27 '11