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?
Thank you!
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.
Hi, yes, the failover works in both directions and works with any position/velocity sensors. So I have a copter that switches between GPS, T265 and optical flow.
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 had one more doubt, @rmackay9 as mentioned in this doc, to use the camera heading, I have set all COMPASS_USE to 0 and EK3_SRC1_YAW 6 as instructed
but in case of a fallback, If I want to switch from external nav to GPS, and used compass for YAW, can I keep the COMPASS_USE params as 1 or will it interfere when I am using only visual navigation?
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.