ROS-TCP-Connector icon indicating copy to clipboard operation
ROS-TCP-Connector copied to clipboard

Using threads for ros service callback

Open theksg opened this issue 2 years ago • 0 comments

This is with ref to: https://github.com/Unity-Technologies/ROS-TCP-Connector/blob/c27f00c6cf750d2d0564349b3039d19aa3925e7c/com.unity.robotics.ros-tcp-connector/Runtime/TcpConnector/RosTopicState.cs#L124-L131

While creating a script for ROS 2 services in Unity, i realized that Unity uses same thread for ROS 2 service callback and for the Update function. But I wish to run service callbacks on a different thread and Update on main thread.

I am able to manually do it by changing RosState file and it is working fine.

I would like to know if it is fine to do it this way or not. If there are any issues related to threads for ROS 2 service callbacks, what they can be.

Also, are you considering updating the code for the same?

theksg avatar Jan 25 '24 05:01 theksg