GSoC 2023 wrapping up: Camera and Gimbal Enhancements


Hi everyone! It’s me, Asif Khan. I’m really happy to share with you the final work I’ve done during Google Summer of Code 2023 for project camera and gimbal enhancements.

First and foremost, I want to express my gratitude to my mentors, @rmackay9 and @peterbarker . They’ve been incredibly supportive and helpful throughout this project, and without their guidance, my work wouldn’t be where it is today.

Description:
This project aims to fix cameras and gimbals related issues, upgrading currently supported messages and adding support for new mavlink messages. Some new and exciting features are also introduced with native support in ardupilot. Here is the list of merged PR’s throughout this period with their brief descriptions.

1. Pointing gimbal at circle-centre
When in circle mode gimbal points at circle center, it is helpful in filming and various other use-cases where gimbal is needed to point at center point.

2. Following another vehicle
It adds support for mount following the lead vehicle (lead SysID) when the vehicle equipped with the mount is in follow mode.

3. Time based triggering
This adds support for taking multiple pictures seperated by some time interval that can be specified using the MAV_CMD_IMAGE_START_CAPTURE mavlink command.

4. Start/Stop Video recording when arm/disarm
CAMx_OPTIONS (bitmask) parameter when set, automatically starts video recording as soon as vehicle arms and stops when it disarms.

5. Camera logging with mount specific messages
This adds logging of the mount’s desired and actual roll, pitch and yaw angles. It is essential for the work @david_sastre and other developers are doing for custom gimbal control on GCS. The mount’s angles are logged at 10hz and also whenever a camera picture is taken. beside the logging @rmackay9 also added some fixes for different reporting issues with the drivers along with this PR.

6. GIMBAL_MANAGER_SET_ATTITUDE support
High level message to control a gimbal’s attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case.

7. Transferring support of mount poi (point of interest) from lua to c++ (WIP)
This PR adds support for sending the STATUS_FOV message to the ground station including the lat,lon,alt of the Location that the gimbal is pointing at. This does the same work as the mount_poi.lua but better and more optimised thanks to c++. So now we are having a native support of camera FOV status without depending on the lua for the same work.

8. Support for specifying which gimbal each camera is in
Previously each camera was considered to be associated with the similar ID of the gimbal (eg: x camera id with x gimbal id). This PR adds a new parameter, CAMx_MNT_INST to allow users to specify which mount the camera is in. This is useful in numerous situations including allowing the correct mount angles to be logged at the moment a picture is taken.

9. Fixing other minor bugs in gimbals and cameras (specifically SiYI Zr10)

TEST SETUP AND SPONSORS
I am very thankful to CUAV for sponsoring hardware which include 2 CUAV v6x, a SiYi zr10 and a GPS. I am also thankful to Ardupilot for providing funding for some other required hardware like battery & Charger, Radio transmitter and receiver and a s500 frame. because this project only needs testing on gimbal and camera i just created a minimal setup that can do the job. The test setup and hardware pictures are given below.



FINAL THOUGHTS
Gimbal and camera enhancement project was really diverse, it had a lot to do and still a lot can be done but this journey has been amazing. I’ve learned a lot, and I’m grateful for the support from everyone. Even though GSoC is ending, I’m excited to keep working on cool projects and learning more. Thanks to all who’ve been a part of this journey with me.

9 Likes