The logical method for commanding the drone to take off is to use the service call provided by MAVROS or the publishing local setpoints at an altitude offset as suggested in the MAVROS OFFBOARD example. Once we have the drone in the air, we are required to command the velocities (linear and angular) of the drone in the Body Fixed NED Frame(FRAME_BODY_NED). Surprisingly, when using any of the two above methods for takeoff, on switching to using cmd_vel
(Twist) setpoints, the FCU automatically goes into the failsafe mode citing:
WARN [commander] Failsafe enabled: no RC and no offboard
[ERROR] [1559902872.143876063, 35.976000000]: FCU: Failsafe enabled: no RC and no offboard
[ INFO] [1559902872.201660093, 36.028000000]: FCU: Failsafe mode activated
What’s even more surprising is that this persists even on disabling the failsafes for Data Link and RC Link Loss:
[ WARN] [1559755500.317984418, 809.804000000]: PR: Param NAV_DLL_ACT (359/565): <value><i4>0</i4></value> different index: 365/571
[ WARN] [1559755500.321128431, 809.808000000]: PR: Param NAV_RCL_ACT (380/565): <value><i4>0</i4></value> different index: 386/571
[ WARN] [1559755500.324533916, 809.812000000]: PR: Param NAV_DLL_ACT (359/565): <value><i4>0</i4></value> different index: 372/578
[ WARN] [1559755500.324615102, 809.812000000]: PR: Param NAV_RCL_ACT (380/565): <value><i4>0</i4></value> different index: 393/578
INFO [logger] Start file log (type: full)
[ INFO] [1559755500.338754612, 809.828000000]: FCU: ARMED by Arm/Disarm component command
INFO [logger] Opened full log file: ./log/2019-06-05/17_25_00.ulg
[ INFO] [1559755500.390418762, 809.880000000]: FCU: [logger] file: ./log/2019-06-05/17_25_00.ulg
[ INFO] [1559755500.482441549, 809.972000000]: FCU: Failsafe mode deactivated
INFO [commander] Takeoff detected
[ INFO] [1559755504.168664354, 813.656000000]: FCU: Takeoff detected
WARN [commander] Failsafe enabled: no RC and no offboard
[ERROR] [1559755514.411656119, 823.892000000]: FCU: Failsafe enabled: no RC and no offboard
I also found that if the same method of control persists throughout the execution, i.e. always use cmd_vel
or always use setpoint_position
, the drone is able to complete the trajectory. As a work-around to the above issue, I am using cmd_vel
for the control throughout the mission.