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(motion_velocity_smoother): calc first point front_wheel_angle_rad #5989

Merged
merged 1 commit into from
Feb 15, 2024
Merged
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 @@ -215,7 +215,7 @@ TrajectoryPoints SmootherBase::applySteeringRateLimit(

// Step2. Calculate steer rate for each trajectory point.
std::vector<double> steer_rate_arr(output.size(), 0.0);
for (size_t i = 1; i < output.size() - 1; i++) {
for (size_t i = 0; i < output.size() - 1; i++) {
// velocity
const auto & v_front = output.at(i + 1).longitudinal_velocity_mps;
const auto & v_back = output.at(i).longitudinal_velocity_mps;
Expand All @@ -234,7 +234,6 @@ TrajectoryPoints SmootherBase::applySteeringRateLimit(
steer_rate_arr.at(i) = steering_diff / dt;
}

steer_rate_arr.at(0) = steer_rate_arr.at(1);
steer_rate_arr.back() = steer_rate_arr.at((output.size() - 2));

// Step3. Remove noise by mean filter.
Expand Down
Loading