Mavsdk and ros2

Hi,

It s possible to use mavsdk inside a ros2 node?

I m trying but without success. Anytime is segment fault.

Thanks for your help.

Maybe @Benja know this?
For my own curiosity, why would you need MAVSDK inside a ROS 2 node?

Hi everyone,
I would like to retrieve the full set of mission waypoints in an easy way, similar to how MAVSDK provides this through the Mission API. With MAVSDK it’s straightforward to get the whole mission, add a waypoint, or remove one.

Using uXRCE-DDS, however, I haven’t found a way to do this: so far I can only read fmu/out/setpoint_triplet, which doesn’t give access to the full mission plan.

In addition, my final goal is to integrate MAVSDK within ROS2, so that I can convert these mission waypoints and republish them as ROS2 messages.

You can absolutely retrieve this with a ROS2 node. Im doing it a lot in the nodes I build. You dont need mavsdk necessarily either. Im assuming the nodes are running on a companion computer? And if I can ask what language are you using for implementation? Im using Golang and created a whole library that allows me to do this. All the topics are exposed via uORB as ROS topics but many of them are not exposed by default. the dds-topics.yaml file lists those exposed but you can add others as well. This one looks promising: NavigatorMissionItem (UORB message) | PX4 Guide (main)