mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-02 01:00:35 +08:00
mc_pos_control: do not execute updateSetpoint twice if obstacle avoidance
active
This commit is contained in:
@@ -654,9 +654,11 @@ MulticopterPositionControl::task_main()
|
||||
// Update states, setpoints and constraints.
|
||||
_control.updateConstraints(constraints);
|
||||
_control.updateState(_states);
|
||||
_control.updateSetpoint(setpoint);
|
||||
|
||||
if (use_obstacle_avoidance()) {
|
||||
if (!use_obstacle_avoidance()) {
|
||||
_control.updateSetpoint(setpoint);
|
||||
|
||||
} else {
|
||||
execute_avoidance_waypoint();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user