Skip to content

Commit

Permalink
fix(autoware_motion_velocity_obstacle_velocity_limiter_module): fix u…
Browse files Browse the repository at this point in the history
…nreadVariable warning (autowarefoundation#7625)

Signed-off-by: Ryuta Kambe <[email protected]>
  • Loading branch information
veqcc authored and tby-udel committed Jul 14, 2024
1 parent 7eaf820 commit fede0dc
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,13 @@ TrajectoryPoints downsampleTrajectory(

void calculateSteeringAngles(TrajectoryPoints & trajectory, const double wheel_base)
{
auto t = 0.0;
auto prev_point = trajectory.front();
auto prev_heading = tf2::getYaw(prev_point.pose.orientation);
for (auto i = 1ul; i < trajectory.size(); ++i) {
const auto & prev_point = trajectory[i - 1];
auto & point = trajectory[i];
const auto dt = autoware::universe_utils::calcDistance2d(prev_point, point) /
prev_point.longitudinal_velocity_mps;
t += dt;
const auto heading = tf2::getYaw(point.pose.orientation);
const auto d_heading = heading - prev_heading;
prev_heading = heading;
Expand Down

0 comments on commit fede0dc

Please sign in to comment.