ROS2 - Publishing from Windows and Subscribing to VM causing lag
I have a Windows 10 environment with ROS 2 installed where I am publishing an Image message. I also have a VM running (VM Workstation 14 Player - running XUbuntu 17.4) inside my Windows environment.
When I subscribe to that Image inside the VM (i.e ros2 run image_tools showimage
) there is a tremendous amount of lag/the feed is very choppy. However, when I run ros2 run image_tools showimage
directly on my Windows enviornment there is no lag. Additionally, I have tested the network connection between my VM and the Windows enviornment and it is extremely fast.
I've also tried just publishing my webcam from my Windows enviornment and it produces the same sort of error (fast on the Windows env, laggy on the VM). Therefore, I'm pretty sure it doesn't have anything to do with how my publisher is setup.
Any help would be much appreciated - thanks!
Which rmw impl. are you using? If it is FastRTPS you might want to give it try with OpenSplice instead.
I was using FastRTPS and I think I have switched it over to OpenSplice now. How can I make sure I am using the OpenSplice impl through Windows (since I've built with multiple rmw impls)? Sorry pretty new to all of this. Many thanks.
One option would be to check the command line arguments of the daemon which is started in the background by many
ros2
commands. Tryps -aux | grep _ros2_daemon
(actually an equivalent cmd on Win). If this doesn't show a process you can start the daemon explicitly withros2 daemon start
.You can use the
RMW_IMPLEMENTATION
environment variable to choose the RMW implementation used by nodes: see https://github.com/ros2/ros2/wiki/Wor... (for releases prior to ardent you should also useRCL_ASSERT_RMW_ID_MATCHES
)