Skip to content

Commit

Permalink
Merge pull request #1516 from tier4/feat/vel_model_acc
Browse files Browse the repository at this point in the history
  • Loading branch information
HansRobo authored Jan 31, 2025
2 parents 688dfaa + bbaf0f3 commit 60c06ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ class SimModelDelaySteerVel : public SimModelInterface
const double steer_lim_; //!< @brief steering limit [rad]
const double steer_rate_lim_; //!< @brief steering angular velocity limit [rad/s]
const double wheelbase_; //!< @brief vehicle wheelbase length [m]
double prev_vx_ = 0.0;
double current_ax_ = 0.0;

std::deque<double> vx_input_queue_; //!< @brief buffer for velocity command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ void SimModelDelaySteerVel::update(const double & dt)
delayed_input(IDX_U::STEER_DES) = steer_input_queue_.front();
steer_input_queue_.pop_front();
// do not use deadzone_delta_steer (Steer IF does not exist in this model)
const double prev_vx = state_(IDX::VX);
updateRungeKutta(dt, delayed_input);
current_ax_ = (input_(IDX_U::VX_DES) - prev_vx_) / dt;
prev_vx_ = input_(IDX_U::VX_DES);
current_ax_ = (state_(IDX::VX) - prev_vx) / dt;
}

void SimModelDelaySteerVel::initializeInputQueue(const double & dt)
Expand Down

0 comments on commit 60c06ef

Please sign in to comment.