Why You Might Prefer to Run ROS in a Virtual Machine

If you are new to the world of ROS robotics, and especially if you’re relatively new to Linux, then you may face multiple steep learning curves trying to get started. Perhaps you typically run Windows as your operating system, and the prospect of “going-native” with Linux seems rather onerous, to say the least. Well the good news is, you don’t have to go that route. You can dip your toes in the waters of both Linux and ROS (or even dive right in!) by running a “virtual machine”. Whilst this requires a little effort to get up and running, it will be worth it and you can continue to use your PC much as you previously did: running Windows as your primary OS.

Of course the alternative is to switch out your OS and run Linux natively (ie. booting straight into Linux directly from power on). But that may require a substantial change in the way you work with your PC, and many of the apps you are used to working with will either have to be replaced by the Linux equivalent (and all your files somehow copied over), or you may not have access to them at all. That’s a big price to pay, and one that’s just not necessary.

Pros:
  • Keep your existing Windows-based system
  • Use your favorite Windows-based tools (eg. IDE/editor, PuTTY, CAD program)
  • Linux runs in a window on your desktop
  • If your Linux system has a problem, it does not affect your entire PC
  • Can run multiple versions of Linux and ROS
Cons:
  • Heavy use of complex environments in RViz or Gazebo may function slower

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. However, a great deal of work can be done without that, and you can access many of the functions like mapping, navigation, computer vision and much more using a virtual machine. Besides, if you do find yourself wanting to make heavy use of simulation, well you can always switch over later.

Note: All our robots work with any PC (as well as a phone, tablet or joystick), regardless of whether it runs a virtual machine, or not.