Link Search Menu Expand Document

ROS Installation on VOXL 1

ROS must be installed on both the Host computer and on VOXL. This page guides you through this process.

1. Set up ROS on Host PC


You can use whichever distribution of ROS 1 on your host PC (i.e. ROS Melodic on Ubuntu 18.04). Follow the ROS wiki instructions to install ros-melodic-desktop-full:

Environment Setup Script

We will set up a script on the host pc:

me@mylaptop:~/$ touch ~/
me@mylaptop:~/$ echo ". ~/" >> ~/.bashrc

Then paste the following into your script. This is where you will edit IP addresses as necessary.


# Script loads ROS envrionment variables and sets IP addresses

# load main ros environment
if [ -f /opt/ros/melodic/setup.bash ]; then
    source /opt/ros/melodic/setup.bash
elif [ -f /opt/ros/kinetic/setup.bash ]; then
    source /opt/ros/kinetic/setup.bash
elif [ -f /opt/ros/indiego/setup.bash ]; then
    source /opt/ros/indigo/setup.bash

# if a catkin workspace is setup then make sure the launch
# files and run files are available in the ROS PATH
if [ -f ~/catkin_ws/devel/setup.bash ]; then
    source ~/catkin_ws/devel/setup.bash
if [ -f ~/catkin_ws/install/setup.bash ]; then
    source ~/catkin_ws/install/setup.bash

# ignore ROS_HOSTNAME, it only causes problems and overrides ROS_IP

# configure ROS IPs HERE
export ROS_IP=

# ROS_MASTER_URI is derived from ROS_MASTER_IP
export ROS_MASTER_URI=http://${ROS_MASTER_IP}:11311/

## bonus alias to ssh into ros master
alias sshh='sshpass -p oelinux123 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@${ROS_MASTER_IP}'

The script above provides an alias ‘sshh’ which allows you to ssh remotely into your VOXL using default credentials. Update ROS_MASTER_IP and ROS_IP to match your network configuration. On your host machine, also be sure to update ROS_MASTER_IP and ROS_IP to match this VOXL IP address.

You will need to install sshpass to use the aforementioned alias.

me@mylaptop:~/$ sudo apt install sshpass


Note: Due to SSH environment variable issues using the default terminal, we recommend that users with host Ubuntu machine versions newer than Ubuntu 14.04 use XTerm (not the default terminal) to connect to VOXL via SSH while using ROS.

2. Set up ROS on VOXL

Set up Environment Variables

VOXL ships with ROS Indigo and the voxl-utils package pre-installed. voxl-utils installs the script to /home/root/ which sources the normal /opt/ros/indigo/setup.bash script to configure the ROS environment variables. It also sets the IP address environment variables. Since everyone’s VOXL will be on a different IP address, you will need to edit this script to match the network configuration for your desired ROS master/slave configuration which will be different depending on your use case.

We recommend having the ROS Master be on VOXL. The Master IP is already set up to to match the VOXL’s default IP address when in SoftAP mode. If you have your VOXL in station mode and connected on a WiFi network you will need to change this address to match your configuration.

voxl2:/$ vi ~/


# IP Environment variables must be set after setup scripts
# Set ROS_IP & ROS_MASTER_URI appropriately for your configuration
# is default for the robot in soft access point mode
export ROS_MASTER_URI=http://localhost:11311/
export ROS_IP=

You can refresh your environment variables after updating this script by running:

voxl2:/$ exec bash

And then check that they have been updated by using the voxl-env tool or just grep’ing the bash environment variables.

voxl2:/$ voxl-env show

voxl2:/$ env | grep "ROS"

Testing ROS Configuration

To test that your ROS configuration is working, start roscore on VOXL.

Note: Currently an issue can be seen when attempting to use ROS using the native Ubuntu terminal. As a workaround XTerm can be used.

voxl2:/$ echo $SHELL
voxl2:/$ roscore

process[rosout-1]: started with pid [5706]
started core service [/rosout]

Now on your host PC use rostopic to see if it can communicate with VOXL.

me@mylaptop:~$  rostopic list

Known Issue Running ROS Through SSH

If you try to use ROS commands while SSH’d to VOXL and see errors such as this:

load_parameters: unable to set parameters (last param was [/rosdistro=indigo
]): <Fault 1: "<class 'xml.parsers.expat.ExpatError'>:not well-formed (invalid token): line 13, column 15">

The cause is a known issue with the GNOME Terminal, the default terminal emulator of Ubuntu. The solution is to use another terminal emulator such as XTerm or Konsole instead of GNOME Terminal.

More information here:

Next Steps

Now explore the VOXL MPA to ROS package.

See the building ROS nodes for VOXL for information on making your own ROS nodes.