Implementing Publisher Latching, Publisher Queue Sizes & More (#152)
* Working to improve the ROS TCP connector by adding queues and latching. * Using a Unity Camera and a provided HeaderMsg, generate a corresponding CameraInfoMsg * Updating the CHANGELOG.md to include information about the CameraInfoGenerator. * Addressing feedback from the pull request. Mostly style changes. See https://github.com/Unity-Technologies/ROS-TCP-Connector/issues/133 * Simplifying the 'nextValidOutgoingMessage' logic in the ROSPublisher. Handling the SendsOutgoingMessages.SendToState when sending messages. Fixing an issue with Sending messages and Sending sys commands. Improving the clear queue logic. * Fixing a bug that would cause nextValidOutgoingMessage to be null and nextValidMessageIndex to go below -1. Caused by not decrementing nextValidMessageIndex in RemoveMessageToSend in some cases. * Implementing Latch functionality within Unity. That is, if a publisher with Latch enabled publishes something, then the Endpoint connection changes / is restarted, the publisher will republish that message to the new endpoint. * More improvements to the style. * More improvements to the style. * HUD Panel - Fixing a bug when trying to send messages from another thread. Adding a SimulationTime that can be called from any thread. Also allowing for null queue_size and latch in publishers to use defaults / ignore the values where applicable. * Updating s_RealTimeSinceStartup and s_SimulatedTimeSinceStartup in the FixedUpdate as well as the regular update. * Working to improve the ROS TCP connector by adding queues and latching. * Simplifying the 'nextValidOutgoingMessage' logic in the ROSPublisher. Handling the SendsOutgoingMessages.SendToState when sending messages. Fixing an issue with Sending messages and Sending sys commands. Improving the clear queue logic. * Fixing a bug that would cause nextValidOutgoingMessage to be null and nextValidMessageIndex to go below -1. Caused by not decrementing nextValidMessageIndex in RemoveMessageToSend in some cases. * Implementing Latch functionality within Unity. That is, if a publisher with Latch enabled publishes something, then the Endpoint connection changes / is restarted, the publisher will republish that message to the new endpoint. * HUD Panel - Fixing a bug when trying to send messages from another thread. Adding a SimulationTime that can be called from any thread. Also allowing for null queue_size and latch in publishers to use defaults / ignore the values where applicable. * Updating s_RealTimeSinceStartup and s_SimulatedTimeSinceStartup in the FixedUpdate as well as the regular update. * Completing rebase of dev and fixing TimeMsg missing import. * Adding TimeMsg import. * Improving the logic of the ROSPublisher queue to make things simpler and to slightly reduce required memory size. * Moving some of the sys command code to another class in an attempt to improve the structure of the code base a little. * Introducing a ManualResetEvent in place of the the Thread.Sleep for the writer thread so when a new message is added to the outgoing message queue the thread is woken immediately to send the message. The ManualResetEvent still maintains the sleep, but it can leave that sleep early to send new messages as they come through. * Moving the changes around Simulated time out of ROS-TCP-Connector to my local repo. The implementation is more project specific so I'm treating it as such. * Fixing styling issues with the dotnet format. * Applying changes based on feedback to pull request https://github.com/Unity-Technologies/ROS-TCP-Connector/pull/152 * Updating the CHANGELOG.md * Renaming SimpleDataSender to SysCommandSender as it better explains the use case. * Removing the Fixed Update component of the ROSConnection.cs. The ROSConnection.cs isn't actually involved in physics calculations and it was only present to have a more accurate s_RealTimeSinceStartup for the HUDPanel, which you only see during frame rendering so it wouldn't make a difference. * Fixing a bug with the message pool that would try and pool messages when MessagePoolEnabled was not enabled. Co-authored-by:Devin Miller (Unity) <mrpropellers@users.noreply.github.com>
Loading
Please register or sign in to comment