ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
10.9k stars 17.4k forks source link

AP_DDS - Prearm - Is Vehicle Armable DDS Interface #28286

Open tizianofiorenzani opened 2 weeks ago

tizianofiorenzani commented 2 weeks ago

AP_DDS interface to check whether vehicle is armable.

It would be helpful for a DDS interfaced companion PC to be informed when the vehicle is ready to be armed.

Proposal

Message The message field in the Trigger type is natively converted to a uint8_t message[256], which could be used for sending a string message (Vehicle is armable or Vehicle is NOT armable).

Alternatively, we could run individual tests in the AP_DDS client, where we check battery, ins, gyros... and we report what has failed in the message array, each failure associated to an enumerated uin8_t code. This solution is a stretch and might be accomplished by a dedicated health topic/service.

Platform [ x] All [ ] AntennaTracker [ ] Copter [ ] Plane [ ] Rover [ ] Submarine

Ryanf55 commented 2 weeks ago

FYI @srmainwaring if you have any opinions on how DDS should do prearm, let us know! I'm good with the trigger type.

You can get which arming checks are required with AP_Arming::get_enabled_checks(). One of the things we would really want is to get the reason you can't arm and any status messages, but I don't think there's a way to get the prearm failure messages in DDS.

tizianofiorenzani commented 2 weeks ago

but I don't think there's a way to get the prearm failure messages in DDS.

unfortunately it seems not, the only flag available (report), reports to the GCS. Running those individual tests in the AP_DDS client does not seem to be optimal, like AP::ahrs().healthy(), AP::compass().healthy().