siemens / ros-sharp

ROS# is a set of open source software libraries and tools in C# for communicating with ROS from .NET applications, in particular Unity3D
Apache License 2.0
961 stars 365 forks source link

Issue with simultaneous topic/service call #395

Closed sreekanthtn closed 3 years ago

sreekanthtn commented 3 years ago

Hi,

We are using ros-sharp in a .Net WPF application to communicate to ROS where multiple topics and services are subscribed/called. When only topics are subscribed, the response is received promptly but when a service is called after this without unsubscribing the topics, it waits indefinitely and no response is received (We are not unsubscribing the topics since the data is needed continuously). But if I call only one topic and then call a service, both are getting the response. The version of RosBridgeClient.dll used is : 1.7.0.0. Is there any way to subscribe to multiple topics and services simultaneously? Any help is appreciated.

Thanks

MartinBischoff commented 3 years ago

Hi @sreekanthtn ,

I hope you made progress with this issue in the meantime? It seems to me like it is a problem in your application code the service call is blocking your mai thread. Please refer e.g. to RosSocketConsoleExample to see how you wirte a non-blocking service call.