is it possible to have simultaneous calls to a service server from a rospy ServiceProxy in multiple threads? [closed]

asked 2015-07-21 08:29:15 -0500

mgruhler gravatar image

Hi all,

I have a use-case where, depending on an external signal that I cannot control, I have to call a service in another node. The node calling the service cannot wait for the result, so I put the service calls (using the same rospy.ServiceProxy) in seperate threads.

It can thus occur, that multiple threads try to call the same service simultaneously (the ServiceServer, however, is C++). According to the this and this question, both, the C++ ServiceServer and ServiceClient are threadsafe.

However, using the rospy.ServiceProxy, i get the following exception:

transport error completing service call: unable to receive data from sender, check sender's logs for details

sometimes followed by a

service [/my_service] returned no response

I have fixed it by including respective threading.Locks. But is this the expected behaviour or should I be able to call it multiple times?

Thanks.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by mgruhler
close date 2017-11-28 01:58:52.768163