Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EKF3: improve source switching (GPS<->NonGPS) #15859

Open
10 of 16 tasks
rmackay9 opened this issue Nov 20, 2020 · 6 comments
Open
10 of 16 tasks

EKF3: improve source switching (GPS<->NonGPS) #15859

rmackay9 opened this issue Nov 20, 2020 · 6 comments

Comments

@rmackay9
Copy link
Contributor

rmackay9 commented Nov 20, 2020

This is a list of issues to improve the EKF3 source switching that was added with PR: #14803

  • support always aligning external system's heading to AHRS heading when not in use
  • extend AP_NavEKF3::getVelInnovationsAndVariancesForSource to return innovations for:
    • wheel encoders
  • add more lua scripts (like ahrs-sources.lua) to support automatic switching in more situations:
    • only GPS+T265 instead of GPS+T265+optical flow
  • investigate why Rover EKF failsafe triggers when switching to GPS sources if GPS has been disabled for some time when it wasn't being used. I.e. switch to secondary source, set GPS_TYPE = 0, set GPS_TYPE = 1, switch to primary source.

Completed Items:

Relevant wiki pages:

@diegodab
Copy link

Hello, does anyone know how to automatically switch between GPS and optical flow?

@rmackay9
Copy link
Contributor Author

rmackay9 commented Jul 19, 2021

@diegodab,

Probably best to ask these sorts of questions in the Copter-4.1 forum but in any case, adding a lua script to support automatically switching between GPS and optical flow is still on the to-do list (see "GPS + optical flow" above). The best we have at the moment is a script that handles GPS, T265 and OpticalFlow (e.g. more than you want).

@diegodab
Copy link

@rmackay9 Hi, thank you for answering. The Lua script hat handles the GNSS, T265 and optical flow reports the following error:

$lua main.lua
lua: main.lua:47: attempt to index a nil value (global 'rc')
stack traceback:
main.lua:47: in function 'update'
(...tail calls...)
[C]: in ?

Does it work even though it gives that message when executing?

@yubo105139
Copy link

Please tell me, I need to switch t265 with gps automatically . Is there any way to achieve this?

@rmackay9
Copy link
Contributor Author

@yubo105139,

Yes, on the GPS / Non-GPS Transitions page we have a link to a lua script that can do this.

@yubo105139
Copy link

@rmackay9
🙏 thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants