Configuring ROS 2 DDS/Zenoh and ROS_DOMAIN_ID
Let’s start by configuring DDS for your ROS 2 installation. So, you may ask why we need to change DDS rather than using the default one. The answer is each DDS is different. Some DDS implementations work best for some applications. So, to get better results, it is better to change the DDS.
Let’s explore how to change the DDS of your ROS 2 installation.
Configuring ROS 2 DDS
Setting a new DDS is straightforward. First, select the DDS you want to use in a robot, and then install the DDS implementation packages if they are not already installed.
We will look at the installations of different DDSs here:
- Install Fast DDS: You can use the following command to install Fast DDS:
sudo apt install -y ros-jazzy-rmw-fastrtps-cpp
After installing Fast DDS, you can export the RMW_IMPLEMENTATION
variable to rmw_fastrtps_cpp
. You can do this by adding the following line to the end of the...