Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(simple_planning_simulator): fix acc output for the model sim_model_delay_steer_acc_geared_wo_fall_guard #8607

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class SimModelDelaySteerAccGearedWoFallGuard : public SimModelInterface
VX,
STEER,
PEDAL_ACCX,
ACCX,
};
enum IDX_U { PEDAL_ACCX_DES = 0, GEAR, SLOPE_ACCX, STEER_DES };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ double SimModelDelaySteerAccGearedWoFallGuard::getVy()
}
double SimModelDelaySteerAccGearedWoFallGuard::getAx()
{
return state_(IDX::PEDAL_ACCX);
return state_(IDX::ACCX);
}
double SimModelDelaySteerAccGearedWoFallGuard::getWz()
{
Expand Down Expand Up @@ -103,6 +103,8 @@ void SimModelDelaySteerAccGearedWoFallGuard::update(const double & dt)
// stop condition is satisfied
state_(IDX::VX) = 0.0;
}

state_(IDX::ACCX) = (state_(IDX::VX) - prev_state(IDX::VX)) / dt;
}

void SimModelDelaySteerAccGearedWoFallGuard::initializeInputQueue(const double & dt)
Expand Down
Loading