Welcome to JetCobot repository
2.ROS2 install Humble
2. Installing Humble in ROS2
- The ROS2-Humble installation supports Ubuntu 22.04.
- If you need to install a different version of ROS2, simply replace the humble version identifier in the installation command with the corresponding version. This applies to all other ROS-specific software in the ROS2 tutorial series and will not be covered in subsequent tutorials.
1. Set the locale
First, check whether the locale supports UTF-8 encoding. You can run the following command to check and set the UTF-8 encoding.
xxxxxxxxxxlocale # Check for UTF-8 supportsudo apt update && sudo apt install localessudo locale-gen en_US en_US.UTF-8sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8export LANG=en_US.UTF-8locale # Verify the configuration is successfulNote: The locale can be different, but must support UTF-8 encoding.
2. Set up the software source
Start the Ubuntu universe repository
xxxxxxxxxxsudo apt install software-properties-commonsudo add-apt-repository universeAdd the ROS 2 apt repository to the system and authorize our GPG key with apt.
xxxxxxxxxxsudo apt update && sudo apt install curl gnupg lsb-release -ysudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpgAdd the repository to the source list
xxxxxxxxxxecho "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null3. Install Humble
First, update the apt repository cache:
xxxxxxxxxxsudo apt UpdateThen upgrade the installed software (ROS2 packages are built on the frequently updated Ubuntu system. Please ensure your system is up to date before installing new packages):
xxxxxxxxxxsudo apt upgradeInstall the desktop version of ROS2 (recommended), which includes ROS, RViz, examples, and tutorials. The installation command is as follows. If you need to install a different version, replace "humble" in the command with the corresponding version number: