ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
10.98k stars 17.51k forks source link

Mission state machine not running at end of mission #18528

Open peterbarker opened 3 years ago

peterbarker commented 3 years ago

Bug report

Issue details

A trivial mission with no takeoff and no landing exhibits a bug where if the mission completes the vehicle will no longer fly to other waypoints if you do a "wp set".

Version master

Platform [ ] All [ ] AntennaTracker [ X ] Copter [ ] Plane [ ] Rover [ ] Submarine

Airframe type +

Hardware type SITL

Logs

The autotest here: https://github.com/ArduPilot/ardupilot/pull/18527 reproduces

It gets stuck like this:

AT-0055.2: WP 3 (wp_dist=0 Alt=599.04), current_wp: 3,wpnum_end: 2
AT-0055.4: WP 3 (wp_dist=0 Alt=599.04), current_wp: 3,wpnum_end: 2
AT-0055.5: WP 3 (wp_dist=0 Alt=599.04), current_wp: 3,wpnum_end: 2
AT-0055.7: WP 3 (wp_dist=0 Alt=599.04), current_wp: 3,wpnum_end: 2

The bug can be reproduced in SITL by creating a two-waypoint mission with no takeoff/landing, taking off in mode loiter. Once the mission is complete the vehicle will hover but you can no longer wp set to move to another waypoint.

peterbarker commented 3 years ago
0   0   0   16  0.000000    0.000000    0.000000    0.000000    -35.363262  149.165237  584.090027  1
1   0   3   16  0.000000    0.000000    0.000000    0.000000    -35.362848  149.165195  15.000000   1
2   0   3   16  0.000000    0.000000    0.000000    0.000000    -35.362848  149.164975  15.000000   1
3   0   3   16  0.000000    0.000000    0.000000    0.000000    -35.363028  149.164975  15.000000   1

That mission is the one used by the test