Installing ROS Indigo on NXP i.MX boards

Document created by Bio_TICFSL Employee on Mar 31, 2016Last modified by Bio_TICFSL Employee on Jul 6, 2016
Version 1Show Document
  • View in full screen mode

About this document

This document describe the setup detail for Robot Operating systems on  ubuntu 14.04 running on MX6QDL based boards.

1. Software & Hardware requirements

Supported NXP HW boards:

  • i.MX 6QuadPlus SABRE-SD Board and Platform
  • i.MX 6Quad SABRE-SD Board and Platform
  • i.MX 6DualLite SABRE-SD Board
  • i.MX 6Quad SABRE-AI Board
  • i.MX 6DualLite SABRE-AI Board
  • i.MX 6SoloX SABRE-SD Board
  • i.MX 6SoloX SABRE-AI Board
  • i.MX 7D Sabre Board

 

Software:  Gcc toolchain, Ubuntu 14.04v installed on your board.

 

2. Installation

 

For install ROS on iMX boards you need to have Ubuntu 14.04 rootfs installed in your board, for installation steps please follow up:

https://community.freescale.com/docs/DOC-330147

Run your rootfs target and Configure your Ubuntu repositories to allow "restricted," "universe," and "multiverse. 

$sudo nano /etc/apt/sources.list

Your file should then look like this:

deb http://ports.ubuntu.com/ubuntu-ports/ trusty main universe multiverse restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty main universe multiverse restricted
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main universe multiverse restricted

Make your installation up to date:

$ sudo apt-get update
$ sudo apt-get upgrade

Set your locale:

$ sudo update-locale LANG=C LANGUAGE=C LC_ALL=C LC_MESSAGES=POSIX

Add ROS ARM repos & Key

$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
$ sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-key 0xB01FA116
$ sudo apt-get update

There are many different libraries and tools in ROS - not all compile fully on ARM. In this case we are going to install the ROS Base, however any other packages can be installed individually

ROS-Base: (Bare Bones) ROS package, build, and communication libraries. No GUI tools.

$ sudo apt-get install python-rosdep python-wstool build-essential cmake xserver-xorg-dev-lts-utopic mesa-common-dev-lts-utopic \
libxatracker-dev-lts-utopic libopenvg1-mesa-dev-lts-utopic libgles2-mesa-dev-lts-utopic libgles1-mesa-dev-lts-utopic\
 libgl1-mesa-dev-lts-utopic libgbm-dev-lts-utopic libegl1-mesa-dev-lts-utopic

Alternatively, try installing just this to fix dependency issues, and then install ROS base (includes ROS package, build, and communication libraries. No GUI tools.):

$ sudo apt-get install libgl1-mesa-dev-lts-utopic
$ sudo apt-get install ros-indigo-ros-base

 

Before you can use ROS, you will need to initialize rosdep. It enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS.

$ sudo rosdep init
$ rosdep update

Install rosinstall:

$ sudo apt-get install python-rosinstall

 

Verifying OS name. If you installed the Linaro ALIP rootfs, make sure your OS name defined at /etc/lsb-release is as the following. Since ros does not recognize Linaro as an OS, this is necessary.

$ lsb_release -a
You should get:
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.4 LTS
Release:        14.04
Codename:       trusty
In any case you get a different output, the following is for Ubuntu 14.04, trusty. Modify the release number and name as per your target.
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04"

3. Testing The Installation

Run ROS

$ roscore

You should get:

... logging to /root/.ros/log/1c07caa4-1dd3-11b2-b860-00049f0399fe/roslaunch- imx6q-2707.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
Started roslaunch server http://i.Mx6q:37547/
ros_comm version 1.11.16
 
SUMMARY
========
PARAMETERS
 * /rosdistro: indigo
 * /rosversion: 1.11.16
NODES
auto-starting new master
process[master]: started with pid [2718]
ROS_MASTER_URI=http://imx6q:11311/
setting /run_id to 1c07caa4-1dd3-11b2-b860-00049f0399fe
process[rosout-1]: started with pid [2731]
started core service [/rosout]

Open a new Terminal and Create the user catkin_ws Workspace. The catkin_ws workspace will contain the user packages.
$ source /opt/ros/indigo/setup.bash
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
$ catkin_init_workspace
$ cd ~/catkin_ws/
$ catkin_make

 

The  catkin_make command is a convenience tool for working with catkin_workspace. If you look in your current directory you should now have a 'build' and 'devel' folder. Inside the 'devel' folder you can see that there are now several setup.*sh files. Sourcing any of these files will overlay this workspace on top of your environment. To understand more about this see the general catkin documentation: http://wiki.ros.org/catkin

Before continuing source your new setup.*sh file:

$ source devel/setup.bash

 

To make sure your workspace is properly overlayed by the setup script, make sure ROS_PACKAGE_PATH environment variable includes the directory you're in.

$ echo $ROS_PACKAGE_PATH
/home/youruser/catkin_ws/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks

 

Next you should go ahead and learn how to use the workspace.

If you are following the ROS tutorials series instead of the catkin tutorials, please continue with Creating a ROS Package.

For more testing on your installation, you can try the ROS Tutorials (http://wiki.ros.org/ROS/Tutorials)

1 person found this helpful

Attachments

    Outcomes