Closed mhoejgaard closed 7 years ago
Output from gcs_control_node
[ INFO] [1510045690.712736037]: IDLE
[ INFO] [1510045690.762799527]: RECEIVED_DISTRESS_CALL
[ INFO] [1510045690.812798720]: PREPARE
[ INFO] [1510045690.862769657]: PREPARE
[ INFO] [1510045690.862867405]: Path callback
[ INFO] [1510045690.912725023]: PREPARE
[ INFO] [1510045690.912771939]: Trying to upload
[ INFO] [1510045711.655303075]: WAIT_FOR_READY
[ INFO] [1510045712.345342815]: DEPLOY
[ INFO] [1510045712.345436489]: DEPLOY
[ INFO] [1510045712.388419284]: FLYING
Output from drone_communication_node
[ INFO] [1510045690.447950602]: Heartbeat
State: IDLE
[ INFO] [1510045690.947911361]: Uploading mission
[ INFO] [1510045690.947963248]: Waypoints to upload: 3
[ INFO] [1510045690.947989432]: Wp: 0 lat: 0.000000 lon: 0.000000 alt: 5.000000 type: 0
[ INFO] [1510045690.948015030]: Wp: 1 lat: 55.472008 lon: 10.324322 alt: 5.000000 type: 1
[ INFO] [1510045690.948032732]: Wp: 2 lat: 55.472008 lon: 10.324322 alt: 0.000000 type: 2
[ INFO] [1510045710.237747115]: Uploded waypoints: 3
[ INFO] [1510045711.238133605]: Heartbeat
State: not IDLE 3
Mode: AUTO.MISSION
[ INFO] [1510045712.488226382]: Arming
[ERROR] [1510045717.490076461]: Failed to arm. Succes: 0 Result 4
[ INFO] [1510045718.490323549]: Heartbeat
State: not IDLE 4
Mode: AUTO.MISSION
[ INFO] [1510045718.490406380]: Arming
[ERROR] [1510045723.492167905]: Failed to arm. Succes: 0 Result 4
[ INFO] [1510045724.492373782]: Heartbeat
State: not IDLE 4
Mode: AUTO.MISSION
[ INFO] [1510045724.492439170]: Arming
[ERROR] [1510045729.494205010]: Failed to arm. Succes: 0 Result 4
Mode: AUTO.MISSION
[ INFO] [1510045730.494433345]: Arming
[ERROR] [1510045735.496121446]: Failed to arm. Succes: 0 Result 4
[ INFO] [1510045736.496295349]: Heartbeat
State: not IDLE 4
Mode:
[ INFO] [1510045736.496369113]: Arming
[ERROR] [1510045741.498130158]: Failed to arm. Succes: 0 Result 4
Mode:
[ INFO] [1510045742.498283311]: Arming
[ERROR] [1510045747.500097090]: Failed to arm. Succes: 0 Result 4
[ INFO] [1510045748.500284169]: Heartbeat
State: not IDLE 4
Mode: AUTO.MISSION
[ INFO] [1510045748.500365240]: Arming
[ERROR] [1510045753.501873350]: Failed to arm. Succes: 0 Result 4
[ INFO] [1510045754.502042532]: Heartbeat
State: not IDLE 4
Mode: AUTO.MISSION
[ INFO] [1510045754.502138968]: Arming
[ERROR] [1510045759.503531342]: Failed to arm. Succes: 0 Result 4
[ INFO] [1510045760.503770619]: Heartbeat
State: not IDLE 4
Mode: AUTO.MISSION
[ INFO] [1510045760.503934245]: Arming
[ERROR] [1510045765.505655238]: Failed to arm. Succes: 0 Result 4
[ INFO] [1510045766.505927361]: Heartbeat
State: not IDLE 4
Mode: AUTO.MISSION
[ INFO] [1510045766.506043227]: Arming
[ERROR] [1510045771.508136028]: Failed to arm. Succes: 0 Result 4
[ INFO] [1510045772.508327546]: Heartbeat
State: not IDLE 4
Mode: AUTO.MISSION
[ERROR] [1510045772.508428524]: Arm failed
[ERROR] [1510045772.558625748]: ERROR STATE
[ERROR] [1510045772.608539717]: ERROR STATE
[ERROR] [1510045772.658544306]: ERROR STATE
[ERROR] [1510045772.708579702]: ERROR STATE
[ERROR] [1510045772.758547905]: ERROR STATE
[ERROR] [1510045772.808519855]: ERROR STATE
[ERROR] [1510045772.858522585]: ERROR STATE
[ERROR] [1510045772.908545813]: ERROR STATE
[ERROR] [1510045772.958554569]: ERROR STATE
[ERROR] [1510045773.008531911]: ERROR STATE
[ERROR] [1510045773.058516319]: ERROR STATE
[ERROR] [1510045773.108537648]: ERROR STATE
[ERROR] [1510045773.158529081]: ERROR STATE
[ INFO] [1510045773.158615801]: Heartbeat
State: not IDLE 8
[ERROR] [1510045773.208547177]: ERROR STATE
The outputs above resulted in the drone only receiving / understanding 1 waypoint even though it approved the mission. The drone therefore did not take off as normal but went straight for waypoint 1 (number starts from 0) at a high speed and then auto loitered above the landing point.
A simple solution to the problem has been added. Upon a successful mission upload it pulls the number of waypoints from the drone and ensures that it matches the number of waypoints in the mission before allowing the state machine to continue to the deploy. The check is performed 10 times with a 1 second timeout in between. If the check is not passed, the mission will be re-uploaded in up to 10 trials as previously implemented (and then the number of waypoints is checked again).
The implemented solution should be sufficient as the mission is cleared during setup and mavlink uses a checksum on each package.
If this is not sufficient a pulled version of the mission should be compared the mission that was sent. We do not desire to it if not necessary because each transmission of waypoints adds several seconds of delay.
MAVROS has been experienced to report a mission upload as complete, even though it is not complete. See attached terminal output.
It may be fixed by retrieving the mission and comparing it to the uploaded mission.