Browse Source

Handle offboard mode with acceleration setpoints

The case when acceleration setpoints were being passed in offboard mode was triggering control_climbrate_mode. This prevented the vehicle from taking off, since it made the vehicle skip the rampup phase of the takeoff
This commit fixes this by handling the case properly
release/1.12
Jaeyoung-Lim 4 years ago committed by Matthias Grob
parent
commit
d2b0f63e1f
  1. 2
      src/modules/commander/Commander.cpp

2
src/modules/commander/Commander.cpp

@ -3491,7 +3491,7 @@ Commander::update_control_mode() @@ -3491,7 +3491,7 @@ Commander::update_control_mode()
!control_mode.flag_control_acceleration_enabled;
control_mode.flag_control_climb_rate_enabled = (!offboard_control_mode.ignore_velocity ||
!offboard_control_mode.ignore_position) && !control_mode.flag_control_acceleration_enabled;
!offboard_control_mode.ignore_position);
control_mode.flag_control_position_enabled = !offboard_control_mode.ignore_position && !_status.in_transition_mode &&
!control_mode.flag_control_acceleration_enabled;

Loading…
Cancel
Save