My question is, can I use 3D visual odometry information (from mavros) for GPS failover instead of optical flow? @rmackay9 Could you let me know if your failover demo is available in ArduCopter 4.0?
No, I’m afraid that the failover from GPS to the IntelRealSense T265 or ZED camera will not work but it’s very high on the to-do list. I can’t say when we will get it working but the recent video you’ve linked above re the optical flow was the first step.
It does require an autopilot capable of running lua scripts which is really any autopilot with an STM32 H7 CPU which includes the Cube Orange, Holybro Durandal and some others. mRobotics, CUAV and even Mateksys all offer autopilots with this CPU.
You should use Copter-4.1.x or the upcoming 4.2 which will start beta testing next week. There are some improvements in 4.2 especially when using optical flow so I’d actually recommend using 4.2
I think you can leave COMPASS_USE as 1 if you want to use it as a fallback. The EK3_SRCx_YAW parameter values are the ones that control what sensor (compass vs camera) are used by the EKF for estimating the yaw.
For the fallback to work though you’ll want to be sure to align the camera and compass (using the “Viso Align” auxiliary switch) before takeoff otherwise the fallback could be a bit rough as the EKF will suddenly change direction and this could lead to the attitude and position controllers moving the vehicle around a bit especially if the vehicle was moving at the time of transition. I think when the EKF heading changes we don’t automatically rotate the “desired velocity”… anyway, maybe this is too much detail at this point.