-
Notifications
You must be signed in to change notification settings - Fork 676
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 obstacle velocity based obstacle parameters #5510
feat(obstacle_cruise_planner): use obstacle velocity based obstacle parameters #5510
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #5510 +/- ##
==========================================
- Coverage 15.26% 15.26% -0.01%
==========================================
Files 1715 1715
Lines 118348 118353 +5
Branches 37906 37925 +19
==========================================
Hits 18061 18061
+ Misses 79634 79630 -4
- Partials 20653 20662 +9
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
} | ||
|
||
ObstacleSpecificParams getObstacleParamByLabel(const ObjectClassification & label_id) const | ||
ObstacleSpecificParams getObstacleParamByLabel( | ||
const ObjectClassification & label_id, const bool & is_obstacle_moving) const |
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.
No need to add a reference to bool variables
4b2144d
to
7780fd0
Compare
@@ -561,9 +561,17 @@ std::vector<TrajectoryPoint> PlannerInterface::generateSlowDownTrajectory( | |||
const auto & obstacle = obstacles.at(i); | |||
const auto prev_output = getObjectFromUuid(prev_slow_down_output_, obstacle.uuid); | |||
|
|||
bool is_obstacle_moving = [&]() -> bool { |
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.
bool is_obstacle_moving = [&]() -> bool { | |
const bool is_obstacle_moving = [&]() -> bool { |
return obstacle_to_param_struct_map.at(label); | ||
} | ||
return obstacle_to_param_struct_map.at("default"); | ||
std::string label = |
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.
std::string label = | |
const std::string label = |
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!
return obstacle_to_param_struct_map.at("default"); | ||
std::string label = | ||
(types_map.count(label_id.label) > 0) ? types_map.at(label_id.label) : "default"; | ||
std::string movement_postfix = (is_obstacle_moving) ? "moving" : "static"; |
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.
std::string movement_postfix = (is_obstacle_moving) ? "moving" : "static"; | |
const std::string movement_postfix = is_obstacle_moving ? "moving" : "static"; |
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: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
efea426
to
a2af7d9
Compare
60a51e0
into
autowarefoundation:main
…arameters (autowarefoundation#5510) * Add extra tag for moving obstacle type Signed-off-by: Daniel Sanchez <[email protected]> * add static and moving as parameter postfixes Signed-off-by: Daniel Sanchez <[email protected]> * set hysteresis-based obstacle moving classification Signed-off-by: Daniel Sanchez <[email protected]> * update config params Signed-off-by: Daniel Sanchez <[email protected]> * Use speed norm for object classification Signed-off-by: Daniel Sanchez <[email protected]> * changed '_' for '.' to make the code more consistent Signed-off-by: Daniel Sanchez <[email protected]> * update documentation Signed-off-by: Daniel Sanchez <[email protected]> * move the obstacle moving check to generateSlowDownTrajectory Signed-off-by: Daniel Sanchez <[email protected]> * remove unnecessary reference Signed-off-by: Daniel Sanchez <[email protected]> * add const to certain variables Signed-off-by: Daniel Sanchez <[email protected]> --------- Signed-off-by: Daniel Sanchez <[email protected]> Signed-off-by: Daniel Sanchez <[email protected]>
…arameters (autowarefoundation#5510) * Add extra tag for moving obstacle type Signed-off-by: Daniel Sanchez <[email protected]> * add static and moving as parameter postfixes Signed-off-by: Daniel Sanchez <[email protected]> * set hysteresis-based obstacle moving classification Signed-off-by: Daniel Sanchez <[email protected]> * update config params Signed-off-by: Daniel Sanchez <[email protected]> * Use speed norm for object classification Signed-off-by: Daniel Sanchez <[email protected]> * changed '_' for '.' to make the code more consistent Signed-off-by: Daniel Sanchez <[email protected]> * update documentation Signed-off-by: Daniel Sanchez <[email protected]> * move the obstacle moving check to generateSlowDownTrajectory Signed-off-by: Daniel Sanchez <[email protected]> * remove unnecessary reference Signed-off-by: Daniel Sanchez <[email protected]> * add const to certain variables Signed-off-by: Daniel Sanchez <[email protected]> --------- Signed-off-by: Daniel Sanchez <[email protected]> Signed-off-by: Daniel Sanchez <[email protected]>
…arameters (autowarefoundation#5510) * Add extra tag for moving obstacle type Signed-off-by: Daniel Sanchez <[email protected]> * add static and moving as parameter postfixes Signed-off-by: Daniel Sanchez <[email protected]> * set hysteresis-based obstacle moving classification Signed-off-by: Daniel Sanchez <[email protected]> * update config params Signed-off-by: Daniel Sanchez <[email protected]> * Use speed norm for object classification Signed-off-by: Daniel Sanchez <[email protected]> * changed '_' for '.' to make the code more consistent Signed-off-by: Daniel Sanchez <[email protected]> * update documentation Signed-off-by: Daniel Sanchez <[email protected]> * move the obstacle moving check to generateSlowDownTrajectory Signed-off-by: Daniel Sanchez <[email protected]> * remove unnecessary reference Signed-off-by: Daniel Sanchez <[email protected]> * add const to certain variables Signed-off-by: Daniel Sanchez <[email protected]> --------- Signed-off-by: Daniel Sanchez <[email protected]> Signed-off-by: Daniel Sanchez <[email protected]>
Description
🤖 Generated by Copilot at cd523a7
This pull request enhances the
obstacle_cruise_planner
by adding a new feature to distinguish between moving and static obstacles and adjust the slow down accordingly. It modifies theplanner_interface.hpp
andplanner_interface.cpp
files to implement this feature using new parameters, variables, and functions.Related links
TIER IV INTERNAL LINK
Tests performed
On PSim: planned a path with both static and moving obstacles. The example video shows how the vehicle uses different slow down parameters when encountering a moving pedestrian and a static pedestrian (the slow down is more pronounced for the moving pedestrian). A similar test is done with a static and a moving car, in this case, the parked car causes the ego to slow down to around 1 Km/h while the moving car makes the ego slow down to around 7 Km/h. See videos for more details.
cap-.2023-11-07-15-42-09.mp4
cap-.2023-11-08-11-07-03.mp4
Notes for reviewers
Note: Documentation update in progress
Requires changes to Autoware launch found on this PR Draft
Interface changes
Added parameters for hysteresis-based decision making -> is the obstacle moving or not.
Effects on system behavior
Vehicle slow down response can be customized for moving or static objects.
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.