ROS2 Galactic and Cyclone DDS with AWS machines - error in the configuration?
Hello,
I want to use two AWS EC2 machines to the ROS2 Galactic robot simulation with Gazebo.
- First machine has more memory and is faster, there I want to start multirobot simulation with Gazebo.
- Second machine is simulating a robot computer with much less computing power and less memory, with Nav2 stack and other ROS nodes for control.
To use different machines I have to use properly configured Cyclone DDS. I tried to base my configuration on this tutorial:
https://husarion.com/tutorials/other-...
But it doesn't work correctly (the whole situation is a bit weird too - description below).
I want to know why and how to fix it.
The end cyclonedds.xml
is looking like this:
<?xml version="1.0" encoding="UTF-8" ?>
<CycloneDDS xmlns="https://cdds.io/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://cdds.io/config https://raw.githubusercontent.com/eclipse-cyclonedds/cyclonedds/master/etc/cyclonedds.xsd">
<Domain id="any">
<General>
<NetworkInterfaceAddress>auto</NetworkInterfaceAddress>
<AllowMulticast>true</AllowMulticast>
</General>
<Discovery>
<Peers>
<Peer address="10.0.1.254"/>
<Peer address="10.0.1.148"/>
</Peers>
</Discovery>
</Domain>
</CycloneDDS>
In my ~/.bashrc
I have both export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
and export CYCLONEDDS_URI=file:///ros2_ws/src/cyclonedds/cyclonedds.xml
next to sourcing ROS2 Galaxy, nav2_ws
and ros2_ws
.
Something there isn't done correctly, because the end result I can observe is:
- after
ros2 launch nav2_bringup tb3_simulation_launch.py
Gazebo starts with RViz, I can see standard information from Nav2 launcher, except this part:
- in the next terminal where I use SSH to connect to the machine number 1) I usually cannot list any of the topics (
ros2 topic list
) or nodes (ros2 node list
); what is weird, I can see these topics and nodes on machine number 2) and only sometimes on machine number 1).
It looks like the ROS2 topics are hidden, but they are... Somwhere. Why cannot I detect them normally?
What mistakes have I made here? How can I fix them?
Relevant links I have found and tried to learn from them and solve this problems: