ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Can ros run smoothly on VM?

asked 2020-06-18 11:23:10 -0500

guilt11 gravatar image

I have a Dell Latitude 5400, the device is too new, for some reason, I have to use ubuntu14.04, there are a lot of drivers for this device is not supported, therefore, I have to use VM to install ubuntu14.04 My questions: 1. Can ROS run smoothly on VM? 2. Also, what is the recommended system configuration for VM to run ROS smoothly since I am a ROS developer and will use ROS frequently (I would like to give all my computing resources to VM when I am using VM)? 3. Can the ROS on VM connect with a real robot? Will there any compatibility problems?

I will really appreciate if anyone could answer those questions.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
2

answered 2020-06-18 12:16:51 -0500

sidfaber gravatar image

You should be able to run Ubuntu 20.04 or 18.04, on your laptop without much problem, you can find the certification details here with the hardware details.

VMWare or VirtualBox should work fine, although I've had to a VMWare extension/plugin (sorry, I forget the details) to map a USB connected arm into the virtual machine. I used the typical VMWare setup for everything else, just bump up RAM and storage as you would with any other VM. I also set up a bridged network connection so ROS could talk to other things on the network. Most of my work is in ROS 2, but never had problems working across a flat network.

If you're doing development with an Ubuntu desktop, I'd also suggest taking a look at using LXD containers instead of a full VM. Pretty easy learning curve, take a look at ROS Development with LXD for starters. Mapping the device into the container's pretty straight forward, and I've found it much easier to quickly duplicate or spin up new environments, swap between ROS 1 and ROS 2, etc., etc.

edit flag offensive delete link more

Comments

Hi, thanks for your comment, the robot I am going to develop is ubuntu14.04, that is the reason why I would like to install ubuntu14.04, if I install LXD containers, will there any compatibility problem?

guilt11 gravatar image guilt11  ( 2020-06-20 23:04:17 -0500 )edit

I haven't actually had to run 14.04 in a container but it shouldn't be a problem, the container images for 14.04 are available. sudo snap install lxd lxc launch ubuntu:14.04 myrobot lxc exec myrobot bash and you should be up and running. If you're running 18.04 or 20.04 on your host laptop, and do all your robotics work can be done in a 14.04 container or VM without any problems.

Also since 14.04 is into extended support, you might want to grab a free personal subscrition to Extended Security Maintenance so you get backported security updates.

sidfaber gravatar image sidfaber  ( 2020-06-22 07:47:44 -0500 )edit

Thank you very much for your comments, I am going to have a try to see whether it could work on my robot.

guilt11 gravatar image guilt11  ( 2020-06-22 08:59:15 -0500 )edit
1

answered 2020-07-03 11:24:06 -0500

jordan gravatar image

updated 2020-07-03 11:26:46 -0500

  1. Can ROS run smoothly on VM?

It can run very smoothly. However, if you know you are going to be doing a lot of complex work in simulation, then a virtual machine may not be for you. That said, a great deal of work can be done with a VM, and you can access many of the functions like mapping, navigation, computer vision and much more using a virtual machine.

  1. Also, what is the recommended system configuration for VM to run ROS smoothly since I am a ROS developer and will use ROS frequently (I would like to give all my computing resources to VM when I am using VM)?

Giving more resources is good, but you may want to hold some back so that other Windows apps don’t suffer when the virtual machine is running. For example, you could set:

Memory: 4GB
Processors: 3
Network Adapter: Bridged

The above would represent a good choice for a system with at least 8GB installed and 4 processors. If you've got more resources, by all means assign more to the VM, just keep a bit back for the host OS.

  1. Can the ROS on VM connect with a real robot? Will there any compatibility problems?

Yes the VM will connect to the real robot. When correctly configured, there are no compatibility issues. I have this configured with multiple versions of VM, Ubuntu (16.04, 18.04, etc.), ROS (Indigo, Melodic, Kinetic, etc.). Including different target robots (Raspberry Pi-based platforms, PC-based platforms, etc.). All different combinations work fine.

For greater detail, you could refer to: https://rhoeby.com/support/tutorials/...

edit flag offensive delete link more

Comments

1

When correctly configured, there are no compatibility issues. I have this configured with multiple versions of VM [..]

great, but I would add the nuance that anything which uses a bit higher bandwidth connection to a robot controller to perform real-time (and closed-loop) control is going to really suffer in a VM.

As there are quite a few ROS drivers which do this, it's actually not trivial to get a node running in a VM to perform sufficiently consistently.

gvdhoorn gravatar image gvdhoorn  ( 2020-07-03 11:27:15 -0500 )edit

Thank you very much for your detailed explanation. I am going to use ethernet to connect the real robot. Also, I am going to use HDMI for graphical display. Will there any compatibility problems in my case?

guilt11 gravatar image guilt11  ( 2020-07-03 12:56:06 -0500 )edit
1

Ethernet is tested and works fine. I'm not completely clear what you mean regarding the HDMI... What do you want to do with it? Graphical display of what? Using the RPi HDMI?

jordan gravatar image jordan  ( 2020-07-04 08:04:52 -0500 )edit

Hi Jordan, I am planning to use HDMI for graphical display. Because I want to show the graph generated from my VM OS on the monitor.

guilt11 gravatar image guilt11  ( 2020-07-05 08:20:50 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-06-18 11:23:10 -0500

Seen: 5,841 times

Last updated: Jul 03 '20