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

chore: cherry pick/227 #9

Merged
merged 1 commit into from
Mar 11, 2025
Merged

chore: cherry pick/227 #9

merged 1 commit into from
Mar 11, 2025

Conversation

SakodaShintaro
Copy link

@SakodaShintaro SakodaShintaro commented Mar 11, 2025

Description

cherry-pick

How was this PR tested?

Notes for reviewers

None.

…oundation#227)

* feat: function to smooth the route (see below)

  Description:
    This commit is kind of feature porting from `autoware.universe` as follows
      * Import `PathWithLaneId DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection` from the following `autoware.universe` code
          https://github.com/autowarefoundation/autoware.universe/blob/a0816b7e3e35fbe822fefbb9c9a8132365608b49/planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/default_fixed_goal_planner.cpp#L74-L104
      * Also import all related functions from the `autoware.universe` side

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* style(pre-commit): autofix

* bugs: fix remaining conflicts

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* Update planning/autoware_path_generator/src/utils.cpp

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>

* Update planning/autoware_path_generator/src/utils.cpp

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>

* refactor: as follows

  * Enhance error handlings
  * Remove unused variables
  * Simplify the code
  * Improve readability a little bit

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* style(pre-commit): autofix

* refactor: enhance error handling

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* style(pre-commit): autofix

* bug: fix wrong function declaration in header

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* bug: fix wrong point index calculation

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* bug: remove meaningless comment

  * This comment is wrote because of my misunderstanding

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* fix: apply `pre-commit`

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* fix: smooth path before cropping trajectory points

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* bug: fix shadow variable

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* bug: fix missing parameters for `autoware_path_generator`

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* bug: fix by cpplint

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* style(pre-commit): autofix

* bug: apply missing fix proposed by cpplint

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* style(pre-commit): autofix

* bug: `autoware_test_utils` should be in the `test_depend`

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* fix(autoware_path_generator): add maintainer and author

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* style(pre-commit): autofix

* fix: by pre-commit

  * Sorry, I was forgetting to do this on my local env.

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* fix: smooth path only when a goal point is included

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* bug: do error handling

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* style(pre-commit): autofix

* bug: fix wrong distance calculation

  * The goal position is generally separate from the path points

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* fix: remove sanity check temporary as following reasons

  * CI (especially unit tests) fails due to this sanity check
  * As this is out of scope for this PR, we will fix the bug
    where the start and end are reversed in another PR

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* refactor: fix complexity

  * We should start from the simple one
  * Then we can add the necessary optimization later

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* bug: missing fixes in the include header

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* bug: inconsistent function declaration

  * The type of returned value and arguments were wrong

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>

* Update planning/autoware_path_generator/src/node.cpp

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>

* Update planning/autoware_path_generator/src/utils.cpp

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>

* Update planning/autoware_path_generator/src/utils.cpp

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>

* style(pre-commit): autofix

* fix: apply comment in the following PR

  * autowarefoundation#227 (comment)

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* fix: sorry, I was missing one comment to be applied

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* style(pre-commit): autofix

* bug: fix wrong goal point interpolation

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* feat: add test case (goal on left side)

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* bug: fix as follows

  * Prevent name duplication (path_up_to_just_before_pre_goal)
  * Fix missing left/right bound
  * Goal must have zero velocity
  * Improve readability
  * Other minor fixes

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* bug: fix duplicated zero velocity set

  * Zero velocity is set after the removed lines by this commit

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* feat: add one test case (goal on left side)

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* Update planning/autoware_path_generator/src/utils.cpp

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>

* fix: apply comment from reviewer

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* fix(package.xml): update maintainer for the following packages

  * `autoware_planning_test_manager`
  * `autoware_test_utils`

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* Update planning/autoware_path_generator/src/node.cpp

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>

* Update planning/autoware_path_generator/src/utils.cpp

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

Co-authored-by: Mitsuhiro Sakamoto <50359861+mitukou1109@users.noreply.github.com>

* Update planning/autoware_path_generator/src/utils.cpp

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

Co-authored-by: Mitsuhiro Sakamoto <50359861+mitukou1109@users.noreply.github.com>

* bug: fix missing header in the path

  * This finally causes an issue that the vehicle cannot engage

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* bug: fix an issue that smooth connection does not work

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* refactor: simplify code

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* bug: fix wrong pose at the goal (see below)

  * If we return nullopt here, the original path
    whose goal position is located at the center line is used.
  * Unless far from the goal point, the path becomes smoothed one
    whose goal position is located at the side of road correctly.
  * But as the goal approaches very closely, the goal position is
    shifted from smoothed one to the original one
  * Thus, the goal pose finally becomes wrong due to the goal position shift

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* refactor: no need this line here

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* style(pre-commit): autofix

* bug: fix so we follow the provided review comments

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* bug: sorry, this is unsaved fix, ...

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* cosmetic: fix wrong comment

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* bug: unused function `get_goal_lanelet()` remaining

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* bug: carefully handle the pre goal velocity

  * It seems zero pre goal velocity makes scenario fail
      - We need to insert appropriate velocity for pre goal

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

* Update planning/autoware_path_generator/src/utils.cpp

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>

* Update planning/autoware_path_generator/src/utils.cpp

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>

* style(pre-commit): autofix

---------

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>
Co-authored-by: Mitsuhiro Sakamoto <50359861+mitukou1109@users.noreply.github.com>
@SakodaShintaro SakodaShintaro added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Mar 11, 2025
@SakodaShintaro SakodaShintaro self-assigned this Mar 11, 2025
Copy link

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@SakodaShintaro SakodaShintaro merged commit 7a61c59 into beta/v0.42 Mar 11, 2025
22 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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