Main Content

Install and Set Up ROS Package on NVIDIA Hardware

Robotic operating system (ROS) is a collection of software libraries, tools, and frameworks for robot software development. It provides the services such as hardware abstraction, low-level device control, implementation of commonly-used functionality, message-passing between processes, and package management. ROS works alongside traditional operating systems and can run on a variety of hardware platforms.

Use the following instructions to install the ROS Melodic package on NVIDIA® embedded platforms.

Prerequisites

Install and set up the OS image, developer tools, and software packages required on NVIDIA embedded platforms. For more information, see Install and Setup Prerequisites for NVIDIA Boards.

Configure Apt Sources

On the NVIDIA board, set up the software repositories to download packages from packages.ros.org. From a Linux® terminal on the board, type:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" >
 /etc/apt/sources.list.d/ros-latest.list'

Alternatively, you can create a live hardware connection object in MATLAB® and use the openShell function to launch a Linux shell.

hwObj = jetson;
openShell(hwobj);

Set Up Apt Keys

Add the keys for the ROS package to the list of keys used by apt

to authenticate packages.

sudo apt install curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc
sudo apt-key add -

Install ROS-Base Package

Use the apt update command to download and update package information from the configured sources.

sudo apt update

Install the bare bones ROS melodic package. The bare bones package does not contain GUI tools.

sudo apt install ros-melodic-ros-base

You can also install ROS package in other configurations. For more information, see https://wiki.ros.org/melodic/Installation/Ubuntu.

Set Up ROS Environment Variables

Add the ROS environment variables to the .bashrc script file.

echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc

Related Topics