Read BatteryStatus through ROS 2 bridge

Hello!

I’m building a drone using the Pixhawk 4 Mini (v1.14.0 beta2) and a Raspberry Pi running ROS 2 Foxy. I managed to get it working after the very good help on my last post.

I am currently developing the ROS nodes for other sensors and controlling the drone further, but I came across an issue that there was no battery status published. I didn’t see any battery information in the topics published by the ROS 2 bridge. I would like to be able to receive the BatteryStatus uORB topic messages, but I cannot find how to include this in the published topics from the Pixhawk. Does anybody know what I need to do to be able to receive these messages?

Thank you in advance!

I have found the dds-topics.yaml reference and know I need to add a message definition through this, but it’s unclear to me how I need to do this and how I can then incorporate this into the Pixhawk.

The documentation is available here: ROS 2 User Guide | PX4 User Guide

Once you compiled PX4 with the new set of topics in the bridge you have to flash the new custom firmware in your board.

oh, please note that the documentation is synchronized with the main branch, and the microdds_client module has been renamed.