ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

cyclone DDS is not allowing multimachine discovery of nodes in ROS2 Humble

asked 2023-07-25 11:57:26 -0500

vimalgrace gravatar image

Hi, I am using raspberry pi 4 with ubuntu os installed. I want to do autonomous navigation of my robot.

I am using ROS2 Humble in both Raspberry pi and my computer. Yes, I am using Ubuntu 22.04 OS. For ROS2 Navigation Cyclone DDS is preferred( as per many websites), so i exported enviroment variable export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp in both raspberry pi and host.

But i cant able to see my nodes of raspberry pi in host computer. I also tried, export ROS_DOMAIN_ID=1 in both computers but not working.

I also tried export CYCLONEDDS_URI = path_to_file/cyclonedds.xml but no result.

Any suggestions? Please help.

edit retag flag offensive close merge delete

Comments

Hey couple of things that may help.

  1. ensure that you can ping from 1 device to the other.
  2. check if you can receive ros2 multicast packets via ros2 multicast send and ros2 multicast receive
  3. there might be some issue with your cyclonedds xml file so if you could edit your post with the entirety of that file, that would be helpful.
  4. if its a simple issue its probably that they're unable to discover each other, if you're able to ping the rp4 then you can manually set the Discovery/Peers/Peer address to try and resolve that.
  5. if you still struggle, maybe up the cyclonedds verbosity and post anything interesting from that here.
  6. try swapping back to fastrtps, or try out husarnet which connects via a vpn and does all the config work for you.
Sebastian-Schroder gravatar image Sebastian-Schroder  ( 2023-07-30 23:56:10 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2023-08-01 23:02:26 -0500

vimalgrace gravatar image

updated 2023-08-01 23:09:25 -0500

Solution I got:

Create a file named cyclonedds.xml in your present working directory. Add the following lines in file.

This is for Host Computer:

<CycloneDDS>

 <Domain>

 <General>

  <NetworkInterfaceAddress>wlo1</NetworkInterfaceAddress>

    <DontRoute>true</DontRoute>

</General>

</Domain>

</CycloneDDS>

This is for Raspberry Pi:

<CycloneDDS>

 <Domain>

 <General>

  <NetworkInterfaceAddress>wlan0</NetworkInterfaceAddress>

    <DontRoute>true</DontRoute>

</General>

 </Domain>

</CycloneDDS>

Use iwconfig to find your NetworkInterfaceAddress for both raspberry pi and host computer.

Open .bashrc file by

gedit .bashrc

Add the following two lines somewhere else( Don’t put last)

export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
export CYCLONEDDS_URI=cyclonedds.xml

Now enter the following in terminal

ros daemon stop

source .bashrc

ros daemon start

Now everything set, you are ready to go. Do this in both raspberrypi and host computer.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2023-07-25 11:54:43 -0500

Seen: 680 times

Last updated: Aug 01 '23