ROS-TCP-Connector
ROS-TCP-Connector copied to clipboard
publish messages from background threads
The usage of Time.realtimeSinceStartup in RosTopicState.cs allows publishing only from the main thread. Unity throws an error when trying to access Time.realtimeSinceStartup from other threads.
m_LastMessageReceivedRealtime = Time.realtimeSinceStartup;
Possible workarounds could be
https://github.com/Unity-Technologies/ROS-TCP-Connector/commit/02c37cb53b4d370cd7dd28e7fe1671563145c0ff
m_LastMessageReceivedRealtime = ((float)DateTime.Now.Hour + ((float)DateTime.Now.Minute * 0.01f)); (works somehow, but actually this is not the realtime since startup)