Skip to content

Commit ce00f6d

Browse files
committed
correct the under control condition check
Signed-off-by: Zhe Shen <lucidshenzhe@gmail.com>
1 parent eb863f9 commit ce00f6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

control/autoware_mpc_lateral_controller/src/mpc_lateral_controller.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ trajectory_follower::LateralOutput MpcLateralController::run(
260260
// the vehicle will return to the path by re-planning the trajectory or external operation.
261261
// After the recovery, the previous value of the optimization may deviate greatly from
262262
// the actual steer angle, and it may make the optimization result unstable.
263-
if (!is_mpc_solved||!input_data.current_operation_mode.is_autoware_control_enabled) {
263+
if (!is_mpc_solved||!is_under_control) {
264264
m_mpc->resetPrevResult(m_current_steering);
265265
} else {
266266
setSteeringToHistory(ctrl_cmd);

0 commit comments

Comments
 (0)