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

feat(planning_evaluator): add modified goal deviation #3053

Merged
merged 6 commits into from
Mar 14, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add abs
Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
  • Loading branch information
kosuke55 committed Mar 13, 2023
commit 1cb86a90ba1167bd5d3c028693d63d2653882eda
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,22 @@ Stat<double> calcVelocityDeviation(const Trajectory & ref, const Trajectory & tr
Stat<double> calcPoseLongitudinalDeviation(const Pose & base_pose, const Pose & target_pose)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const Pose & target_pose
can be replaced with
const Point & target_point?
if direction of target_pose is not used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, fixed in 31c8b82

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(and 4ac91a0)

{
Stat<double> stat;
stat.add(tier4_autoware_utils::calcLongitudinalDeviation(base_pose, target_pose.position));
stat.add(
std::abs(tier4_autoware_utils::calcLongitudinalDeviation(base_pose, target_pose.position)));
return stat;
}

Stat<double> calcPoseLateralDeviation(const Pose & base_pose, const Pose & target_pose)
{
Stat<double> stat;
stat.add(tier4_autoware_utils::calcLateralDeviation(base_pose, target_pose.position));
stat.add(std::abs(tier4_autoware_utils::calcLateralDeviation(base_pose, target_pose.position)));
return stat;
}

Stat<double> calcPoseYawDeviation(const Pose & base_pose, const Pose & target_pose)
{
Stat<double> stat;
stat.add(tier4_autoware_utils::calcYawDeviation(base_pose, target_pose));
stat.add(std::abs(tier4_autoware_utils::calcYawDeviation(base_pose, target_pose)));
return stat;
}
} // namespace metrics
Expand Down