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.


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 From a Linux® terminal on the board, type:

sudo sh -c 'echo "deb $(lsb_release -sc) main" >

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

hwObj = jetson;

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
sudo apt-key add -

Install ROS-Base Package

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

sudo apt update

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

sudo apt install ros-melodic-ros-base

You can also install ROS package in other configurations. For more information, see

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