We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eaf0d10 commit e5f9584Copy full SHA for e5f9584
control/vehicle_cmd_gate/src/vehicle_cmd_gate.cpp
@@ -527,7 +527,9 @@ AckermannControlCommand VehicleCmdGate::filterControlCommand(const AckermannCont
527
// set prev value for both to keep consistency over switching:
528
// Actual steer, vel, acc should be considered in manual mode to prevent sudden motion when
529
// switching from manual to autonomous
530
- auto prev_values = (mode.mode == OperationModeState::AUTONOMOUS) ? out : current_status_cmd;
+ const auto in_autonomous =
531
+ (mode.mode == OperationModeState::AUTONOMOUS && mode.is_autoware_control_enabled);
532
+ auto prev_values = in_autonomous ? out : current_status_cmd;
533
534
if (ego_is_stopped) {
535
prev_values.longitudinal = out.longitudinal;
0 commit comments