You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to share information of all the available battery monitors through the DDS interface with my companion PC.
Proposed solution
Currently we share one battery instance with the topic ap/battery/battery0 of type sensor_msgs/msg/BatteryState.
A simple solution would be to use the same topic to publish all the available instances up to AP_BATT_MONITOR_MAX_INSTANCES , using the frame_id in the header to report the battery ID.
Instead of publishing for each instance in AP_BATT_MONITOR_MAX_INSTANCES, I would recommend using AP_BattMonitor::BattMonitor_State::type and publishing when the type is NOT equal to NONE. You can still iterate through the instances with AP_BATT_MONITOR_MAX_INSTANCES, but publishing battery data for batteries that aren't configured is a waste of data.
Multiple battery monitor interface to AP_DDS
I would like to share information of all the available battery monitors through the DDS interface with my companion PC.
Proposed solution
Currently we share one battery instance with the topic
ap/battery/battery0
of typesensor_msgs/msg/BatteryState
.A simple solution would be to use the same topic to publish all the available instances up to
AP_BATT_MONITOR_MAX_INSTANCES
, using theframe_id
in the header to report the battery ID.Alternatively
ap/battery/batteries
Platform
[x ] All
[ ] AntennaTracker
[ ] Copter
[ ] Plane
[ ] Rover
[ ] Submarine
The text was updated successfully, but these errors were encountered: