AP Camera Gimbal

https://raw.githubusercontent.com/ArduPilot/AP_CameraGimbal/master/assets/camera-gimbal.svg

AP Camera Gimbal is open source software that can be installed and run on these camera gimbals:

This software has most (but perhaps not all) of the same features as the manufacturer’s original software but also includes:

  • Recorded video files include the vehicle position and gimbal attitude which allows the Video Review Tool to be used to display side-by-side video and map display

  • Splat Generator allows converting the recorded video into a 3D Gaussian splat

  • Live video streaming to the Support Proxy server

How to Install

For first time installations:

  • Download the appropriate firmware for your camera gimbal from firmware.ardupilot.org

  • Follow Siyi or XFRobot firmware update instructions but use the firmware downloaded above. Each camera’s folder on firmware.ardupilot.org includes a README.md with install instructions for that camera

  • RPi CM4 users should instead follow the RPi CM4 instructions. The software is built on the Pi, MAVLink is routed from the autopilot to UDP port 16001 using Rpanion and Rpanion’s video streaming must be left stopped

Subsequent upgrades can be done using AP_CameraGimbal’s built-in firmware update web page (not available on the RPi CM4).

The camera gimbal can be reverted to the manufacturer’s original software by following the Siyi or XFRobot firmware update instructions.

Configuration

The autopilot should be physically connected following the regular Siyi or XFRobot instructions.

Set the parameters below assuming the autopilot’s Serial2 port is used and the Camera1 control instance. A serial connection can be used with the Siyi A8 mini, MT11 and ZR10 but not the XFRobot Z-1 mini (AP_CameraGimbal supports only Ethernet on this gimbal, even though the manufacturer’s software also supports serial) or the RPi CM4 (see the RPi instructions above). ZT30 serial MAVLink is untested:

Alternatively if the camera gimbal is connected to the autopilot over Ethernet:

Note

On Plane and Rover, set SCHED_LOOP_RATE to 100 or higher and reboot the autopilot, or the gimbal will not be detected (the autopilot cannot send it attitude updates at 50Hz at the default 50Hz loop rate). QuadPlane already defaults to 300.

Live Video

The video is available using the RTSP URLs shown below. These URLs assume the camera has been configured with IP address 192.168.144.25

If connected to a PC, VLC can be used to test the feed:

  • Open VLC

  • Select “Media”, “Open Network Stream” and enter the RTSP URL

../_images/siyi-a8-vlc.png

If using QGC, the live video can be configured from the “Application Settings”, “General” screen. Set “Source” to “RTSP Video Stream” and “RTSP URL” to one of the RTSP URLs listed above.

../_images/siyi-a8-qgc.png

If using Mission Planner, the live video can be displayed on the Data screen by following these instructions.

Control and Testing

See Gimbal / Mount Controls and Camera Controls for details on how to control the camera and gimbal using RC, GCS or Auto mode mission commands.