Ask Your Question
2

Calling a ros service from several nodes at the same time?

asked 2011-10-13 15:00:06 -0500

gavinmachine gravatar image

updated 2012-02-27 07:35:52 -0500

kwc gravatar image

Hello,

I have a service that simply performs a task and then returns (i.e. it is not storing any data in global variables or retaining any type of state)....

The question is: Can I call the service from several nodes at the same time without having to worry about mutual exclusion issues? I.e. each time the service is called does it create a separate "instance" for each caller?

Thanks for the help!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
8

answered 2011-10-14 09:32:29 -0500

DimitriProsser gravatar image

When calling a service, the server node will handle one call at a time and queue up the rest. Therefore, it will act on them in the same order that they were received. This is the same as if you were to publish to the same topic from multiple sources simultaneously. The messages would be placed in the queue in order that they are received.

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

Stats

Asked: 2011-10-13 15:00:06 -0500

Seen: 915 times

Last updated: Oct 14 '11