Packaging your robotic VM with Vagrant

This is a short post on using Vagrant for packaging your Linux box, virtual or real, using Vagrant. The target configuration at this moment is the following:
  • Ubuntu 12.04 or 14.04 with 3.14.17
  • Gcc updated 4.8.1 for 12.04 or stock 4.8.2 for 14.04
  • Xenomai 2.6.4 (matching the kernel version)
  • ROS Hydro
Among them building the Kernel patched with Xenomai is the most interesting thing, but before that the stock gcc has to be upgraded to 4.8. Then the following steps are needed:
  1. Download Xenomai 2.6.4 and the Kernel 3.14.17
  2. Patch the Kernel using Xenomai
  3. Automatically configure the Kernel for real-time support
  4. Build and Install the kernel
  5. Build Xenomai native libraries
The above is performed by means of three scripts (here) interspersed by the vagrant reload command that reboots the machine as supported by the following plugin here. Note that the automatic kernel configuration is obtained by a simple Python script that removes config entries and add others. This script differs from the kernel provided bash script mainly in supporting configuration entries prefixes.

ROS Hydro is configured by another script. For the ones using Orocos, more work is instead needed for installing Orocos 2.8 with Xenomai support and it has been left as an exercise.

The Vagrantfile and configuration scripts that can be found at the related Github repository. The base Vagrant box should be a Ubuntu 12.04/14.04 x86_64 such as Official Ubuntu 12.04/14.04 daily Cloud Image amd64 from http://www.vagrantbox.es/.

For a real installation a solution is a Vagrant provider that logs into another machine with SSH and makes the /vagrant directory accessible by rsync, provided the correct Linux distribution is present.

Update: Recently I have found some Vagrant boxes pre-loaded: https://vagrantcloud.com/shadowrobot

Update: Shadow Robot has provided a build set, that will be presented at ROSCON15, comprising vagrant setup: https://github.com/shadow-robot/sr-build-tools/tree/master/vagrant 



Comments

unnikked said…
I recently discovered Vagrant and I have to say that it is a must to have tool.

Sorry but I'm not familiar with robotic environments, this vagrant box provides the tools for controlling a robot right ?

I suppose that's a silly question, please forgive me :D

Popular Posts