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(start_planner): issue when ego does not straddle lane bounds and starts from 0 speed #7004

Conversation

danielsanchezaran
Copy link
Contributor

Description

When the ego vehicle is starting from a road and not the shoulder lane, it is possible that the blinkers are not properly activated.
This is caused by 2 things:

  1. The check for lane bound straddling (crossing a lane bound) is failed. This check is not necessary when doing a pull out because we should turn on the blinkers anyways.
  2. The shift is small and the ego is stopped. This happens because the ego is starting from complete stop so its speed is close to 0 and if the shift pull out lane is small/has a small shift, the blinkers are ignored, which is not desired in this case.

To solve the issue I added an override for the first check if the ego is doing a pullout, and for the second issue I slightly modified the variable status_.first_engaged_and_driving_forward_time to only be initialized when the ego vehicle has surpassed a minimum threshold velocity.

Related links

Ticket: TIER IV COMPANY INTERNAL LINK

Tests performed

PSim

cap-.2024-05-14-11-41-18.mp4

Notes for reviewers

Interface changes

ROS Topic Changes

ROS Parameter Changes

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.

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label May 14, 2024
@danielsanchezaran danielsanchezaran changed the title fix(start_planner) issue when ego does not straddle lane bounds and starts from 0 speed fix(start_planner): issue when ego does not straddle lane bounds and starts from 0 speed May 14, 2024
@danielsanchezaran danielsanchezaran marked this pull request as ready for review May 14, 2024 03:34
@danielsanchezaran danielsanchezaran added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label May 14, 2024
if (
planner_data_->operation_mode->mode == OperationModeState::AUTONOMOUS &&
status_.driving_forward && !status_.first_engaged_and_driving_forward_time) {
status_.driving_forward && !status_.first_engaged_and_driving_forward_time &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you keep this condition as before, and

const bool override_ego_stopped_check = std::invoke([&]() {
if (!status_.first_engaged_and_driving_forward_time) {
Copy link
Contributor

@soblin soblin May 14, 2024

Choose a reason for hiding this comment

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

and change this condition to needToPrepareBlinkerBeforeStratDrivingForward() or (ego_velocity > moving_velocity_threshold) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@soblin I cannot check the current speed, I need a check that tells me if at some point in the PAST the ego has moved faster than the threshold speed. So this approach cannot work.

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
@danielsanchezaran danielsanchezaran merged commit d0cfc9a into autowarefoundation:main May 15, 2024
20 of 22 checks passed
@danielsanchezaran danielsanchezaran deleted the fix/start-planner-blinkers-when-starting branch May 15, 2024 03:13
danielsanchezaran added a commit to tier4/autoware.universe that referenced this pull request May 15, 2024
…starts from 0 speed (autowarefoundation#7004)

* fix issue when ego does not straddle lane bounds and starts from 0 speed

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add new status for ego departed

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

---------

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
shmpwk pushed a commit to tier4/autoware.universe that referenced this pull request May 15, 2024
#1299)

fix(start_planner): issue when ego does not straddle lane bounds and starts from 0 speed (autowarefoundation#7004)

* fix issue when ego does not straddle lane bounds and starts from 0 speed



* add new status for ego departed



---------

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
vividf pushed a commit to vividf/autoware.universe that referenced this pull request May 16, 2024
…starts from 0 speed (autowarefoundation#7004)

* fix issue when ego does not straddle lane bounds and starts from 0 speed

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add new status for ego departed

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

---------

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
…starts from 0 speed (autowarefoundation#7004)

* fix issue when ego does not straddle lane bounds and starts from 0 speed

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add new status for ego departed

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

---------

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
satoshi-ota pushed a commit to tier4/autoware.universe that referenced this pull request Jun 6, 2024
…starts from 0 speed (autowarefoundation#7004)

* fix issue when ego does not straddle lane bounds and starts from 0 speed

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

* add new status for ego departed

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>

---------

Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
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.

3 participants