Setting up Voxl2 MicroDDS Communication with PX4
-
Hello, I tried following this guide to set up Voxl2 MicroDDS Communication with PX4. After running the two commands given in the documentation:
- apt install -y voxl-microdds-agent
- voxl-configure-microdds
I don't see any uORB topics published in ROS2. I have tried using voxl-inspect-services and the micro-dds-agent is indeed running in the voxl2. Am I missing something here? Thanks!
-
I am running SDK version 1.35 on starling 2.
-
Hi @James-KDH - just to confirm have you installed ros2 foxy and the mpa-to-ros2 deb's on there as well? Those packages contain all the prebuilt ros2 messages that allow you to see the topics.
apt-get install voxl-ros2-foxy && apt-get install voxl-mpa-to-ros2
followed by
voxl-configure-mpa-to-ros2
- then please do a reboot o nthe entire system and then check the output of the dds viaros2 topic list
and if nothing is there please paste the following:systemctl status voxl-microdds-agent
and paste the output here.Thanks!
-
@Zachary-Lowell-0 Yes I have installed ros2 foxy and the mpa-to-ros2 deb. Running the command:
systemctl status voxl-microdds-agent
Gives this output:
Meanwhile running :
ros2 topic list
Still gives nothing:
-
Hello, I managed to fix this issue. Turns out the ROS domain ID needs to be 0 (by default), I set it to 1 previously and could not echo out the fmu topics. By simply setting it to 0 again i am able to see the /fmu topics now.
export ROS_DOMAIN_ID=0
However I encounter another issue where I am unable to see the /fmu out topics in an external computer but voxl2 can see topics that are being published by the computer as shown in the image below.
Also is there a way to remap the topic names ? i.e from /fmu to /drone_1.
To give some context, me and my lab is trying to experiment with indoor swarming. Thus it is essential for the drones to be able to communicate with each other (such as via ROS2).
-
Make sure these variables are set on the voxl2 and external pc:
ROS_DOMAIN_ID = 0
ROS_LOCALHOST_ONLY = 0You can check if multicast is enabled on both sides with this command (assuming external pc is linux):
ifconfig | grep -i multicast
This should show multicast enabled for the interface (wifi or ethernet) connected to the external pc via network.