Skip to content

Commit

Permalink
feat(simple_planning_simulator): change acc state calculation of SimM…
Browse files Browse the repository at this point in the history
…odelDelaySteerVel (#10030)

Signed-off-by: kosuke55 <[email protected]>
  • Loading branch information
kosuke55 authored Jan 29, 2025
1 parent 6adf132 commit fcd1c7b
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 @@ -79,7 +79,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 @@ -83,9 +83,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 fcd1c7b

Please sign in to comment.