Subscribe to MAVROS local position?

Dear reader,

Which ROS topic does one have to subscribe to in order to get the local position of the drone? Is it exposed at all? We want to build a simple ROS setup where we can “send” the drone to a local position with
mavros/setpoint_position/local (I guess) and simultaneously get the feedback where the drone is.

Ultimately, we want to feed an estimated local position with advanced sensors via MAVROS to the drone in order for the drone to fuse it with its EK estimator. I’m wondering whether there is a firmware version where the latter is possible all.

Cheers

@curiouswei,

I’m not an expert on ROS so I can’t say which topic to subscribe to but it will probably start with mavros.

AP will accept an external position from ROS (sent via mavros). There’s some explanation on our wiki here.

Some other places to get help:

Copter-3.6 should be capable of what you’re looking for.

@rmackay9,

Thanks for the quick reply. I thought about doing some experiments first before replying, but it apparently time flies as well.

It’s seems relatively new for ardupilot compared px4. Is it fair to state that px4 is a bit more mature regarding external localization?

Hello @curiouswei ,

Did you find an answer to your question? I am trying to implement a similar application so it would be great if you could show me how you managed it in your code. I am also using PX4. Thank you in advance!