Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
  • Loading branch information
takayuki5168 committed Jul 8, 2024
1 parent cf552f6 commit fdfe33c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion control/autoware_mpc_lateral_controller/src/mpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ VectorXd MPC::calcSteerRateLimitOnTrajectory(
return reference.back();
};

// when the vehicle is stopped, no steering rate limit.
// When the vehicle is stopped, a large steer rate limit is used for the dry steering.
constexpr double steer_rate_lim = 100.0;
const bool is_vehicle_stopped = std::fabs(current_velocity) < 0.01;
if (is_vehicle_stopped) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,9 @@ void PidLongitudinalController::updateControlState(const ControlData & control_d
const bool current_keep_stopped_condition = std::fabs(current_vel) < vel_epsilon &&
m_enable_keep_stopped_until_steer_convergence &&
!lateral_sync_data_.is_steer_converged;
// NOTE: Dry steering is considered unnecessary when the steering is converged twice in a
// row. This is because lateral_sync_data_.is_steer_converged is not the current but
// the previous value due to the order controllers' run and sync functions.
const bool keep_stopped_condition =
!m_prev_keep_stopped_condition ||
(current_keep_stopped_condition || *m_prev_keep_stopped_condition);
Expand Down

0 comments on commit fdfe33c

Please sign in to comment.