read

This will be documentation of my process for setting up a 14.04 Ubuntu image with ROS Indigo on an ODROID device for robotics processing. This particular setup will focus on a U2 but the same procedure could be used for any system.

The Base Image

For this setup I will be using a 14.04lts server image from the odroid image repo.

For this specific example I will be using ubuntu-14.04lts-server-odroid-u-20140604.img.xz. Please note that U, U2, and U3 images are all interchangeable so there is only one image for the U series.

Use my disk image guide to image the SD card.

Initial Steps

Boot the image. Use the serial output to monitor the boot progress. Observe any errors or freezes.

At a first glance, here are some issues we will want to solve:

  • Re-compile the kernel, make a kernel for each odroid unit
  • Disable visual output (increased speed)
  • Set up the WiFi card properly.
  • Disable password signin, use SSH keys.
  • Install Robot Operating System
  • Passwords and SSH keys

Ethernet Setup & Software Update

We want to make sure we can access the internet over Ethernet as an initial step to get to full wi-fi connection.

vi /etc/network/interfaces.d/eth0  

Enter the following:

auto eth0  
iface eth0 inet dhcp  

Then start the interface:

ifup eth0  

Now perform a software upgrade:

sudo apt-get update && sudo apt-get dist-upgrade  

Root Password

It's important to have a secure root account on the device. The root account can always be accessed over serial without a password, and later we will set up the user account with access to sudo without entering a password.

The default password is odroid so it would be best to disable this entirely.

passwd -d root  

Creating the User

In this tutorial the user will be called quadlab.

adduser quadlab  

Enter a password and follow the prompts.

Locale Fix

You will need to set the locale to fix the locale errors.

sudo locale-gen en_US.UTF-8  

Accessing Sudo w/o Password

Generally when using sudo the system asks for the user's password. As a matter of convenience, we can allow users to use sudo without a password.

Edit the sudo config with visudo on the command line.

Change the line starting with %sudo to:

%sudo ALL=(ALL) NOPASSWD:ALL

Users can now use Sudo without entering a password.

Setting up WPA Card

On default the system will have the eth0 Ethernet interface configured.

To configure the WPA connection:

ifconfig -a #Find the network interface name  
vim /etc/network/interfaces.d/wlan0 #wlan0 here is a sample  

And use this template for WPA:

auto wlan0  
allow-hotplug wlan0  
iface wlan0 inet dhcp  
    wpa-ssid myssid
    wpa-psk mypassphrase

The setup for a insecure network is just to use wireless-essid instead of wpa-ssid.

Disabling the Visual Output

This process will remove the desktop window manager (which will immediately stop any visual output), and cleanup the packages that would normally run the visual display.

The elements we will remove:
- X window system - Gnome window system - LightDM/XDM/Metacity etc

Fire up aptitude and start removing anything that seems unnecessary. Make sure core packages like ubuntu-minimal, plymouth, mountall don't get removed.

sudo aptitude  

Installing ROS

You can install ROS indigo using the ArmUBUNTU guide, while Hydro will need to be installed From Source.

Use this command to compile/install:

./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --force-cmake --install-space /opt/ros/hydro/

SSH Keys

Copy your SSH keys using ssh-copy-id -i quadlab@ip.

MOSH Usage

I would recommend installing MOSH as it allows for a smooth SSH connection even on a flaky wifi connection.

On both ODROID and your laptop:

sudo apt-get install mosh  

Connect with the same syntax as ssh, except with the mosh command.

Cleaning Up Packages

You can clean up a lot of unnecessary packages with deborphan:

sudo apt-get install deborphan  
sudo deborphan --guess-data | xargs sudo apt-get -y remove --purge  
sudo deborphan | xargs sudo apt-get -y remove --purge  

Conclusion

You should now have a good setup for headless ROS. I left out quite a lot of details on the package management process (removing packages) as generally I just delete as much as possible and deal with the dependency fallout later on. Eventually you come to something stable in the end.

Christian/Paralin

Blog Logo

Christian Stewart


Published

comments powered by Disqus
Image

Christian Stewart

Also known as Quantum and Paralin.

Back to Overview