Repository navigation
Conversation
|
Sanket will kindly test this on a desktop version of my aerial photography copter. Thanks! |
Previous review (2026-11-05)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head Optical flow is cleanly integrated, but the flow vector ignores gimbal yaw, so it needs a fix before it is safe to feed to the EKF. Blocking
Should fix
Low
Minor (4)
Withdrawn: the note that the first commit is not self-contained (no build compiles the wrapper at that commit, so bisect is unaffected). |
|
@snktshrma thanks! it would be good for this to work in SITL too if we can for testing |
|
I've lightly tested this on the bench and it does produce OPTICAL_FLOW messages and they seem correct (I think) moving right: positive X I hope to test this in the near future on a real vehicle |
8a4fbdd to
ef3669c
Compare
|
Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head The gimbal-yaw blocker from the last review is still open, so this still needs changes before flow is safe to feed to the EKF. Blocking
Should fix
Low
Question
Minor (5)
Withdrawn: the first-commit self-containment note stays withdrawn. |
|
It might be good to remove the dependency on OpenCV so that it can be run on the Siyi A8 and other camera gimbals. |
|
I test flew this on a vehicle today and it worked very well even though it was very windy out. Logs available upon request! |

This adds optical flow (KLT) into camera app for the RPi CM4 gimbal cam. The base algorithm and steps are in reference to BlueOS Optical Flow code.
Notes
Not yet tested on hardware. It builds on RPi os Bookworm and Trixie.
Tests and docs will follow in a separate commit (still completing).
The build currently depends on openCV (
libopencv-dev), so this is CM4/RPi only for now....I'm working on removing the openCV dependency, either with a dependency free C++ optical flow algo based on Birchfield's KLT tracker for AP_CameraGimbal or with the PX4-OpticalFlow SAD block matching algorithm. It will replace the openCV engine, either in this PR or in a follow-up in the next few days. That will make code compatible with other targets as well (based on what Tridge/Randy wants).
Some further cleanup is in progress.
A SITL based test in progress
Disclaimer: parts of this code were developed with the assistance of Claude : )