Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
Signed-off-by: kosuke55 <[email protected]>
  • Loading branch information
kosuke55 committed Jan 31, 2024
1 parent e4dadc5 commit 30ea518
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ double SimModelDelaySteerAccGeared::getWz()
}
double SimModelDelaySteerAccGeared::getSteer()
{
// return measured values with bias added to actual values
return state_(IDX::STEER) + steer_bias_;
}
void SimModelDelaySteerAccGeared::update(const double & dt)
Expand Down Expand Up @@ -120,6 +121,9 @@ Eigen::VectorXd SimModelDelaySteerAccGeared::calcModel(
sat(input(IDX_U::ACCX_DES), vx_rate_lim_, -vx_rate_lim_) * debug_acc_scaling_factor_;
const double steer_des =
sat(input(IDX_U::STEER_DES), steer_lim_, -steer_lim_) * debug_steer_scaling_factor_;
// NOTE: `steer_des` is calculated by control from measured values. getSteer() also gets the
// measured value. The steer_rate used in the motion calculation is obtained from these
// differences.
const double steer_diff = getSteer() - steer_des;
const double steer_diff_with_dead_band = std::invoke([&]() {
if (steer_diff > steer_dead_band_) {
Expand Down

0 comments on commit 30ea518

Please sign in to comment.