[ROS TCP Connector]Timeout ros service

Hi there!

I’m building a project using ROS TCP Connector and I’m requesting a ros service.

ROSConnection.GetOrCreateInstance().SendServiceMessage<SetSceneResponse>(serviceName, request, Callback)

How do I timeout the request in case there is no response?

Hi, this isn’t something we directly support, but you could call the async version of the SendServiceMessage function with your own timeout logic. For example: c# - Asynchronously wait for Task<T> to complete with timeout - Stack Overflow

1 Like

It worked like a charm! Thank you very much Laurie!