Description
I have installed ROS 2 Jazzy on Ubuntu 22.04.
If I just ros2 topic list
and ros2 run demo_nodes_cpp talker
on the same PC it works.
But if I want to see topics from another PC, it fails after setting the variables below:
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
export CYCLONEDDS_URI=/path/to/my/cyclonedds.xml
After exporting this, any ros2
commands fail.
ros2 run demo_nodes_cpp talker
*** buffer overflow detected ***: terminated
ros2 topic list
*** buffer overflow detected ***: terminated
Aborted (core dumped)
If I run ros2 daemon stop
I don't have any errors, but as soon as I try ros2 topic list
again I have the same error.
My cyclonedds.xml
file is as follows:
<?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>
<AllowMulticast>false</AllowMulticast>
<MaxMessageSize>6550B</MaxMessageSize>
<FragmentSize>4000B</FragmentSize>
<Transport>udp6</Transport>
</General>
<Discovery>
<Peers>
<Peer address="remote-pc"/>
<Peer address="IPV6-HUSARNET-IP-OF-REMOTE-PC"/>
<Peer address="IPV6-HUSARNET-IP-OF-LOCAL-PC"/>
<Peer address="husarnet-local"/>
<Peer address="master"/>
</Peers>
<MaxAutoParticipantIndex>100</MaxAutoParticipantIndex>
<ParticipantIndex>auto</ParticipantIndex>
</Discovery>
<Internal>
<Watermarks>
<WhcHigh>500kB</WhcHigh>
</Watermarks>
</Internal>
<Tracing>
<Verbosity>severe</Verbosity>
<OutputFile>stdout</OutputFile>
</Tracing>
</Domain>
</CycloneDDS>
It is worth mentioning that the IPV6 is obtained through Husarnet:
If I try the same thing using ROS 2 Humble, Galactic, or Iron, I don't have this problem. It only happens with Jazzy. Also, I tested RMW_IMPLEMENTATION=rmw_fastrtps_cpp
and with fastrtps I don't have this error. The problem seems to be only with Cyclone DDS.
$ export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
$ ros2 run demo_nodes_cpp talker
[INFO] [1718658361.109334174] [talker]: Publishing: 'Hello World: 1'
[INFO] [1718658362.109322134] [talker]: Publishing: 'Hello World: 2'
The problem seems to be in a method called dds_create_domain
, as we can see in the bottom of the highlighted section in the screenshot below:
Also, in the next screenshot, we can see the command line that causes the error. The screenshot is of the "Crash Error Report" tool on Ubuntu:
Does anybody have any clues on what could be the reason behind this?