2024-01-27 Pegasus + Houston Flight Test

Sections for requesting team to fill out:

  • Admin preparation

  • Test Cards / Test Plan

  • Mandatory Attendees

Sections for flight test coordinator to fill out:

  • Flightline team

  • Location

  • Status

  • Drone

Sections for flightline team to fill out:

  • EFS to fill out Card #1, #2, #3 (Opflow, Tracking Antenna, Obstacle Avoidance)

Admin Preparation

Requested By

@Anthony Luo

Sub-Team Review

(To be checked once reviewed by sub-team representative)

Mechanical
Electrical
EFS
Autonomy
Operations

Date of Request

Jan 16, 2024

Goal Summary

  • Pegasus Opflow calibration

  • Pegasus MAGFit check

  • Tracking antenna algorithm check

  • Houston Obstacle avoidance functionality check

Status?

Waiting for Sub-Team Review

Desired Airframe

Houston / Pegasus

Location + Time

WrestRC 1300-1800

Wx

https://www.windy.com/station/ad-cykf?42.541,-80.379,8 Waterloo Weather Station

image-20240125-155541.png
image-20240127-140426.png

 

Testplan - to be filled out by requesting team

Test #1: Opflow calibration

Procedure

Goals / Objectives

Knockoff criteria

  1. Inflow calibration setup

    1. Set RC6_OPTION = 158 (Optflow Calibration)

    2. Setup the EKF3 to use GPS (the default)

      1. EK3_SRC1_POSXY = 3 (GPS)

      2. EK3_SRC1_POSZ = 1 (Baro)

      3. EK3_SRC1_VELXY = 3 (GPS)

      4. EK3_SRC1_VELZ = 3 (GPS)

      5. EK3_SRC1_YAW = 1 (Compass)

      6. EK3_SRC_OPTIONS = 0 (Disable FuseAlIVelocities)

  • Obtain images of <x>

  • Verify colour calibration

  • < anything else you’re evaluating >

< list of reasons why you would want to stop the test >

  1. Setup GPS/Non-GPS transitions (to switch between GPS and Optical Flow inflight)

SET UP AND PERFORM BENCH TEST BEFORE LEAVING BAY?

  1. Ensure EKF3 is being used

    1. EK3_ENABLE = 1
      EK2_ENABLE = 0
      AHRS_EKF_TYPE = 3

  2. Ensure default setup

    1. EK3_SRC1_POSXY = 3 (Primary horizontal position from GPS)

    2. EK3_SRC1_VELXY = 3 (Primary horizontal velocity from GPS)

    3. EK3_SRC1_POSZ = 1 (Primary vertical position from barometer)

    4. EK3_SRC1_VELZ = 3 (Primary vertical velocity from GPS)

    5. EK3_SRC1_YAW = 1 (Primary yaw/heading from compass)

    6. SECONDARY SENSOR SOURCE????

    7. EK3_SRC2_ POSXY = 6 (Secondary horizontal position from External Nav)

    8. EK3_SRC2_VELXY = 6 (Secondary horizontal velocity from External Nav)

    9. EK3_SRC2_POSZ = 1 (Secondary vertical position from barometer)

    10. EK3_SRC2_VELZ = 6 (Secondary vertical velocity from External Nav)

    11. EK3_SRC2_YAW = 6 (Secondary yaw/heading from External Nav)

    12. Ensure the fusing of all velocities are disabled by unchecking the EK3_SRC_OPTIONS parameter's "FuseAlIVelocities" bit:

  3. BENCH TEST (use the auxiliary switch to manually switch between sources)

    1. Connect with a ground station

    2. After switching modes, confirm status via Data Screen messages tab → should be a message

    3. Wait 10 seconds to confirm that EKF stays healthy

      1. EKF label on the HUD should remain white in Mission Planner

    4. Check the vehicle's horizontal position, altitude and heading using the ground station. (what to look for?)

 

  1. Hover in Loiter mode (>10m)

 

< etc >

  1. Begin opflow calibration

    1. Pull the auxiliary switch high to start the calibration

    2. Rock the vehicle back and forth in both roll and pitch

  • Check the GCS "Messages" tab for output confirming the calibration is complete

  • FLOW_FXSCALAR and FLOW_FYSCALAR values between -200 to +200 is good

    • FlowCal: Started FlowCal: x:0% y:0% FlowCal: x:66% y:6% FlowCal: x:100% y:74% FlowCal: samples collected FlowCal: scalarx:0.976 fit: 0.10 <-- lower "fit" values are better FlowCal: scalary:0.858 fit: 0.04 FlowCal: FLOW_FXSCALER=30.00000, FLOW_FYSCALER=171.0000

 

  1. Use Opflow (Land if GPS/Non-GPS transitions not set up)

If GPS/Non-GPS transitions not set up:

  1. Land the vehicle and setup the EKF3 to use OpticalFlow

    1. EK3_SRC1_POSXY = 0 (None)

    2. EK3_SRC1_VELXY = 5 (Optical Flow)

    3. EK3_SRC1_POSZ = 1 (Baro)

    4. EK3_SRC1_VELZ = 0 (None)

    5. EK3_SRC1_YAW = 1 (Compass)

    6. EK3_SRC_OPTIONS = 0 (Disable FuseAlIVelocities)

  2. Fly the vehicle again to check performance

    1. What are we looking for and what mode?

If GPS/Non-GPS transitions are set up:

  1. SET UP BELOW PARAMETERS PRIOR TO INITIAL TAKEOFF?

    1. RC6_OPTION = 158 (Optflow Calibration)

    2. RC7_OPTION = 90 (EKF Pos Source) low is GPS, middle is OpticalFlow, high is unused

    3. EK3_SRC1_POSXY = 3 (GPS)

    4. EK3_SRC1_POSZ = 1 (Baro)

    5. EK3_SRC1_VELXY = 3 (GPS)

    6. EK3_SRC1_VELZ = 3 (GPS)

    7. EK3_SRC1_YAW = 1 (Compass)

    8. EK3_SRC2_POSXY = 0 (None)

    9. EK3_SRC2_VELXY = 5 (Optical Flow)

    10. EK3_SRC2_POSZ = 1 (Baro)

    11. EK3_SRC2_VELZ = 0 (None)

    12. EK3_SRC2_YAW = 1 (Compass)

    13. EK3_SRC_OPTIONS = 0 (Disable FuseAlIVelocities)

  2. Engage the calibration using RC input 6 (a 2-position switch) and switch between GPS and Optical.

 

 

  1. Check lidar calibration?

 

 

  1. Review test data?

 

 

 

 

 

 

Test #1: straight passes. PEGASUS or HOUSTON

Procedure

Goals / Objectives

Knockoff criteria

  1. Hover altitude 5m in loiter.

  • Verify antenna is able to point towards the drone

< list of reasons why you would want to stop the test >

  1. Translation motion:

Move in periodic squares moving away from the tracking antenna.

  • Ensure that the tracking antenna remains pointed at the drone

  • tracking antenna loses track on the drone

    • Hover in place and wait.

  1. Translation movement towards extremes of tracking antenna

  • Ensure the tracking antenna continues to function when recovering from extremes

  • Tracking antenna seizes

    • Restart tracking antenna, analyze data, and try again.

Test #1: Stab mode Lidar Verification

Procedure

Goals / Objectives

Knockoff criteria

  1. Takeoff and hover in STAB 1.5-2m AGL. Verify controls.

  • Verify pitch/roll/yaw directions are correct.

  • Verify that Gemini functionality is retained.

  • Verify that flight modes & flight time is correct.

  • Pitch/Roll/Yaw incorrect

    • land, flip in mission planner, re-start test

  • Drone de-stabilizes.

    • Land, evaluate tune, re-start test

  1. Translational movement @ slow speed towards vertical wall

  • Ensure that the proximity sensor is able to detect a wall.

  • contact with the wall

    • back-off and land. Evaluate prop health. Re-start if possible.

  • Loss of heading reference

    • back-off , re-establish, continue.

  1. Maintain desired distance from the wall while spinning heading vector 360

  • Ensure that proximity continues to track at all angles

  1. Approaches from front/side/rear ascending & descending.

  • Basic characterization of obstacle avoidance properties.

Test #2: Loit mode Obstacle Avoidance

Procedure

Goals / Objectives

Knockoff criteria

  1. Takeoff and hover in Loit mode 1.5-2m AGL. Verify controls.

  • Verify pitch/roll/yaw directions are correct.

  • Verify that Gemini functionality is retained.

  • Verify that flight modes & flight time is correct.

  • Pitch/Roll/Yaw incorrect

    • land, flip in mission planner, re-start test

  • Drone de-stabilizes.

    • Land, evaluate tune, re-start test

  1. Translational movement @ slow speed towards vertical wall

  • Ensure that the proximity sensor is able to detect a wall.

  • Ensure that the drone does not move closer nearer to the wall.

  • contact with the wall

    • back-off and land. Evaluate prop health. Re-start if possible.

  • Loss of heading reference

    • back-off , re-establish, continue.

  • Obstacle avoidance malfunction

    • Back-off, re-attempt.

    • If same behaviour, land and evaluate settings.

    • Continue test if possible

  • Loss of drone handling?

    • land if possible , dis-arm, re-attempt & slower speed.

  1. Maintain desired distance from the wall while spinning heading vector 360

  • Ensure that obstacle avoidance continues to track and function at all expected angles.

  1. Approaches from front/side/rear ascending & descending.

  • Ensure that obstacle avoidance continues to track & function at all expected angles.

Test #3: Auto Mission obstacle avoidance

Procedure

Goals / Objectives

Knockoff criteria

  1. Setup an auto mission which passes through an “obstacle”

  • Have a flight path.

  • Path doesn’t generate GG

  1. Set mission to AUTO, takeoff and fly!

  • Ensure obstacle avoidance continues to function!

  • drone does not avoid obstacle

    • Re-take control in stab. Back-away and attempt to re-start.

  • Drone de-stabilizes

    • Re-take control in stab. Back-away and attempt to re-start.

  1. Upon reaching end waypoint, RTL

  • Ensure obstacle avoidance functions in RTL

 

 

 

Test #4: Gemini Range Houston

Procedure

Goals / Objectives

Knockoff criteria

  1. Takeoff and land close range

  • Have a flight path

  • Check short range behaviour

  • Strange error

  • Gemini not work

  1. Takeoff and fly further until (1) no longer feels safe, (2) something funny happens

  • Have a flight path

  • Check long range behavior

''

 

Necessary Preparation

Mechanical

Pegasus cleared to fly (mechanically)
sensor mount ready
Motors + frame rigid
Houston cleared to fly (mechanically)
sensor mount attached
arms + plates rigid

Electrical

Pegasus cleared to fly (electrically)
harnessing secure
Houston cleared to fly

Embedded Flight Software

Autonomy

Attendees

 

Name

Phone # (opt)

Sub-team

Driving

Role

Name

Phone # (opt)

Sub-team

Driving

Role

@Anthony Luo

 

Director

Y - 5pass SUV

 

@Megan Spee

 

Director

5-person liftback

 

@Nathan Green

 

Mechanical

3-277 Dodge Grand Caravan

 

@Ryan Chan

 

Mechanical

 

 

@Sam Zhang

 

EFS

 

 

@Tim Gu

 

EFS

 

 

@Georgia Vachon Westerlund

 

Ops

 

 

@Yuchen Lin

 

EFS

 

 


Flightline Team

Name

Phone #

Role

Reason

Name

Phone #

Role

Reason

@Megan Spee

 

Pilot

PIC Houston

@Yuchen Lin

 

GSO

GSO Houston

@Anthony Luo

 

Pilot

PIC Pegasus

@Nathan Green

 

GSO

GSO Pegasus -primary

@Sam Zhang

 

GSO

GSO Pegasus -secondary

Pre-Flight Preparation

Checklists

Incident Procedures

Flight Test Timeline

Date/Time

Action

Notes

Date/Time

Action

Notes

0700

Start charging batteries

4x 6s 5000mah (pegasus)

3x 3s 4000mah (houston)

 

0800

Begin checklists

 

0900

Briefing @ WARG Bay

 

0930

Begin loading vehicles

 

1000

Arrival at Flight Test Location

 

1030

Flight Test Card #1 + 2: Opflow calib.

 

1030

Flight Test Card #3: Houston obstacle avoidance

 

1200

Packup

 

1230

Lunch

 

1300

Debrief

 

 

<>

 


DEBRIEF

Logs:

https://uofwaterloo-my.sharepoint.com/:f:/g/personal/uwarg_uwaterloo_ca/Erxhk4C9AyFKg7gImOuG8osBZL979RM3SIL3OCnDskOkNA?e=uNZ5ph

Media:

https://uofwaterloo-my.sharepoint.com/:f:/g/personal/uwarg_uwaterloo_ca/EnY_jjQ-qNxBvzZG8dXqsmcBWxHpaoz841fN5Z3HShZSRA?e=zyI504

Actual Timeline Recap

Time

Activity

Notes

Time

Activity

Notes

0700

Battery Charging Began

 

0905

Briefing began

 

0945

Battery Charging finished

 

1000

Left the bay

3 vehicles

1015

Arrived WrestRC

Field was covered in slush/pooled water. Only one dry track

1032-1034

Pegasus OpFlow Calibration (1-1)

Log file 50.BIN

1042-1043

Pegasus Loiter - GPS Handling (1-X)

Log file 51.BIN

1047-1047

Pegasus Loiter - OpFlow Handling (1-X)

Log file 51.BIN

1051

Houston proximity test (3-1)

Log file 70.BIN

Batt #1

1059

Pegasus Autotune (X-X)

Log file 53.BIN

1110-1112

Houston Auto Mission (3-3) Attempt #1.

Log file 71.BIN

Unsuccessful - spun in circles trying to avoid the obstacle

Batt #2

11:15:15-11:15:45

Houston Auto Mission (3-3) Attempt #2

Log file 71.BIN

Unsuccessful - disarmed prematurely.

Batt #2

11:45

multi-drone photo

 

11:50:33 - 11:54:50

Houston Auto Mission (3-3) Attempt #3

Log file 73.BIN

Unsuccessful - Altitude too high

11:57:20 - 1159:51

Houston Auto Mission (3-3) Attempt #4

Log file 73.BIN

Unsuccessful - Got stuck in turn-around due to embankment being detected as an obstacle.

12:04:15 - 12:14:27

Houston Auto Mission (3-3) Attempt #5

Log file 74.BIN

Successful - passed obstacle after 4 attempts.

Had a very hard unscheduled, uncontrolled, rapid descent.

Analysis

All log files are available in onedrive, see section above. On Average, ELRS Performance was awesome, while TBS Crossfire was typically transmitting at close to max power, likely due to interference from the RFD900 on the same frequency.

Pegasus Flight(s)

All Pegasus missions were run using LTE, which later failed to connect when attempting the multi-drone photo. It was impossible to takeoff in EKFPosSource MIDDLE, and we only took off in EKFPosSourceLow (GPS mode). Initial YAW tuning on pegasus was quite bad (lots of overshoot), but auto-tuning was able to correct this.

Pegasus did have issues maintaining altitude during transition - it tended to drop ~1m in altitude in translational movement, and had a tendency to level off + continue sliding once the stick returned to center.

The deadzone for takeoff + landing throttle on Pegasus is also significantly larger (read: harsher landing + takeoff) compared to Vanny or Icarus.

Pegasus typically hovers around ~ 2800 rpm

 

Autotune

 

FlowCAL + GPS/non-gps transition

  • Flow calibration worked as expected

EKF Failures:

  • 10:34:18 : EKFPosSource set to MIDDLE

  • 10:34:33 : EKF3 IMU0 stopped aiding

  • 10:34:33 : EKF3 IMU1 stopped aiding

  • 10:34:33 : EKF3 lane switch 1

  • 10:34:33 : EKF Primary Changed: 1

  • 10:34:33 EKF variance

  • 10:34:33 : EKF Failsafe: changed to land

  • once landed, all failsafes cleared & position was set back to middle.

  • Position estimate / IMU2 was still able to provide level landing assistance.

Loiter GPS aided flight

  • estimated position looks good

  • No harsh events

Non-gps aided loiter attempt

  • took-off around 10:47:12 - landed around 10:47:42

  • Flight path looks good, position estimates were continually given.

  • EKF IMU stopped aiding messages were given at 10:47:34

  • EKF Failsafe at 10:47:35.

  • Had a few seconds of non-gps aided flight? Not sure why the failsafe occured.

Houston Auto Mission(s)

Ran a total of 5 Auto missions attempts, eventually successful in pathing around the object.

4 Batteries were used, and OA distances were adjusted as follows during the FT:

  • OA_Type: Dijkstra with BendyRuler → BendyRuler

  • OA_MARGIN_MAX: 5m

  • OA_BR_LOOKAHEAD: 15m → 10m

  • AVOID_ACCEL_MAX: 0

  • AVOID_BEHAVE: 1

  • AVOID_DIST_MAX: 5m

  • AVOID_MARGIN: 2m

Attempt #1

  • Houston was successful in not colliding with an object in the direct flight path.

  • Houston was unable to successfully path around the object and loitered in circles.

  • Mission was ended by the PIC.

Attempt #2

  • Path was updated to move houston further away from the building on waypoints #3 and #4.

  • Houston successfully avoided a light-post, but was disarmed pre-maturely when PIC wanted to switch to Stab (SB) and accidentally hit Disarm (SA). The drone dropped from an altitude of around 8 meters, no damage.

  • Orange is 45 degree sector, and green is 90 degre sector.

  • Notice that the MIN from 45 & 90 is 15 meters (This was the configured OA_BR_LOOKAHEAD).

    • This may not be correct - the physical distance from the pole was significantly less (visual estimate 1-2m upper end)

Attempt #3

  • Houston over-flew the building. Auto mission altitude was set to 5m, and was too high.

Attempt #4

  • HSTN got stuck since it detected the embankment as an obj.

Attempt #5

  • Houston took multiple attempts to navigate around the obstacle.

  • Possible to see proximity sensors pinging off the obstacle and reporting closer values as houston navigates around?

  • Final battery dropped to around ~ <8v during the RTL sequence, .

  • The drone did enter RTL and then LAND, at 9.51 and 7.44V respectively……

    • Likely due to failsafe impedance/2seconds of being below critical values?

    • battery dropped from 10v to < 8v within ~ 2 seconds - too fast to react to.

ExpressLRS

  • TPwr remained at 10 mW basically the entire flight, maybe 25mW sometimes.

  • RSSI quite healthy.


Next-Steps

  • Update & clarify transmitter mappings, common channels, etc. for all drones.

    • arm/disarm sequences, mode channels, aux functions, telemetry logging, etc.

  • Test gemini, tracking-antenna

  • Remember to note down takeoff & landing times of all drones (at least total FT)

  • Remember to have videos of drones during FT’s.

  • Evaluate Pegasus tune.

  • Evaluate operation under GPS failures.

  • Come up with plan to optimize obstacle detection

Action items for next flight test

  • Try to fix this by recalibrating accelerometer at start of next flight test