-
Notifications
You must be signed in to change notification settings - Fork 673
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(obstacle_cruise_planner): use motion utils #1381
feat(obstacle_cruise_planner): use motion utils #1381
Conversation
Signed-off-by: yutaka <purewater0901@gmail.com>
Signed-off-by: yutaka <purewater0901@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #1381 +/- ##
========================================
- Coverage 9.92% 9.92% -0.01%
========================================
Files 1117 1117
Lines 77975 77987 +12
Branches 18118 18118
========================================
Hits 7742 7742
- Misses 62679 62691 +12
Partials 7554 7554
*This pull request uses carry forward flags. Click here to find out more.
Continue to review full report at Codecov.
|
const auto zero_vel_idx = motion_utils::insertStopPoint(0, zero_vel_dist, output_traj.points); | ||
if (zero_vel_idx) { | ||
const auto wall_idx = obstacle_cruise_utils::getIndexWithLongitudinalOffset( | ||
planner_data.traj.points, vehicle_info_.max_longitudinal_offset_m, *zero_vel_idx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use abs_ego_offset
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
for (size_t o_idx = zero_vel_idx; o_idx < output_traj.points.size(); ++o_idx) { | ||
output_traj.points.at(o_idx).longitudinal_velocity_mps = 0.0; | ||
const double zero_vel_dist = | ||
closest_obstacle_dist - vehicle_info_.max_longitudinal_offset_m - feasible_margin_from_obstacle; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use abs_ego_offset
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
const double zero_vel_dist = | ||
closest_obstacle_dist - vehicle_info_.max_longitudinal_offset_m - feasible_margin_from_obstacle; | ||
const auto zero_vel_idx = motion_utils::insertStopPoint(0, zero_vel_dist, output_traj.points); | ||
if (zero_vel_idx) { | ||
const auto wall_idx = obstacle_cruise_utils::getIndexWithLongitudinalOffset( | ||
planner_data.traj.points, vehicle_info_.max_longitudinal_offset_m, *zero_vel_idx); | ||
|
||
// virtual wall marker for stop obstacle | ||
const auto marker_pose = planner_data.traj.points.at(wall_idx).pose; | ||
const auto markers = motion_utils::createStopVirtualWallMarker( | ||
marker_pose, "obstacle stop", planner_data.current_time, 0); | ||
tier4_autoware_utils::appendMarkerArray(markers, &debug_data.stop_wall_marker); | ||
debug_data.obstacles_to_stop.push_back(*closest_stop_obstacle); | ||
|
||
// Publish Stop Reason | ||
const auto stop_pose = output_traj.points.at(*zero_vel_idx).pose; | ||
const auto stop_reasons_msg = | ||
makeStopReasonArray(planner_data.current_time, stop_pose, *closest_stop_obstacle); | ||
stop_reasons_pub_->publish(stop_reasons_msg); | ||
|
||
// Publish if ego vehicle collides with the obstacle with a limit acceleration | ||
const auto stop_speed_exceeded_msg = | ||
createStopSpeedExceededMsg(planner_data.current_time, will_collide_with_obstacle); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use output_traj.points for wall_idx handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Signed-off-by: yutaka <purewater0901@gmail.com>
Signed-off-by: yutaka <purewater0901@gmail.com>
Signed-off-by: yutaka <purewater0901@gmail.com>
Signed-off-by: yutaka <purewater0901@gmail.com>
@takayuki5168 Please merge this PR after this fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@purewater0901 Resolve the conflicts please. |
Signed-off-by: yutaka <purewater0901@gmail.com>
fixed |
Signed-off-by: yutaka purewater0901@gmail.com
Description
Use insert stop point from motion utils to get the accurate stop distance
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.