Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
User Guide: Preparing for Navigation
THESE ARE NOTES IN PREPARATION. THEY EXPECT YOU TO USE INS14 WHICH IS NOT RELEASED YET
Navigation is still a feature in development and is not "plug and play". Make sure you know what you are doing, pay attention to the wiki and details in your setup, and be careful. Ask questions about anything you are unsure of.
Before getting to the steps there are a few points that everyone should know
- Navigation modes still require you to be in control. If you go into failsafe your motors will stop. This is an intentional safety feature and helps avoid any flyaways in the case of a bad configuration. DO NOT BYPASS THE FAILSAFE VERIFICATION STEP IN THE INPUT WIZARD WHEN USING NAVIGATION.
- The most important thing for getting a good position hold is a good magnetometer and calibration and a good GPS that is far enough away from other devices (e.g. VTX) to produce a stable position. PDOP is not sufficient and will sometimes lie.
- The default settings should work but they have a few unexpected defaults.
VtolPathFollower.ThrottleControldefaults to False which means in path planning and position hold you have control of throttle. Make sure to test in this mode first and make sure everything else is ok. You can test altitude control with normal AltitudeHold mode.
ManualControlSettings.ArmTimeoutAutonomousdefaults to ENABLED. That means if you are flying position hold or navigation with a low throttle for the timeout period (default 30s) your craft will disarm. This is an additional safety feature. Once everything is working and tested, you can set this to DISABLED.
You should have telemetry set up and record logs while testing. Telling us it didn't' work without logs is not helpful, unfortunately (although do please still tell us - we want to know).
What GPS should you use? We are having good success with UBlox8 and it is quite an improvement from previous ones (although perhaps more susceptible to noise in a bad configuration). A $20 GPS like this is more that sufficient.
- Make sure your frame is flying well to start with. Using Autotune is a great way to do this.
- In the attitude page, perform a 6 point calibration and save the results. Then level your quad.
- This section must be expanded Performing mag calibration from data while in flight greatly improves the accuracy
- Acquire a log while flying and yawing a lot in order to calibrate your magnetometer.
- Run that log through
StateFilter.AttitudeFilterto Complementary and
- Enable the GPS module and assign a serial port for your particular board to GPS. _Note: in order for the GPS to autoconfigure correctly, you must apply power to the flight controller first instead of USB first
- Enable the VtolPathFollower under the Modules page in Configuration.
- You no longer have to change any settings in
VtolPathFollowerto tune it - the defaults should work well. Make sure to erase these objects and use fresh values.
- Set one of your flight modes to PositionHold (and/or ReturnToHome).
- It is STRONGLY recommended to enable the GeoFence module before testing this to avoid any potential for flyaway. This will cut motors at 250 m from home in the current defaults.
- To do this, in the modules configuration page enable this module
- If you want to change the radius, do so in the Geofence tab.
Important checks, preflights, gotchas:
- Always keep throttle above minimum level while autonomous or it will automatically disarm
- Must have solid satellite lock. Dropping below 6 satellites or PDOP 3.5 will make it go to random places (android will announce a GPS warning and attitude error when this occurs).
- Absolutely must be in INSOutdoor mode. You can easily have fly away or really bad flight otherwise and currently no alarms block this. #453
- To get a good altitude hold, make sure your accelerometers are well calibrated. It should be quite close to 9.81 when sitting flat. Using the level and zero button will help with this.
- It is RTH not RTL so always remember to set HomeLocation where you want to return to. I recommend not saving the HomeLocation for autonomous testing. Then it will grab the value when it gets the first good lock. Depending on balance of baro and GPS altitude home may not be at altitude zero so when it flies home it might hit the ground! This needs work. Use android to see what your home altitude is before taking off - it should be close to 0. Android will also allow resetting just the altitude if desired.
- Check your
VelocityActual.Downdown before flying. The z-accel bias seems to cause errors in this which means you won't get a good enough vertical velocity estimate. It should be close to zero. INS14 attempts to correct for this, but only so much.
- Verify tablet info is updating before using any of those modes #456
Enabling position hold:
- Set one of your flight mode position switches to PositionHold
- Make sure these modules are running: VtolPathFollower, GPS
- Fly, get the system hovering nicely, and enable PH mode
- If that works well set
VtolPathFollower.ThrottleControlto TRUE and repeat
- Set one of your flight mode positions to_PositionHold_
- Make sure these modules are running: VtolPathFollower, Geofence, GPS
- Fly, get the system hovering nicely, and enable RTH mode. Expect it to hover in place for 10 seconds, climb to 15 m (if below that), and then proceed to fly home. Once over home it will hover for 10 seconds, and then descend at 0.5 m/s.