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(behavior_velocity): use pose for min velocity if the object is stopped #1052

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -505,10 +505,15 @@ std::vector<geometry_msgs::msg::Point> RunOutModule::createBoundingBoxForRangedP
tier4_autoware_utils::calcDistance2d(pose_with_range.pose_min, pose_with_range.pose_max);

geometry_msgs::msg::Pose p_min_to_p_max;
const auto azimuth_angle = tier4_autoware_utils::calcAzimuthAngle(
pose_with_range.pose_min.position, pose_with_range.pose_max.position);
p_min_to_p_max.position = pose_with_range.pose_min.position;
p_min_to_p_max.orientation = tier4_autoware_utils::createQuaternionFromYaw(azimuth_angle);
if (dist_p1_p2 < std::numeric_limits<double>::epsilon()) {
// can't calculate the angle if two points are the same
p_min_to_p_max = pose_with_range.pose_min;
} else {
const auto azimuth_angle = tier4_autoware_utils::calcAzimuthAngle(
pose_with_range.pose_min.position, pose_with_range.pose_max.position);
p_min_to_p_max.position = pose_with_range.pose_min.position;
p_min_to_p_max.orientation = tier4_autoware_utils::createQuaternionFromYaw(azimuth_angle);
}

std::vector<geometry_msgs::msg::Point> poly;
poly.emplace_back(
Expand Down