-
Notifications
You must be signed in to change notification settings - Fork 672
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): improve stop and cruise behavior for cut-in & out #8072
Conversation
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
ef83f99
to
5099ca5
Compare
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.
Thank you for the PR. I've been waiting for this change.
As I commented out, I feel we have to refactor createStopObstacleForPredictedObject()
.
Could you check it?
d1dda1c
to
abeb178
Compare
Some scenario tests: Possible Collision (UC-NTR-003-0001): possible_collision.mp4Pedestrian Jay Walk (UC-VRU-001-0002): ped_reaction.mp4Transient Object (UC-NTR-003-0002): transient_obj.mp4Stop with high negative acceleration: sudden_deccelarate_obj.mp4 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8072 +/- ##
==========================================
- Coverage 26.70% 26.64% -0.06%
==========================================
Files 1296 1297 +1
Lines 95675 95841 +166
Branches 39083 39142 +59
==========================================
- Hits 25547 25540 -7
- Misses 67488 67644 +156
- Partials 2640 2657 +17
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@brkay54 |
626a319
to
7b1f5e0
Compare
@yuki-takagi-66 -san, thank you for your review, and sorry for being late. Actually, I was planning to create two PRs: improvement for stop obstacles and improvement for cruise obstacles. However, without cruise improvements, we made unnecessary stops in some cases (Like the problem 1 you mentioned). Therefore I merged both improvements and updated this PR. Could you please take another look at the PR description? I solved almost all the problems you mentioned and retested scenarios:
After improvements in cruise planning, it was solved. Video: https://youtu.be/64EdnFO_U-Q
For this problem, I tested all the cases. There are five cases and 4 of them were passed. Only the one case whose Ego velocity 30 kph failed. I investigated the cause and I saw that stop planning for that case made sense to me. I checked the collision time margin: time_to_reach_collision_point: 3.00236, time_to_start_cross: 3, time_to_end_cross: 6.2 If the planner does not set a stop, ego and obstacle will crash. Video: https://youtu.be/aCxZ_bDvbHc
It is solved: https://youtu.be/WxU56BZn6Fs Thanks for your efforts again. And, could you review the updated PR again? Also, for Autoware Evaluator could you use the parameters I want to merge with this PR? |
@brkay54 |
@brkay54 |
…ut-in & out Signed-off-by: Berkay Karaman <berkay@leodrive.ai> #8072
…ut-in & out Signed-off-by: Berkay Karaman <berkay@leodrive.ai> #8072
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.
Overall, LGTM. Almost all scenarios in tier4 has passed!!
I've add some comments and could you check the comments?
planning/autoware_obstacle_cruise_planner/config/obstacle_cruise_planner.param.yaml
Show resolved
Hide resolved
const auto & current_obstacle_pose = | ||
obstacle_cruise_utils::getCurrentObjectPose(predicted_object, obj_stamp, now(), true); | ||
obstacle_cruise_utils::getCurrentObjectPose(predicted_object, obj_stamp, now(), false); |
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.
I know this problem, and I think we should care this problem more carefully.
Therefore, could you separate this change from this PR?
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.
Maybe it would be better to create an issue about this problem. I don't know well how to produce the predicted paths when using scenario simulator but I can investigate. What do you think?
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.
Can I ask you to create the issue and solve this problem?
I saw this problem also when using the Psim with use_sim_time:=true
If this problem does not blocking any of your work, I feel we have option to ignore this problem.
...autoware_obstacle_cruise_planner/include/autoware/obstacle_cruise_planner/common_structs.hpp
Outdated
Show resolved
Hide resolved
...autoware_obstacle_cruise_planner/include/autoware/obstacle_cruise_planner/common_structs.hpp
Outdated
Show resolved
Hide resolved
planning/autoware_obstacle_cruise_planner/config/obstacle_cruise_planner.param.yaml
Show resolved
Hide resolved
const auto & current_obstacle_pose = | ||
obstacle_cruise_utils::getCurrentObjectPose(predicted_object, obj_stamp, now(), true); | ||
obstacle_cruise_utils::getCurrentObjectPose(predicted_object, obj_stamp, now(), false); |
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.
Maybe it would be better to create an issue about this problem. I don't know well how to produce the predicted paths when using scenario simulator but I can investigate. What do you think?
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.
Thank you for the great job.
I have no concerns and all tier4 internal tests have passe.
@yuki-takagi-66 -san thank you so much for your effort and suggestions 🙏🏻 . Also, could you approve the PR in Autoware Launch? Also, because I made some critical changes, I would like to be a maintainer of this package. If you and colleagues from the TierIV side don't mind, can I add myself as a maintainer? |
…ut-in & out Signed-off-by: Berkay Karaman <berkay@leodrive.ai>
Signed-off-by: Berkay Karaman <berkay@leodrive.ai> style(pre-commit): autofix
Signed-off-by: Berkay Karaman <berkay@leodrive.ai>
Signed-off-by: Berkay Karaman <berkay@leodrive.ai>
Signed-off-by: Berkay Karaman <berkay@leodrive.ai>
Signed-off-by: Berkay Karaman <berkay@leodrive.ai>
Signed-off-by: Berkay Karaman <berkay@leodrive.ai>
Signed-off-by: Berkay Karaman <berkay@leodrive.ai>
Signed-off-by: Berkay Karaman <berkay@leodrive.ai>
Thank you for your contribution. TierIV would greatly appreciate it if you could become a maintainer. |
…ut-in & out (autowarefoundation#8072) * feat(obstacle_cruise_planner): improve stop and cruise behavior for cut-in & out Signed-off-by: Berkay Karaman <berkay@leodrive.ai> * cleanup, add stop safety margin for transient objects Signed-off-by: Berkay Karaman <berkay@leodrive.ai> style(pre-commit): autofix * fix: debug Signed-off-by: Berkay Karaman <berkay@leodrive.ai> * fix: precommit error Signed-off-by: Berkay Karaman <berkay@leodrive.ai> * fix: unused-variable Signed-off-by: Berkay Karaman <berkay@leodrive.ai> * feat: improve cruise behavior for outside obstacles Signed-off-by: Berkay Karaman <berkay@leodrive.ai> * fix projected velocity, improve transient obstacle behavior Signed-off-by: Berkay Karaman <berkay@leodrive.ai> * feat: add predefined deceleration rate for VRUs Signed-off-by: Berkay Karaman <berkay@leodrive.ai> * feat: update Signed-off-by: Berkay Karaman <berkay@leodrive.ai> --------- Signed-off-by: Berkay Karaman <berkay@leodrive.ai> Signed-off-by: prakash-kannaiah <prakashkanan.pk@gmail.com>
…ut-in & out (autowarefoundation#8072) * feat(obstacle_cruise_planner): improve stop and cruise behavior for cut-in & out Signed-off-by: Berkay Karaman <berkay@leodrive.ai> * cleanup, add stop safety margin for transient objects Signed-off-by: Berkay Karaman <berkay@leodrive.ai> style(pre-commit): autofix * fix: debug Signed-off-by: Berkay Karaman <berkay@leodrive.ai> * fix: precommit error Signed-off-by: Berkay Karaman <berkay@leodrive.ai> * fix: unused-variable Signed-off-by: Berkay Karaman <berkay@leodrive.ai> * feat: improve cruise behavior for outside obstacles Signed-off-by: Berkay Karaman <berkay@leodrive.ai> * fix projected velocity, improve transient obstacle behavior Signed-off-by: Berkay Karaman <berkay@leodrive.ai> * feat: add predefined deceleration rate for VRUs Signed-off-by: Berkay Karaman <berkay@leodrive.ai> * feat: update Signed-off-by: Berkay Karaman <berkay@leodrive.ai> --------- Signed-off-by: Berkay Karaman <berkay@leodrive.ai>
…cut-in & out (autowarefoundation#8072) (#1585) feat(obstacle_cruise_planner): improve stop and cruise behavior for cut-in & out (autowarefoundation#8072) -------- Signed-off-by: Berkay Karaman <berkay@leodrive.ai> Co-authored-by: Berkay Karaman <berkay@leodrive.ai>
Description
To increase the response capacity of the
obstacle_cruise_planner
within the scope of Dense-Urban ODD, we want it to be sensitive to dynamic objects approaching from outside Ego's path and stop if there is a collision risk, as mentioned in the issue.Avoiding unnecessary stopping of Ego in the presence of transient objects that do not pose a risk of collision. To solve these problems and provide a more human-like autonomous driving experience, we needed to improve the stop behavior of the
obstacle_cruise_planner
.We want to improve the cruising behavior for the outside obstacle. If another vehicle in the side lanes is approaching Ego's trajectory, cruise planning starts too late.
Improvement on filtering:
In
obstacle_cruise_planner
, all thePredictedObjects
were filtered if their lateral distance exceeded some small distance limitations. To achieve a behavior determination for PredictedObjects who are away from trajectory but approaching with some velocity, I needed to change the filtering algorithm.With the current implementation, if the predicted object is far away but its perpendicular velocity to the trajectory is high and if it is inside the trajectory within the time parameter
max_lateral_time_margin
, it will be considered as a target obstacle and we can use it for the behavior determination.Improvement on stop behavior:
To handle both transient objects and objects that come to the trajectory that may cause a collision, I divided the stop behavior into two: inside and outside.
For the objects that are inside the trajectory (precise_lat_dist > max_lat_margin_for_stop), we are checking the collision point. If there is a collision point, we are looking object's position when the Ego reaches the collision point. If there is no intersection with the future position, we don't set stop, otherwise set stop.
Improvement on cruising:
To be able to select the vehicles in side lanes who intend to drive through our trajectory, we added a time margin that calculates the time to reach the trajectory. By using this, we can select the vehicles earlier as cruise obstacle.
Related links
Parent Issue:
How was this PR tested?
PR tested by using PSim, however, I am currently working to create some scenarios for a detailed test of this feature. I will upload them into AWF Project asap.
Transient Obstacle Tests:
ocr-transient-obstacle.mp4
Possible Collision Obstacles:
ocr-possible-collision.mp4
Cruising for Vehicles come from side lane:
sidebyside-test.mp4
Notes for reviewers
Please test this PR with the parameters below:
Interface changes
None.
ROS Parameter Changes
Additions and removals
Effects on system behavior
None.