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(freespace_planner): fix motion_velocity_smoother error while parking #6713

Conversation

ahmeddesokyebrahim
Copy link
Contributor

Description

fixes #6379

Related links

This PR is one of group of PRs that aim to fix Autoware logging system to achieve the goal of reducing excessive error and warning logs on Autoware launch.

Part of:

Tests performed

Notes for reviewers

Root Cause

  • freespace_planner publishes a stop trajectory with 1 point, that is happening only in first parking cycle (that is why the error is not throttling and occurring only once)
  • motion_velocity_smoother subscribes to this trajectory and does checkData() on it.
  • When it finds the trajectory has points less than 2, motion_velocity_smoother logs the mentioned error and discards the trajectory.

Proposed Solution

  • Generating a stop trajectory in first parking cycle is not needed, as the vehicle already stops before actually starting parking.
  • I propose adding new flag is_new_parking_cycle_ which is set by true with every new route planned for parking.
  • When it comes to new parking route, the flag prevents freespace_planner to publish stop trajectory.
  • In further cycles, freespace_planner can generate stop trajectory before re-planning whenever needed.

Interface changes

N.A

Effects on system behavior

The error mentioned in #6379 is no longer occuring.

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.

@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Mar 29, 2024
@ahmeddesokyebrahim ahmeddesokyebrahim force-pushed the autoware/universe/6379-fix-motion-velocity-smoother-parking-error branch 3 times, most recently from 023cfb3 to 28612c6 Compare March 29, 2024 14:53
@ahmeddesokyebrahim ahmeddesokyebrahim added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Mar 29, 2024
Copy link

codecov bot commented Mar 29, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 14.94%. Comparing base (dd19bb8) to head (579bda0).
Report is 3 commits behind head on main.

❗ Current head 579bda0 differs from pull request most recent head 01bfb5a. Consider uploading reports for the commit 01bfb5a to get more accurate results

Files Patch % Lines
...r/src/freespace_planner/freespace_planner_node.cpp 50.00% 1 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6713      +/-   ##
==========================================
- Coverage   14.99%   14.94%   -0.06%     
==========================================
  Files        1972     1939      -33     
  Lines      136468   133678    -2790     
  Branches    42300    39757    -2543     
==========================================
- Hits        20470    19979     -491     
+ Misses      93248    91456    -1792     
+ Partials    22750    22243     -507     
Flag Coverage Δ *Carryforward flag
differential 31.67% <50.00%> (?)
total 14.94% <ø> (-0.06%) ⬇️ Carriedforward from 031c873

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ahmeddesokyebrahim ahmeddesokyebrahim force-pushed the autoware/universe/6379-fix-motion-velocity-smoother-parking-error branch from 579bda0 to 67527e5 Compare April 25, 2024 03:17
@mehmetdogru
Copy link
Contributor

@takayuki5168

Could you assign somebody to review this PR?

…one point in a new parking cycle

Signed-off-by: AhmedEbrahim <ahmed.a.d.ebrahim@gmail.com>

fix(freespace_planner): prevent publishing stop trajectory with only one point in a new parking cycle

Signed-off-by: Ahmed Ebrahim <ahmed.ebrahim@leodrive.ai>
…han or equal 1 after first cycle - fixing unit test issue.

Signed-off-by: AhmedEbrahim <ahmed.a.d.ebrahim@gmail.com>
@ahmeddesokyebrahim ahmeddesokyebrahim force-pushed the autoware/universe/6379-fix-motion-velocity-smoother-parking-error branch from 67527e5 to 01bfb5a Compare May 9, 2024 08:50
Copy link
Contributor

@takayuki5168 takayuki5168 left a comment

Choose a reason for hiding this comment

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

Sorry to be late, and thank you for your contribution!

@ahmeddesokyebrahim ahmeddesokyebrahim merged commit 010965b into autowarefoundation:main May 9, 2024
20 of 22 checks passed
vividf pushed a commit to vividf/autoware.universe that referenced this pull request May 16, 2024
…ing (autowarefoundation#6713)

* fix(freespace_planner): prevent publishing stop trajectory with only one point in a new parking cycle
---------
Signed-off-by: Ahmed Ebrahim <ahmed.ebrahim@leodrive.ai>
Signed-off-by: vividf <yihsiang.fang@tier4.jp>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
…ing (autowarefoundation#6713)

* fix(freespace_planner): prevent publishing stop trajectory with only one point in a new parking cycle
---------
Signed-off-by: Ahmed Ebrahim <ahmed.ebrahim@leodrive.ai>
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.

motion_velocity_smoother Error Message while Parking
3 participants