Open nexton-winjeel opened 1 year ago
I have some time now to get the framework for this implemented, i.e. get the AHRS data and Mount drivers into AP_Periph
.
The full implementation of this, particularly mapping the existing MAVLink messages to DroneCAN messages, will require further input from the community,
Just to be more explicit here, the end goal is support "smart gimbals" on the Peripheral - one that requires a backend driver to be able to transmit the required data (eg. AHRS, ROI, etc) and calculates where to drive the camera to internally to the gimbal.
Standard "servo gimbals" can already be configured with AP_Periph and a FlightController/AP_Mount driving PWM outputs over CAN.
I've started on a DroneCAN gimbal driver here https://github.com/rmackay9/rmackay9-ardupilot/commits/mount-dronecan
Feature request
We'd like to be able to connect a gimbal to ArduPilot using DroneCAN. The primary use cases for this are to enable the use of gimbals on:
As discussed with @tridge and @rmackay9, the initial way to do this is to connect a gimbal to an AP_Periph node, and connect the AP_Periph node to the Autopilot via CAN. In order to control the gimbal from the AP_Periph node, the existing
AP_Mount
drivers need to be made available inAP_Periph
. To implement this, the following will need to be done:AP_AHRS
singleton reference fromAP_Mount
, and instead pass a smaller AHRS interface as a reference intoAP_Mount
(see #22143);AP_Periph
, create a class (e.g.AP_PeriphAHRS
) that implements the new AHRS interface, and:AP_Mount
instance inAP_Periph
;AP_PeriphAHRS
state from DroneCAN messages.AP_Mount
backend (e.g.AP_Mount_DroneCAN
) that:AP_Periph
, create a class (or extend the existing CAN handler) to:AP_Mount
;There are a number of open questions that will need to be worked through, including:
Platform [ ] All [ ] AntennaTracker [ X ] Copter [ X ] Plane [ X ] Rover [ X ] Submarine