Welcome to RDK S600 Developer Kit repository
2.ROS2 install Jazzy
2. ROS2 Installation (Jazzy)
Note: The accompanying reference video uses the ROS Humble version, for reference only
ROS2 Jazzy corresponds to Ubuntu 24.04
To install other ROS2 versions, simply replace jazzy in the installation commands with the desired version. This applies to all ROS2 version-specific software in the ROS2 tutorial series. Subsequent tutorials will not repeat this explanation.
Yahboom image already has the basic ROS environment installed. Related packages may need to be downloaded separately
1. Setting Up Locale
Please check if your locale supports UTF-8 encoding first. Use the following commands to check and set UTF-8 encoding:
xlocale # Check UTF-8 support
sudo 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-8
locale # Verify settingsNote: The locale can be different, but it must support UTF-8 encoding.
2. Installing Jazzy
First, update the apt repository cache:
xxxxxxxxxxsudo apt updateThen upgrade installed software (ROS2 packages are built on frequently updated Ubuntu systems. Please ensure your system is up to date before installing new packages):
xxxxxxxxxxsudo apt upgradeInstall ROS2 Jazzy Desktop (recommended), which includes: ROS, RViz, examples and tutorials. The installation command is as follows. If you need to install other versions, replace "jazzy" with the corresponding version number in the command below:
xxxxxxxxxxsudo apt install ros-jazzy-desktop python3-argcompleteInstall colcon build tools:
xxxxxxxxxxsudo apt install python3-colcon-common-extensions
3. Configuring Environment
For other ROS2 versions, replace jazzy with the corresponding version identifier. For example, for Humble, replace jazzy with humble.
When running ROS2 programs in the terminal, you need to source the environment:
xxxxxxxxxxsource /opt/ros/jazzy/setup.bashYou need to execute the above command every time you open a new terminal, or you can run the following command to write the environment setup to ~/.bashrc, so you don't need to manually configure the environment each time you start a new terminal:
xxxxxxxxxxecho "source /opt/ros/jazzy/setup.bash" >> ~/.bashrcAt this point, ROS2 has been installed and configured.
4. Running Publisher and Subscriber Example Nodes
ROS2 desktop comes with pre-installed example nodes. We can test if ROS2 is installed successfully by running these example nodes.
Run the publisher node:
xxxxxxxxxxros2 run demo_nodes_cpp talkerRun the subscriber node:
xxxxxxxxxxros2 run demo_nodes_cpp listener
5. Running the TurtleSim Demo
Turtlesim is a classic teaching tool in ROS. Through turtlesim, you can quickly understand the core concepts in ROS.
Run turtlesim:
xxxxxxxxxxros2 run turtlesim turtlesim_nodeRun keyboard control node:
xxxxxxxxxxros2 run turtlesim turtle_teleop_keyView velocity topic data:
xxxxxxxxxxros2 topic echo /turtle1/cmd_vel
6. Uninstalling
After ROS2 is installed, if you want to uninstall ROS2, run the following commands:
xxxxxxxxxxsudo apt remove ~nros-jazzy-* && sudo apt autoremoveYou can also remove the ROS2 repository:
sudo rm /etc/apt/sources.list.d/ros2.listsudo apt updatesudo apt autoremove