Cant Switch out of Mission Mode During a mission

Something didnt look right towards the end of the flight so I tried to switch on my RC remote from Auto Mission to just manual. It would not let me. At 30m up it said landing complete and cut throttle so I had no way of saving it. By the time I was able to command it at all, because it thought the mission was over, I flew essentially full speed into the ground. Log says there is only 36 seconds but I was out for 50 min and the mavlink QGC coincides with this. This was a pretty big bad one because I was at altitude and able to save it and go around IF i could have simply changed mode but that crucial part was not possible. I have the log which looks useless to me and although the log from QGC likely has some info on it.

Can you check the entire contents of the sdcard? Post everything from the sdcard and the mavlink QGC log as well.
Was there any response at all when you tried to change the mode?

Here are all the files zipped. SD Card Zipped with QGC file There was no response at all. I was high enough to have have gone to STAB, go around and land normally. That is what I did when it missed the auto land before and went to loiter. In loiter I was able to take control but Auto I was not. This was just watching a 10kg plane go nose down to the ground.

This was Firmware v1.5.3 (f7f47).

Here’s some of the last flight.

2017_01_27_23_35_57: Move down to 25.3m or move further away by 33.8m
2017_01_27_23_37_47: ARMED by arm/disarm component command
2017_01_27_23_37_47: [blackbox] /fs/microsd/log/2017-01-27
2017_01_27_23_37_47: [blackbox] recording: 23_37_47.px4log
2017_01_27_23_38_27: [blackbox] stopped (11341 drops)
2017_01_27_23_39_39: Executing mission
2017_01_27_23_39_39: #Takeoff on runway
2017_01_27_23_39_40: Takeoff detected
2017_01_27_23_39_43: #Takeoff airspeed reached
2017_01_27_23_39_45: #Climbout
2017_01_27_23_40_43: Holding at 79m above landing)
2017_01_27_23_45_02: Landing detected
2017_01_27_23_45_13: Takeoff detected
2017_01_27_23_45_24: Landing detected
2017_01_27_23_45_25: Takeoff detected
2017_01_27_23_45_31: Landing detected
2017_01_27_23_45_40: Takeoff detected
2017_01_27_23_45_43: Landing detected
2017_01_27_23_46_16: DISARMED by arm/disarm component command
2017_01_27_23_51_52: Landing: last waypoint too high/too close
2017_01_27_23_51_52: Move down to 23.7m or move further away by 9.4m
2017_01_27_23_54_43: ARMED by arm/disarm component command
2017_01_27_23_55_50: #Takeoff on runway
2017_01_27_23_55_52: Takeoff detected
2017_01_27_23_55_55: #Takeoff airspeed reached
2017_01_27_23_55_56: #Climbout
2017_01_27_23_56_21: #Landing, on slope
2017_01_27_23_56_34: #Landing, limiting throttle
2017_01_27_23_56_35: #Landing, flaring
2017_01_27_23_56_35: #Landing, heading hold

A couple issues.

  1. logging only worked for your first session. You should have had a new log every time you armed.
  2. Does the end of this log line up with the last few seconds of your flight? Were you in auto landing at flare? Any idea why you were so high? What was the altitude of the landing waypoint?
  3. Is this a pixhawk with RC connected? I’m wondering why manual passthrough mode (via the px4io) didn’t work.
    4. There’s a reasonable chance this is another manifestation of this bug (https://github.com/PX4/Firmware/issues/6423) which is fixed in the current stable, however I’m not sure if we’ll be able to prove it with the available data. Edit: Nope

Thanks for looking. Strange it didn’t start the log again. Wonder why. Just double checked. Last landing point was 0m. Not sure why it was so high though. It was pretty windy. Probably 15mph but that’s never a problem with this plane in the past. Lidar was onboard as well. That does looks like it was pretty close to the end of the flight but there was a little more. It gave me control right above the ground (but was vertical nose down) so I throttled up and elevator up but crow was still on so there wasn’t a chance. Only gave me control I imagine because it thought the flight was over. Too bad about the bug. Probably going to go a few versions back. This was a test plane but it is in 100 pieces.

Also, rc was plugged in but initiated the mission from qgc.

Reassembling the timeline. Most notably, the autopilot was responding all the way to the ground. Having the real log would have been nice, but we can still get a lot out of the mavlink stream. In particular note that your home position was at ~190m, but throttle was limited at ~247m, and heading hold at ~214m which is also when you changed modes.

2017-01-27 18:54:44.19: STATUSTEXT {severity : 6, text : ARMED by arm/disarm component command}
2017-01-27 18:54:46.76: HOME_POSITION {latitude : 301673707, longitude : -978075759, altitude : 190809, x : -5.69022417068, y : 7.51950025558, z : 0.545093178749, q : [1.0, 0.0, 0.0, 0.0], approach_x : 0.0, approach_y : 0.0, approach_z : 0.0}

2017-01-27 18:56:22.39: STATUSTEXT {severity : 6, text : #Landing, on slope}

2017-01-27 18:56:35.42: STATUSTEXT {severity : 6, text : #Landing, limiting throttle}
2017-01-27 18:56:35.85: VFR_HUD {airspeed : 15.1743822098, groundspeed : 13.4635658264, heading : 359, throttle : 0, alt : 247.454681396, climb : 3.46288514137}

2017-01-27 18:56:35.69: STATUSTEXT {severity : 6, text : #Landing, flaring}
2017-01-27 18:56:35.85: VFR_HUD {airspeed : 15.1743822098, groundspeed : 13.4635658264, heading : 359, throttle : 0, alt : 247.454681396, climb : 3.46288514137}

2017-01-27 18:56:36.27: STATUSTEXT {severity : 6, text : #Landing, heading hold}
2017-01-27 18:56:43.83: VFR_HUD {airspeed : 10.7557163239, groundspeed : 13.5344171524, heading : 302, throttle : 100, alt : 214.133865356, climb : -8.35999011993}
2017-01-27 18:56:43.83: HEARTBEAT {type : 1, autopilot : 12, base_mode : 209, custom_mode : 458752, system_status : 4, mavlink_version : 3}

2017-01-27 18:56:45.66: VFR_HUD {airspeed : 17.8700370789, groundspeed : 16.3257007599, heading : 285, throttle : 100, alt : 197.033233643, climb : -17.0945072174}

QGroundControl replay isn’t working very well so I recorded the playback once.

What’s weird here is that at landing you start climbing, and then the vehicle stalls and you crash, not able to recover soon enough. Looking at the output of the ALTITUDE mavlink message I’m wondering if it has something to do with your lidar.

2017-01-27 18:56:22.39: STATUSTEXT {severity : 6, text : #Landing, on slope}
2017-01-27 18:56:24.04: ALTITUDE {time_usec : 2471183369, altitude_monotonic : 5581.61083984, altitude_amsl : 222.29888916, altitude_local : 30.9439086914, altitude_relative : 31.4889984131, altitude_terrain : 220.149734497, bottom_clearance : 2.14915466309}
2017-01-27 18:56:26.79: ALTITUDE {time_usec : 2473822631, altitude_monotonic : 5586.33496094, altitude_amsl : 224.544952393, altitude_local : 33.1899642944, altitude_relative : 33.7350616455, altitude_terrain : 224.293518066, bottom_clearance : 0.251434326172}
2017-01-27 18:56:29.19: ALTITUDE {time_usec : 2476273043, altitude_monotonic : 5594.90429688, altitude_amsl : 231.490097046, altitude_local : 40.1351165771, altitude_relative : 40.6802062988, altitude_terrain : nan, bottom_clearance : nan}
2017-01-27 18:56:31.52: ALTITUDE {time_usec : 2478602878, altitude_monotonic : 5600.07910156, altitude_amsl : 238.621429443, altitude_local : 47.2664451599, altitude_relative : 47.8115386963, altitude_terrain : nan, bottom_clearance : nan}
2017-01-27 18:56:33.61: ALTITUDE {time_usec : 2480826250, altitude_monotonic : 5607.03271484, altitude_amsl : 244.238525391, altitude_local : 52.8835487366, altitude_relative : 53.4286346436, altitude_terrain : 241.986602783, bottom_clearance : 2.25192260742}
2017-01-27 18:56:35.42: STATUSTEXT {severity : 6, text : #Landing, limiting throttle}
2017-01-27 18:56:35.69: STATUSTEXT {severity : 6, text : #Landing, flaring}
2017-01-27 18:56:36.27: STATUSTEXT {severity : 6, text : #Landing, heading hold}
2017-01-27 18:56:36.63: ALTITUDE {time_usec : 2483731370, altitude_monotonic : 5611.62207031, altitude_amsl : 250.889770508, altitude_local : 59.5347862244, altitude_relative : 60.0798797607, altitude_terrain : 248.998901367, bottom_clearance : 1.89086914062}
2017-01-27 18:56:39.33: ALTITUDE {time_usec : 2486435967, altitude_monotonic : 5609.10498047, altitude_amsl : 244.611907959, altitude_local : 53.2569313049, altitude_relative : 53.8020172119, altitude_terrain : nan, bottom_clearance : nan}
2017-01-27 18:56:41.90: ALTITUDE {time_usec : 2489005986, altitude_monotonic : 5590.61865234, altitude_amsl : 225.233230591, altitude_local : 33.8782501221, altitude_relative : 34.4233398438, altitude_terrain : nan, bottom_clearance : nan}
2017-01-27 18:56:44.25: ALTITUDE {time_usec : 2491394686, altitude_monotonic : 5576.15185547, altitude_amsl : 211.236343384, altitude_local : 19.8813648224, altitude_relative : 20.4264526367, altitude_terrain : nan, bottom_clearance : nan}

Here’s the altitude plot with the intermittent terrain data.

We should open an issue on github to continue this, but it looks like the fw landing code with terrain data needs to be more robust.

Github issue - https://github.com/PX4/Firmware/issues/6456

Thanks for opening that. I went back so a firmware I had been using problem free but it essentially tried the same thing. This time a log file. HERE New components used, checked over LIDAR, etc. Why did it try and flare 3-4 waypoints early? Is this something to do with the acceptable radius of the waypoint (i.e. if you are on wp 4 and wp 6 is pre-landing but 6 acceptable radius is within the bounds of the current wp then it jumps to 6? I am lost on this one. I used the same software on THIS flight (different plane) and no issues.

Hi @Flying_Forfun

Red is your altitude, green is the altitude setpoint. When it drops to 0 you’re on landing approach. GPSP.Type is the waypoint type (blue line), and a value of 4 is LAND.

I don’t have much experience with lidar, but it appears to only be valid below ~ 15 meters, but you’re entering landing above. Realistically the code needs to be updated to safely handle this, but in the meantime if you’re going to use lidar I suggest you get to an appropriate altitude before entering your auto land.

For reference here’s what it looks like in the good log (same software different plane, no issues) http://logs.uaventure.com/view/R9BAuNj5yRxZVr89o6fSSZ