Skip to content

Commit

Permalink
fix(planning_evaluator): update lateral_trajectory_displacement to ab…
Browse files Browse the repository at this point in the history
…solute value (#9696)

* fix(planning_evaluator): update lateral_trajectory_displacement to absolute value

Signed-off-by: Kasunori-Nakajima <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: Kasunori-Nakajima <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
Kazunori-Nakajima and pre-commit-ci[bot] authored Jan 10, 2025
1 parent 2a94090 commit 76aa83f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ Accumulator<double> calcLocalLateralTrajectoryDisplacement(
autoware::motion_utils::calcLateralOffset(prev.points, ego_pose.position);
const auto traj_lateral_deviation =
autoware::motion_utils::calcLateralOffset(traj.points, ego_pose.position);
const auto lateral_trajectory_displacement = traj_lateral_deviation - prev_lateral_deviation;
const auto lateral_trajectory_displacement =
std::abs(traj_lateral_deviation - prev_lateral_deviation);
stat.add(lateral_trajectory_displacement);
return stat;
}
Expand Down

0 comments on commit 76aa83f

Please sign in to comment.