Setting up the OpenNAO virtual machine

This step-by-step tutorial has been done using VirtualBox.

Getting the OpenNAO OS virtual machine

Download the latest release of opennao-vm-<VERSION>.ova from the Aldebaran Robotics’ User or Developer site.

Importing the OpenNAO OS virtual machine into VirtualBox

Prerequisite

Get VirtualBox on your development machine:

  • on Linux: it should be available through the package manager of the installed distribution;
  • on Windows and Mac OS:
    1. Download it from the Oracle website: https://www.virtualbox.org/wiki/Downloads
    2. Install VirtualBox.

Setting up the OpenNAO OS virtual machine in VirtualBox

Step Action

Start VirtualBox.

../../_images/01.png

If you launch a newly installed VirtualBox, then there is no existing virtual machine in the left column.

In the File menu, click on Import Appliance.

The following window is displayed:

../../_images/03.png

Browse and open the *.ova file:

../../_images/04.png

The details of the imported virtual machine will be displayed.

../../_images/05.png

Click the Import button to start the importation.

This may take few minutes, be patient:

../../_images/06.png

Congratulations! The OpenNAO OS virtual machine was successfully imported.

../../_images/08.png

Using the OpenNAO OS virtual machine

Launching the OpenNAO virtual machine

Step Action

In VirtualBox, select the OpenNAO virtual machine, then click the Start button.

It is launched in its own window:

../../_images/12.png

Here, you are in a console.

Refer to OpenNAO user account section for logins and passwords.

Accessing the OpenNAO virtual machine through ssh

By default, the host port 2222 is forwarded on the ssh port (22) of the OpenNAO virtual machine.

Thus, after launching the OpenNAO virtual machine, one can easily log in over ssh:

  • From a Linux terminal:

    ../../_images/13.png
  • From Putty:

    ../../_images/14.png

Refer to OpenNAO user account section for logins and passwords.

Exchanging data between the host and the OpenNAO virtual machine

Note

This problem is only addressed using command line tools.

Warning

All the following commands are run on the host system.

Using a Linux or Mac OS host

On UNIX hosts, use scp.

Sending data from the host to the OpenNAO virtual machine:

scp -P 2222 <source path on the host> nao@localhost:<destination path inside the virtual machine>

Retrieving data from the OpenNAO virtual machine on the host:

scp -P 2222 nao@localhost:<source path inside the virtual machine> <destination path on the host>

Using a Windows host

On Windows hosts, use pscp, a command line tool, provided within Putty.

Prerequisite

Locate the Putty installation directory, assuming it is installed in C:\Program Files\Putty

Start a command window and go to the Putty installation directory:

cd "C:\Program Files\Putty"
Sending data from the host to the OpenNAO virtual machine
pscp -P 2222 source <source path on the host> nao@localhost:<destination path inside the virtual machine>
Retrieving data from the OpenNAO virtual machine on the host
pscp -P 2222 nao@localhost:<source path inside the virtual machine> <destination path on the hos

Tweaking the OpenNAO virtual machine configuration

Warning

The OpenNAO virtual machine system does not currently include CDrom support.

Thus, installing guest additions is not possible.

Changing the network configuration

NAT configuration

By default, the OpenNAO virtual machine network configuration uses NAT.

Using this the OpenNAO virtual machine is reachable, without any knowledge about its network settings, just logging on localhost (see Accessing the OpenNAO virtual machine through ssh).

Port forwarding

The port forwarding settings are available under the menu Machine > Settings, then select the Network section (or just click Network on the right column after selecting the right virtual machine).

Expand the advanced features by clicking on Advanced:

../../_images/09.png

Open the port forwarding table:

../../_images/10.png

From here you can set any redirection you want.

Setting sub-network

It may be necessary to change the default sub-network on which the OpenNAO virtual machine is connected.

To make this change, there is no other way but command line:

VBoxManage modifyvm <virtual machine name> --natnet1 "<network>/<netmask length>"

Note

This command line must be run when the OpenNAO virtual machine is not running.

Example:

VBoxManage modifyvm opennao-vm --natnet1 "192.168.10.0/24"

Bridge configuration

If you prefer the OpenNAO virtual machine has its own IP address on the same sub-network as the host is, then you migth be interested by using the bridge network configuration.

To do so, just select Bridged Adapter in the Network configuration window:

../../_images/15.png

Then, the easiest way to know the IP address of the OpenNAO virtual machine is:

  1. Start the OpenNAO virtual machine;

  2. Logging on the OpenNAO virtual machine through the console;

  3. Run the following command:

    ifconfig eth0
    

    In the following example, the IP address of the OpenNAO virtual machine is: 10.0.253.196.

    ../../_images/16.png