ROS2 - Publishing from Windows and Subscribing to VM causing lag

asked 2017-12-08 18:57:54 -0500

rpradhan gravatar image

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!

edit retag flag offensive close merge delete

Comments

1

Which rmw impl. are you using? If it is FastRTPS you might want to give it try with OpenSplice instead.

Dirk Thomas gravatar imageDirk Thomas ( 2017-12-08 19:11:50 -0500 )edit

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.

rpradhan gravatar imagerpradhan ( 2017-12-09 21:54:08 -0500 )edit

One option would be to check the command line arguments of the daemon which is started in the background by many ros2 commands. Try ps -aux | grep _ros2_daemon (actually an equivalent cmd on Win). If this doesn't show a process you can start the daemon explicitly with ros2 daemon start.

Dirk Thomas gravatar imageDirk Thomas ( 2018-01-02 13:23:29 -0500 )edit

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 use RCL_ASSERT_RMW_ID_MATCHES)

dhood gravatar imagedhood ( 2018-02-01 13:29:49 -0500 )edit