ROS2 Humble Installation
ROS 2 is a next-generation open-source robotics middleware designed for building real-time, reliable, and scalable robotic systems. This wiki will demonstrate the detailed installation process of ROS 2 using Jetson as an example.
- JP5.1.2
- JP6.2
Set Locale
locale # check for UTF-8
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale # verify settings
Install Dependencies
sudo apt update && sudo apt install gnupg wget
sudo apt install software-properties-common
sudo add-apt-repository universe
Initialize Sources (Choose One Region)
# US Region
echo 'deb https://isaac.download.nvidia.com/isaac-ros/ubuntu/main focal main' | sudo tee -a /etc/apt/sources.list
# China Region
echo 'deb https://isaac.download.nvidia.cn/isaac-ros/ubuntu/main focal main' | sudo tee -a /etc/apt/sources.list
Add ROS 2 APT Repository
sudo apt update && sudo apt install curl -y \
&& sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu focal main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
Install ROS2
sudo apt update
sudo apt install ros-humble-desktop-full # Options: ros-humble-desktop-full, ros-humble-desktop, or ros-humble-ros-base
Install Additional Build Tools
sudo apt install ros-dev-tools
Initialize ROS Environment
sudo rosdep init
rosdep update
Set Up ROS Environment Variables
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
source ~/.bashrc
On the Jetson device, open a terminal and enter the following command:
sudo apt install software-properties-common -y
sudo add-apt-repository universe
sudo apt update
sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo apt update
sudo apt install ros-humble-desktop -y

To verify whether ROS2 has been successfully installed, we can create two new terminals in the device and run the following commands respectively.
# terminal1
ros2 run demo_nodes_cpp talker
# terminal2
ros2 run demo_nodes_py listener

If both terminals print out the messages, it means ROS 2 Humble has been successfully installed! 🎉
Tech Support & Product Discussion
Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.