File tree 2 files changed +2
-2
lines changed
control/autoware_mpc_lateral_controller/src
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ void MPC::setReferenceTrajectory(
244
244
245
245
void MPC::resetPrevResult (const SteeringReport & current_steer)
246
246
{
247
- // Consider limit. The prev value larger than limitation brakes the optimization constraint and
247
+ // Consider limit. The prev value larger than limitation breaks the optimization constraint and
248
248
// results in optimization failure.
249
249
const float steer_lim_f = static_cast <float >(m_steer_lim);
250
250
m_raw_steer_cmd_prev = std::clamp (current_steer.steering_tire_angle , -steer_lim_f, steer_lim_f);
Original file line number Diff line number Diff line change @@ -287,7 +287,7 @@ trajectory_follower::LateralOutput MpcLateralController::run(
287
287
// the vehicle will return to the path by re-planning the trajectory or external operation.
288
288
// After the recovery, the previous value of the optimization may deviate greatly from
289
289
// the actual steer angle, and it may make the optimization result unstable.
290
- if (!is_mpc_solved) {
290
+ if (!is_mpc_solved || !is_under_control ) {
291
291
m_mpc->resetPrevResult (m_current_steering);
292
292
} else {
293
293
setSteeringToHistory (ctrl_cmd);
You can’t perform that action at this time.
0 commit comments