Skip to content

Commit

Permalink
fix(vehicle_cmd_gate): fix filtering condition (#5250)
Browse files Browse the repository at this point in the history
Signed-off-by: kminoda <[email protected]>
  • Loading branch information
kminoda authored Oct 10, 2023
1 parent c508aa7 commit 9ddb07a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions control/vehicle_cmd_gate/src/vehicle_cmd_gate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,9 +555,7 @@ AckermannControlCommand VehicleCmdGate::filterControlCommand(const AckermannCont
// set prev value for both to keep consistency over switching:
// Actual steer, vel, acc should be considered in manual mode to prevent sudden motion when
// switching from manual to autonomous
const auto in_autonomous =
(mode.mode == OperationModeState::AUTONOMOUS && mode.is_autoware_control_enabled);
auto prev_values = in_autonomous ? out : current_status_cmd;
auto prev_values = mode.is_autoware_control_enabled ? out : current_status_cmd;

if (ego_is_stopped) {
prev_values.longitudinal = out.longitudinal;
Expand Down

0 comments on commit 9ddb07a

Please sign in to comment.