cyclone DDS is not allowing multimachine discovery of nodes in ROS2 Humble
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 RMWIMPLEMENTATION=rmwcyclonedds_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 ROSDOMAINID=1 in both computers but not working.
I also tried export CYCLONEDDSURI = pathto_file/cyclonedds.xml but no result.
Any suggestions? Please help.
Asked by vimalgrace on 2023-07-25 11:54:43 UTC
Answers
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.
Asked by vimalgrace on 2023-08-01 23:02:26 UTC
Comments
Hey couple of things that may help.
ros2 multicast send
andros2 multicast receive
Asked by Sebastian-Schroder on 2023-07-30 23:56:10 UTC