External Visual Odometry and GPS at the same time?

Hello everyone!

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!

1 Like

@nghiajenius,

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.

1 Like

Hi @rmackay9
in this doc both the cases are mentioned, GPS to T265 and T265 to GPS. can you please explain if we can switch both ways or not?

also, can we switch between T265 and optical flow?

@shubham-shahh,

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.

The setup is discussed here on the wiki: GPS / Non-GPS Transitions — Copter documentation

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

1 Like

Hi @rmackay9 , Thank you so much for all the info, currently I’m on 4.1.0 and will soon move to 4.2.

1 Like

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?

@shubham-shahh,

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.

1 Like

@rmackay9 Thank you so much for the detailed response. I will try to set the Viso Align through the Lua script.

1 Like

Hi @rmackay9 , When switching from T265 to GPS, how does the autopilot handle the translation drift/differences?