forked from autowarefoundation/autoware.core
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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>
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
kosuke55
approved these changes
Mar 11, 2025
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)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
cherry-pick
How was this PR tested?
planning_simulator
with sample_maplogging_simulator
with sample_rosbaglogging_simulator
with awsim_gt_data(TIER IV INTERNAL)e2e_simulator
with AWSIM v1.3.1Notes for reviewers
None.