Open ipa-jsk opened 2 years ago
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.
Time.realtimeSinceStartup
m_LastMessageReceivedRealtime = Time.realtimeSinceStartup;
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)
m_LastMessageReceivedRealtime = ((float)DateTime.Now.Hour + ((float)DateTime.Now.Minute * 0.01f));
The usage of
Time.realtimeSinceStartup
in RosTopicState.cs allows publishing only from the main thread. Unity throws an error when trying to accessTime.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)