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(obstacle_cruise)!: type specified stop deccel limit and enabling abandon to stop #7121

Merged
merged 2 commits into from
Jun 7, 2024

Conversation

yuki-takagi-66
Copy link
Contributor

@yuki-takagi-66 yuki-takagi-66 commented May 24, 2024

Description

New feature to use type specified parameters for stop planning
Until now, the deceleration limit for stopping has been a value that does not depend on the type of object (currently, -2.5, which is set in common_param). In addition, although the deceleration limit may postpone the stop position, it does not change the stop decision itself.

This PR provides two additional features.
The first is to allow the deceleration limit to be set for each object type. For unknown objects, we put the default value to stop at “loose deceleration.”
The other is a function that abandons the decision to stop when a collision cannot be prevented while maintaining the deceleration limit. This function is disabled for all object types by default. I believe that it can be enabled only after careful consideration and only for unknown objects.

Screencast from 05-28-2024 04:57:55 PM.webm
abandon to stop against bus with the parameters

bus.limit_min_acc: -1.0
bus.abandon_to_stop: true

Screencast from 05-28-2024 05:01:58 PM.webm
Multiple stop objects can be handled appropriately

Related links

launch PR: autowarefoundation/autoware_launch#1003

Tests performed

psim and tier4 internal tests

Notes for reviewers

Interface changes

ROS Topic Changes

none

ROS Parameter Changes

see the file changes and comments

Effects on system behavior

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.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

@yuki-takagi-66 yuki-takagi-66 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label May 24, 2024
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label May 24, 2024
@yuki-takagi-66 yuki-takagi-66 changed the title Abandon to stop feat(obstaclecruise): type specified stop deccel limit and enabling abandon to stop May 28, 2024
@yuki-takagi-66 yuki-takagi-66 changed the title feat(obstaclecruise): type specified stop deccel limit and enabling abandon to stop feat(obstaclecruise)!: type specified stop deccel limit and enabling abandon to stop May 28, 2024
@yuki-takagi-66 yuki-takagi-66 changed the title feat(obstaclecruise)!: type specified stop deccel limit and enabling abandon to stop feat(obstacle_cruise)!: type specified stop deccel limit and enabling abandon to stop May 28, 2024
@yuki-takagi-66 yuki-takagi-66 marked this pull request as ready for review May 29, 2024 04:06
@yuki-takagi-66 yuki-takagi-66 removed the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label May 30, 2024
Comment on lines 220 to 236
stop:
type_specified_params:
use_type_specified_params: # If true, the node try to read the following type specified values
unknown: true
car: false
truck: false
bus: false
trailer: false
motorcycle: false
bicycle: false
pedestrian: false
limit_min_acc: # overwrite the deceleration limit, in usually, common_param.yaml/limit.min_acc is referred.
unknown: -1.0
limit_max_dist:
unknown: 50.0
abandon_to_stop: # If true, the planner gives up to stop when it cannot avoid a collision while maintaining the deceleration limit.
unknown: false
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to list down parameters depending on the object type as parameters of slow_down ?

}
}
}
std::string getParamType(ObjectClassification label)
Copy link
Contributor

Choose a reason for hiding this comment

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

Add const reference to the argument, and const to the function. Please check other functions as well.

if (current_closest_stop_obstacle) {
prev_closest_stop_obstacle_ptr_ =
std::make_shared<StopObstacle>(*current_closest_stop_obstacle);
static std::vector<StopObstacle> prev_closest_stop_obstacles{};
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason to use static variables?
I actually am not 100% confident, but I feel they should be avoided.
https://stackoverflow.com/questions/7026507/why-are-static-variables-considered-evil

Signed-off-by: Yuki Takagi <[email protected]>
Signed-off-by: Yuki Takagi <[email protected]>
@yuki-takagi-66 yuki-takagi-66 merged commit 565589c into autowarefoundation:main Jun 7, 2024
21 of 23 checks passed
@yuki-takagi-66 yuki-takagi-66 deleted the abandon_to_stop branch June 7, 2024 08:58
KhalilSelyan pushed a commit that referenced this pull request Jul 22, 2024
… abandon to stop (#7121)

* add abandon function

Signed-off-by: Yuki Takagi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:planning Route planning, decision-making, and navigation. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants