Warning
This page is located in archive.

ROS virtual machine

To work with ROS without the need to install Ubuntu 14.04 onto your computer, we prepared a virtual machine image containing fully working ROS installation for you.

To run the virtual machine on your own laptop, you need to install VMWare Player (free for personal non-commercial use; try version 6.0 if you need a 32bit player for your system). You can run the virtual machine under Windows and Linux. Mac users can either find a way to run VMWare images themselves, or they can import the VMWare image in VirtualBox (not tested, but should work). Leave a message in the forum if you got it working on a Mac.

Then, download the virtual machine. Double-click the vmx file, and the machine should be running. Username: iro, password: iro2015 . If you have problems running the downloaded image, please consult the Fixing virtualization section.

Working via SSH

If you have a Linux distribution on your machine and don't mind working over Internet all the time, the easiest way may be to work over ssh.

To work remotely, you need to connect first to the classroom server (k333stu1) and then to a specific computer (e.g. e132-20). The e132-* computers are shut down at 9 p.m., whereas the classroom server runs non-stop (so you can access your home directory at any time, but ROS is not present on the classroom server).

  ssh -Y username@k333stu1.felk.cvut.cz
  ssh -Y username@e132-20 # replace 20 with your favorite number from 01 to 21

Please note that if you want to run screen, it forgets to set LD_LIBRARY_PATH, so you have to set up this variable manually inside screen.

In the ssh'd terminal, you can run even graphical commands like image_view or rviz (that's why there is the -Y option to ssh).

ROS workspace options

In the virtual machine, you have basically 3 options on how to treat the workspace folder and where to load it from. All of them are described in the following sections. To make your decision easier, here are several hints:

  1. Local workspace: you only intend to work with ROS inside the virtual machine on your laptop
  2. SSHFS (remote) workspace: you intend to work with ROS both from the virtual machine and from the lab computers
  3. Shared folder: same as local, but you also want to access the workspace files from the host system (e.g. Windows), for example because Linux doesn't support your favorite text editor

Please bear in mind that these 3 approaches can only be used exclusively and it is impossible (or difficult) to mix them together. If you find at some point in time that you need to switch to another way, just back up your workspace somewhere safe, remove ~/iro_ws and continue setting up as described further (and then restore your backed up workspace into ~/iro_ws).

Local workspace

The simplest option. Just make sure a directory ~/iro_ws exists and that's all. If you need to copy the workspace contents somewhere outside the virtual machine, you can use e.g. a USB flash drive and connect it using the VMWare player menu.

SSHFS (remote) workspace

We've prepared a script for you that mounts your K13133 home directory into the virtual machine using SSHFS. The mount appears in ~/iro_ws. Use this if you want to access your IRO workspace both from lab computers and from the virtual machine running on your laptop.

First, make sure ~/iro_ws is an empty directory on the virtual machine, and that you have your workspace files located in ~/iro_ws on the lab computer.

The only command you need to call (on the virtual machine) is

  mount-home.sh   

and then enter your username and password (the same ones you used to login to the lab machine).

You need to call this command every time you start the virtual machine (you may consider adding this command to ~/.profile to automate this).

If you set up certificate login to k333stu1.felk.cvut.cz, you'll no longer be asked for your password to mount the drive. You can further adjust the script to use your predefined username and not to ask for it every time.

In case you wanted to disconnect the remote directory, call

  umount-home.sh

Shared folder

Use these steps if you want to have access to the host system's directories (e.g. your CTU Novell home directory or your machine's home directory).

  • Run the virtual machine (e.g. double-click on the .vmx file).
  • Go to the virtual machine menu:
    • If you run in windowed mode, it is located at the top of the window.
    • If you run in fullscreen mode, move mouse cursor to the middle of the top edge of the screen and the menu appears.
  • In the virtual machine menu click Player→Manage→Virtual Machine Settings
  • Switch to Options tab
  • Click “Shared folders” in the left pane
  • Now look to the Folders pane:
    • If there is an item with name “iro_ws”, select it and click Properties.
    • If such item is not present, click Add.
  • Name has to be set to “iro_ws” (without the quotes)
  • Host path has to point to the folder you want to share with the virtual machine.
  • Click Ok several times and now you can find your shared folder in /mnt/hgfs/iro_ws.
  • Then run the following commands in a terminal window of the VM:
  cd ~                            # this changes directory to your home one
  rmdir iro_ws                    # this deletes the workspace folder (fails if nonempty!)
  ln -s /mnt/hgfs/iro_ws iro_ws   # this creates a new symbolic link that points to the shared folder

Fixing virtualization

In case VMWare refuses to run the virtual machine saying either there's no virtualization at all, or there is virtualization, but it is disabled, there are a few steps you can try.

You may have virtualization support, but it may be switched off by default. To turn it on, you have to boot into BIOS (or UEFI) (google “enter bios <my computer model>” if you don't know how to do that). In BIOS, you seek for options as “Intel VT-x”, “Virtualization technology” or “AMD-v”. You need to enable these options. Then, power off and power on your computer (restarting is not sufficient!). Start your OS and let it install updates (enabling of the virtualization may mean new updates are applicable to your system). After the updates install, again power off and power on your computer.

When you do all these steps and your platform supports virtualization, you should now have the virtual machine running.

If you had to do something else to get it working, please contact the teachers and tell us, it may help other students, too.

Virtual performance counters are incompatible with binary translation

If you see this error, that means virtualization works, but you have to change settings of the VM.

Run the VMWare player (just the player executable, do not run it by double-clicking the VM image). Then you need to disable all checkboxes on the Processor tab in the VM options. Follow the image instructions below.

I'm helpless, my CPU doesn't support virtualization

If your CPU doesn't support virtualization and you still want to develop IRO tasks on your own machine, you can try installing Ubuntu to a new partition of your drive.

Only do this if you're an experienced user (or under supervision of such friend), since this comes with the possibility of data loss from your primary OS.

If you choose to install ROS in a standalone Ubuntu OS, just install Ubuntu 14.04.1 LTS (and don't ever try to upgrade!). In Ubuntu, install ROS Indigo and SciPy. Then do some basic ROS setup and you're done!

Do not try to install ROS Indigo on Ubuntu systems other than 14.04 (neither older nor newer). They are not supported and the install will not work.

Useful links

courses/a3m33iro/ros_virtual_machine.txt · Last modified: 2015/02/17 11:05 by peckama2