CopterExpress / clever-show

Software for making the drone show with 🍀
GNU General Public License v3.0
76 stars 42 forks source link

Task manager is 'overinterrupted' #64

Open goldarte opened 4 years ago

goldarte commented 4 years ago

The bug description Sometimes the task can be interrupted, when it should not be interrupted.

Log example from real flight It was the usual flight, when I want to land copter by sending command from server, but the command was executed only for the second time.

Jan 22 13:21:43 clever-05 bash[493]: 2020-01-22 13:21:43,028 [FlightL] [Task process] [INFO ] Going to: | x: 10.811 y: -1.975 z: 3.545 yaw: 3.142 Jan 22 13:21:43 clever-05 bash[493]: 2020-01-22 13:21:43,029 [tasking] [Task process] [INFO ] Execution done Jan 22 13:21:43 clever-05 bash[493]: 2020-01-22 13:21:43,030 [tasking] [Task process] [INFO ] Executing task execute_frame Jan 22 13:21:43 clever-05 bash[493]: 2020-01-22 13:21:43,096 [FlightL] [Task process] [INFO ] Going to: | x: 10.875 y: -1.967 z: 3.546 yaw: 3.142 Jan 22 13:21:43 clever-05 bash[493]: 2020-01-22 13:21:43,099 [tasking] [MainThread ] [INFO ] Task queue paused Jan 22 13:21:43 clever-05 bash[493]: 2020-01-22 13:21:43,105 [tasking] [MainThread ] [INFO ] Task queue resumed with timeshift 0.0 Jan 22 13:21:43 clever-05 bash[493]: 2020-01-22 13:21:43,108 [tasking] [Task process] [WARNI] Timeout checking exception: list index out of range Jan 22 13:21:43 clever-05 bash[504]: 2020-01-22 13:21:43,519 [main_] [Thread-4 ] [DEBUG] armed: True | mode: OFFBOARD | viz_dt: 0.08 | pos_delta: 0.36 | pos_dt: -0.03 | action: emergency_land | range: 10.00 Jan 22 13:21:43 clever-05 bash[493]: 2020-01-22 13:21:43,732 [FlightL] [Telemetry ge] [WARNI] [Linear velocity estimation]: Err: Z velocity estimation: 0.161 m/s Jan 22 13:21:44 clever-05 bash[504]: 2020-01-22 13:21:44,019 [_main] [Thread-4 ] [DEBUG] armed: True | mode: OFFBOARD | viz_dt: 0.08 | pos_delta: 0.11 | pos_dt: 0.00 | action: emergency_land | range: 10.00 Jan 22 13:21:44 clever-05 bash[504]: 2020-01-22 13:21:44,519 [main_] [Thread-4 ] [DEBUG] armed: True | mode: OFFBOARD | viz_dt: 0.08 | pos_delta: 0.22 | pos_dt: 0.00 | action: emergency_land | range: 10.00 Jan 22 13:21:44 clever-05 bash[493]: 2020-01-22 13:21:44,805 [FlightL] [Telemetry ge] [WARNI] [Angular velocity estimation]: Err: Pitch rate estimation: 0.109 rad/s Jan 22 13:21:44 clever-05 bash[493]: 2020-01-22 13:21:44,808 [FlightL] [Telemetry ge] [WARNI] [Angular velocity estimation]: Err: Roll rate estimation: 0.129 rad/s Jan 22 13:21:45 clever-05 bash[504]: 2020-01-22 13:21:45,020 [main_] [Thread-4 ] [DEBUG] armed: True | mode: OFFBOARD | viz_dt: 0.08 | pos_delta: 0.36 | pos_dt: 0.00 | action: emergency_land | range: 10.00 Jan 22 13:21:45 clever-05 bash[504]: 2020-01-22 13:21:45,518 [_main] [Thread-4 ] [DEBUG] armed: True | mode: OFFBOARD | viz_dt: 0.08 | pos_delta: 0.33 | pos_dt: 0.01 | action: emergency_land | range: 10.00 Jan 22 13:21:45 clever-05 bash[493]: 2020-01-22 13:21:45,795 [FlightL] [Telemetry ge] [WARNI] [Angular velocity estimation]: Err: Pitch rate estimation: 0.094 rad/s Jan 22 13:21:45 clever-05 bash[493]: 2020-01-22 13:21:45,803 [tasking] [MainThread ] [INFO ] Task queue paused Jan 22 13:21:45 clever-05 bash[493]: 2020-01-22 13:21:45,805 [tasking] [MainThread ] [INFO ] Task queue resumed with timeshift 0.0 Jan 22 13:21:45 clever-05 bash[493]: 2020-01-22 13:21:45,807 [tasking] [Task process] [INFO ] Executing task land Jan 22 13:21:45 clever-05 bash[493]: 2020-01-22 13:21:45,814 [tasking] [Thread-4 ] [WARNI] Waiting was interrupted! Jan 22 13:21:45 clever-05 bash[493]: 2020-01-22 13:21:45,824 [tasking] [Thread-4 ] [WARNI] Waiting was interrupted! Jan 22 13:21:45 clever-05 bash[492]: #033[33m[ WARN] [1579699305.867162293]: ros.mavros.cmd: CMD: Unexpected command 176, result 0#033[0m Jan 22 13:21:46 clever-05 bash[504]: 2020-01-22 13:21:46,019 [main_] [Thread-4 ] [DEBUG] armed: True | mode: OFFBOARD | viz_dt: 0.13 | pos_delta: 0.34 | pos_dt: 0.06 | action: emergency_land | range: 10.00 Jan 22 13:21:46 clever-05 bash[493]: 2020-01-22 13:21:46,394 [FlightL] [Task process] [WARNI] Land function interrupted! Jan 22 13:21:46 clever-05 bash[493]: 2020-01-22 13:21:46,396 [tasking] [Task process] [INFO ] Execution done

Expected behavior The task should not be interrupted by itself, we need to rework the task manager.

Version v0.3.