5
$\begingroup$

I have two PC in my setup. PC A [ROS Foxy] is connected to the router via Ethernet while PC B [ROS Humble] is connected to the router via WIFI.

When I run ros2 topic list on PC B, I can see all the topics from PC A however no all the topic can be echo with command ros2 topic echo. For example I had IMU and 3D LiDAR running on PC A but I can only ros2 topic echo /imu/data on PC B. If I connect the PC B to the router via Ethernet and change the interface in cycloneDDS.xml then I can echo the /points topic on PC B.

I found the following link saying about the issue was linked to the size of the message but I wrote a simple node to subscribe the topic and the callback is not triggered as well. Link: Can see topic when using ros2 topic list, but can't echo it over the network?

Some people said it might due to different DDS middleware running on both PC but I have double checked the DDS implementation on both PC and both are running cycloneDDS. Link: Can see topic when using ros2 topic list, but can't echo it over the network?

---- Update ---- And yes the CYCLONEDDS_URI has been set correctly.

PC_A

PC_A@ubuntu:~$ cat cyclonedds_config.xml
<?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>
            <DontRoute>false</DontRoute>
            <AllowMulticast>spdp</AllowMulticast>
            <NetworkInterfaceAddress>eth0</NetworkInterfaceAddress>
        </General>
        <Discovery>
            <ParticipantIndex>auto</ParticipantIndex>
            <MaxAutoParticipantIndex>100</MaxAutoParticipantIndex>
            <Peers>
                <Peer address="10.252.252.151"/>
            </Peers>
        </Discovery>
        <Internal>
            <MinimumSocketReceiveBufferSize>10MB</MinimumSocketReceiveBufferSize>
        </Internal>
        <Tracing>
            <Verbosity>config</Verbosity>
            <OutputFile>stdout</OutputFile>
        </Tracing>
    </Domain>
</CycloneDDS>

PC_B

PC_B@ubuntu:~$ cat cyclonedds_config.xml
<?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>
            <Interfaces>
                <NetworkInterface name="wlp0s20f3" multicast="true" />
            </Interfaces>
            <AllowMulticast>true</AllowMulticast>
            <MaxMessageSize>65500B</MaxMessageSize>
        </General>
        <Discovery>
            <ParticipantIndex>auto</ParticipantIndex>
            <MaxAutoParticipantIndex>100</MaxAutoParticipantIndex>
            <Peers>
                <Peer Address="10.252.252.100"/>
            </Peers>
        </Discovery>
        <Internal>
            <SocketReceiveBufferSize min="10MB"/>
            <Watermarks>
                <WhcHigh>500kB</WhcHigh>
            </Watermarks>
        </Internal>
        <Tracing>
            <Verbosity>config</Verbosity>
            <OutputFile>stdout</OutputFile>
        </Tracing>
    </Domain>
</CycloneDDS>
$\endgroup$
3
  • $\begingroup$ Welcome to Robotics, Chun Jye Beh. Are you sure the topics are being published? Can you rostopic echo those messages from PC A? $\endgroup$
    – Chuck
    Aug 4, 2023 at 13:27
  • $\begingroup$ Yes I can ros2 topic echo /points from PC A but no message appear when I echo from PC B [connect to the router via WIFI]. However if I establish the Wired connection to the router then I can ros2 topic echo /points on PC B. $\endgroup$ Aug 4, 2023 at 17:44
  • $\begingroup$ Welcome to Robotics ! Could you please share your cyclonedds xml configurations for both PC, and make sure that the environment variable CYCLONEDDS_URI is correctly set on both PC ? (i.e. points toward the .xml configuration file) $\endgroup$ Aug 6, 2023 at 9:48

1 Answer 1

2
$\begingroup$

As I cannot comment, I'll post it as an answer. I just want to suggest trying to set <Domain Id="any"> to, for example, <Domain Id="1"> for both of them, as this is, as far as I understand, how the ROS_MASTER setup is done in ROS2. Let me know if this does anything.

$\endgroup$
3
  • $\begingroup$ That is the common mistake but for my case is a bit special. I can echo some of the topics but no all of them. For example I can echo IMU data but no pointcloud data. However, when I connect the PC_B to the router via LAN cable, then I am able to echo the pointcloud data. $\endgroup$ Aug 8, 2023 at 10:02
  • $\begingroup$ There is a reported reliability issue for sending large messages over lossy links like wifi. How large are your point clouds? A relevant test might be to publish small point clouds (e.g. a few points) and see if they arrive, and gradually try larger. $\endgroup$
    – JRTG
    Aug 9, 2023 at 9:41
  • $\begingroup$ I can add additional comments about this from new experience. In our lab we noticed that some data won't go through if the computers are not on the same subnet. One of the computers was on 192.X... and the other on 10.X... and specifically pointcloud data was getting stuck. When the two PCs were set on the same subnet (10.X...), the data went through! $\endgroup$
    – sniegs
    Jan 29 at 11:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.