PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.2k stars 13.37k forks source link

Micro DDS namespace #19639

Closed dsix-ls2n closed 1 year ago

dsix-ls2n commented 2 years ago

Hello, I have been testing the micro XRCE-DDS on PX4-Autopilot and it is working great. However, one of the limits I have compared to the previous RTPS Bridge is that I didn't find a simple way to put the topics provided by one instance of PX4 together in a specific namespace under the form /Namespace/fmu/...

It was possible to do that on the companion computer side with the micro RTPS bridge. If I understood well, it would make more sense to do it on the PX4 side with micro ROS.

This is a problem when having several instances of PX4 on the same computer for example, as all the topics are named the same, whatever the autopilot is.

As minor issues also the name of the node is "default_xrce_participant" (but this can be easily changed) and there is no possibility to compile the micro DDS without the micro RTPS (because of one file dependency dds_topics.h).

Maybe @TSC21 can provide some answers.

Thanks a lot.

dsix-ls2n commented 2 years ago

I would gladly participate to improve this but concerning the Namespace, I would appreciate having some advice from people more specialists with micro-ROS.

bkueng commented 2 years ago

Not sure if there's a canonical way, but we can add a parameter and if set, use the system ID as topic namespace.

there is no possibility to compile the micro DDS without the micro RTPS (because of one file dependency dds_topics.h).

Correct, this will be cleaned up once we drop micro RTPS.

maxpolzin commented 2 years ago

Dear @bkueng, @dsix-ls2n and @TSC21,

I have a Pixhawk 6X and would like to connect it to my ROS2 system. As it seems, there is quite some work in progress to transition form micrortps to micro-xrce-dds.

What would be the latest method to compile the firmware for my Pixhawk 6X and connect it to my ROS2 system? I am not sure if the documentation, https://docs.px4.io/main/en/middleware/micrortps.html, is up to date with the code base.

I am aware that this issue is probably not the best place to ask this question. I am grateful if you can refer me to further resources where to get help on the subject.

dsix-ls2n commented 1 year ago

Solved with PR #20227

dev10110 commented 1 year ago

Hi, I don't understand how to do the namespace, or how #20227 solves this issue - could you provide some guidance?