Hi, I tried to publish a sensor_msgs/Image from ROS to visualize in Unity. I installed ROS-TCP-Connector and Unity Robotics Visualization packages. My image size is 480*640. When my publishing frequency is 30 Hz in ROS, the image visualized in the HUB is like slow motion, and the delay increase as time goes by. I check the time interval of each message callback function, which is around 0.06s (Not fixed frequency). So I reduce the publishing frequency to 5 Hz in ROS, then the delay problem in Unity disappears.
So I am wondering how to change the subscription frequency in Unity to enhance the performance.
I have the same issue. I have to put my image resolution to 200x200 pixels if I want to avoid increasing latency at 20Hz.
From the Unity Robotics Hub repo:
So what would be the expected subscribe time for a 1036x1698 image? 0.6 minus 0.012 seconds? (So basically 0.6 seconds) I do get about 0.6 seconds for this resolution with the TCP Connector and Endpoint, so does this mean this is an expected limitation?
In any case, shouldn’t frames be dropped if Unity can’t keep up? Why do we keep receiving the messages later on with ever increasing latency?