Package Summary
Tags | No category tags. |
Version | 1.1.0 |
License | Apache License 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Description | |
Checkout URI | https://github.com/autowarefoundation/autoware_core.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-06-07 |
Dev Status | UNKNOWN |
CI status | No Continuous Integration |
Released | UNRELEASED |
Tags | planner ros calibration self-driving-car autonomous-driving autonomous-vehicles ros2 3d-map autoware |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Satoshi Ota
- Takayuki Murooka
- Mitsuhiro Sakamoto
- Kosuke Takeuchi
- Junya Sasaki
Authors
- Satoshi Ota
- Takayuki Murooka
- Mitsuhiro Sakamoto
- Kosuke Takeuchi
- Junya Sasaki
Path Generator
The path_generator
node receives a route from mission_planner
and converts the center line into a path.
If the route has waypoints set, it generates a path passing through them.
This package is a simple alternative of behavior_path_generator
.
Path generation
When input data is ready, it first searches for the lanelet closest to the vehicle.
If found, it gets the lanelets within a distance of path_length.backward
behind and path_length.forward
in front.
Their center lines are concatenated to generate a path.
If waypoints exist in the route, it replaces the overlapped segment of the center line with them. The overlap interval is determined as shown in the following figure.
Path cut
If there is a self-intersection on either of the path bounds, the path is cut off a specified distance before the first intersection, as shown in the following figure (path: green, bound: blue).
Depending on the crossing angle, the return path’s bound may be closer to the centerline than the outward’s one, depicted in the diagram below. To deal with this, intersections of the left and right bounds (mutual intersection) are taken into account as well, and the path is cut at the nearest intersecting point.
Furthermore, in the case of the following figure, the return path goes inside even if mutual intersection is considered. Therefore, path cut is also made when the start edge of the path and the path bounds intersect.
Turn signal
Turn signal is determined based on the rules defined for behavior_path_planner. (See here for details)
As a general rule, the turn signal is turned on at a specified distance before the lanelet in which a turn is designated, and turned off when the driving direction has changed to the specified degree.
If consecutive turns are required, the turn signal corresponding to the required section or the last section takes precedence.
Hazard signal
This node always publishes a hazard signal of autoware_vehicle_msgs::msg::HazardLightsCommand::NO_COMMAND
.
Flowchart
@startuml
title run
start
:take_data;
:set_planner_data;
if (is_data_ready) then (yes)
else (no)
stop
endif
group plan_path
group generate_path
:update_current_lanelet;
:get lanelets within route;
if (path bounds have intersections?) then (yes)
:align path end with intersection point;
endif
while (path end is outside range of lanelets?)
:extend lanelets forward;
endwhile
while (path start is outside range of lanelets?)
:extend lanelets backward;
endwhile
if (any waypoint interval starts behind lanelets?) then (yes)
:extend lanelets backward;
endif
while (for each center line point)
if (overlapped by waypoint group?) then (yes)
if (previously overlapped?) then
else (no)
:add waypoints to path;
endif
else (no)
:add point to path;
endif
endwhile
:crop path;
if (goal is in search range for smooth goal connection?) then (yes)
:modify_path_for_smooth_goal_connection;
endif
:set path bounds;
end group
end group
group get_turn_signal
while (for each path point)
if (turn direction is set to corresponding lanelet?) then (yes)
if (ego is in front of lanelet?) then (yes)
if (distance to lanelet < turn_signal_distance?) then (yes)
:return turn signal;
endif
else (no)
if (ego passed required section?) then (yes)
:return turn signal;
endif
endif
endif
endwhile
end group
:publish turn signal;
:publish hazard signal;
:publish path;
stop
@enduml
Input topics
Name | Type | Description |
---|---|---|
~/input/odometry |
nav_msgs::msg::Odometry |
ego pose |
~/input/vector_map |
autoware_map_msgs::msg::LaneletMapBin |
vector map information |
~/input/route |
autoware_planning_msgs::msg::LaneletRoute |
current route from start to goal |
Output topics
Name | Type | Description | QoS Durability |
---|---|---|---|
~/output/path |
autoware_internal_planning_msgs::msg::PathWithLaneId |
generated path | volatile |
~/output/turn_indicators_cmd |
autoware_vehicle_msgs::msg::TurnIndicatorsCommand |
turn signal | volatile |
~/output/hazard_lights_cmd |
autoware_vehicle_msgs::msg::HazardLightsCommand |
hazard signal | volatile |
Parameters
{{ json_to_markdown(“planning/autoware_path_generator/schema/path_generator.schema.json”) }}
In addition, the following parameters should be provided to the node:
Changelog for package autoware_path_generator
1.1.0 (2025-05-01)
- fix(path_generator): set both lane IDs to point on border of adjacent lanes (#384) set both lane IDs to point on border of adjacent lanes
- feat(path_generator): move generate_path public
(#380)
- feat(path_generator): move generate_path public
- style(pre-commit): autofix
- fix pre-commit
* fix test include path ---------Co-authored-by: t4-adc <<grp-rd-1-adc-admin@tier4.jp>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]\@users.noreply.github.com>
- refactor(autoware_trajectory)!: move everything to namespace experimetal (#371) refactor(autoware_trajectory)!: move everything to namespace experimental
- test(path_generator): add tests for path cut feature
(#268)
- add map for test
- add overpass map
- refactor & enhance base test class
- add tests
- style(pre-commit): autofix
* fix year created Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>
- anonymize test map
- style(pre-commit): autofix
- add test map info to README
- style(pre-commit): autofix
- make tests work with autoware_trajectory
- include necessary header
- fix test case
* style(pre-commit): autofix ---------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: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>
- fix(path_generator): deal with unintended input
(#336)
- prevent segfault
- fix self-intersection search range
- define behavior for unintended input
- prevent segfault
* check builder output instead of input size ---------
- refactor(path_generator): avoid using fixed-size array
(#353)
- avoid using fixed-size array
- include necessary headers
* avoid capturing structured bindings in lambdas ---------
- docs(path_generator): add description of path cut & turn signal
feature
(#359)
- add diagrams of path cut feature
- add diagrams of turn signal feature
- update parameter list
- update README
* style(pre-commit): autofix ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]\@users.noreply.github.com>
- fix(path_generator): avoid shortcuts at overlaps
(#352)
- track current lane to avoid shortcut
* add constraints for current lane search ---------
- feat(autoware_path_generator): use autoware_trajectory for cropping bounds (#349)
- Contributors: Kazunori-Nakajima, Mamoru Sobue, Mitsuhiro Sakamoto, Yukinari Hisaki
1.0.0 (2025-03-31)
- test(autoware_path_generator): add turn signal RequiredEndPoint position test (#323) test(autoware_path_generator): add RequiredEndPoint position test
- test(path_generator): add tests for turn signal activation feature
(#253)
- add tests
- style(pre-commit): autofix
* Update planning/autoware_path_generator/test/test_turn_signal.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>> ---------Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]\@users.noreply.github.com> Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>> Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>
- fix(autoware_path_generator): remove redundant move (#318) Remove redundant move
- fix(path_generator): fix path bound generation for overlapped lanes
(#285)
- fix path bound generation for overlapped lanes
- check for intersection between start edge of drivable area and path bounds
- fix start edge intersection search
- temporarily disuse autoware_trajectory
- check intersection between start edge of drivable area and center line
- fix get_first_self_intersection_arc_length idx
- fix redundantInitialization
* fix structure bindings for clang-tidy ---------Co-authored-by: kosuke55 <<kosuke.tnp@gmail.com>>
- Contributors: Kosuke Takeuchi, Mitsuhiro Sakamoto, Shane Loretz
0.3.0 (2025-03-21)
- chore: fix versions in package.xml
- chore: rename from [autoware.core]{.title-ref} to [autoware_core]{.title-ref} (#290)
- feat: adaptation to ROS nodes guidelines about directory structure (#272)
- fix(path_generator): fix path bound generation (#267) fix path bound generation
- feat(autoware_path_generator): function to smooth the path
(#227)
* feat: function to smooth the route (see below) Description: This
commit is kind of feature porting from
[autoware.universe]{.title-ref} as follows
* Import [PathWithLaneId
DefaultFixedGoalPlanner::modifyPathForSmoothGoalConnection]{.title-ref}
from the following [autoware.universe]{.title-ref} 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]{.title-ref} side
- style(pre-commit): autofix
- bugs: fix remaining conflicts
* Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>> * Update planning/autoware_path_generator/src/utils.cpp 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
- style(pre-commit): autofix
- refactor: enhance error handling
- style(pre-commit): autofix
- bug: fix wrong function declaration in header
- bug: fix wrong point index calculation
- bug: remove meaningless comment
- This comment is wrote because of my misunderstanding
- fix: apply [pre-commit]{.title-ref}
- fix: smooth path before cropping trajectory points
- bug: fix shadow variable
- bug: fix missing parameters for [autoware_path_generator]{.title-ref}
- bug: fix by cpplint
- style(pre-commit): autofix
- bug: apply missing fix proposed by cpplint
- style(pre-commit): autofix
- bug: [autoware_test_utils]{.title-ref} should be in the [test_depend]{.title-ref}
- fix(autoware_path_generator): add maintainer and author
- style(pre-commit): autofix
- fix: by pre-commit
- Sorry, I was forgetting to do this on my local env.
- fix: smooth path only when a goal point is included
- bug: do error handling
- style(pre-commit): autofix
- bug: fix wrong distance calculation
- The goal position is generally separate from the path points
- 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
- refactor: fix complexity
- We should start from the simple one
- Then we can add the necessary optimization later
- bug: missing fixes in the include header
- bug: inconsistent function declaration
- The type of returned value and arguments were wrong
* Update planning/autoware_path_generator/include/autoware/path_generator/common_structs.hpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>> * Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>> * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>> * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>
- style(pre-commit): autofix
- fix: apply comment in the following PR
- https://github.com/autowarefoundation/autoware.core/pull/227#discussion_r1986045016
- fix: sorry, I was missing one comment to be applied
- style(pre-commit): autofix
- bug: fix wrong goal point interpolation
- feat: add test case (goal on left side)
- 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
- bug: fix duplicated zero velocity set
- Zero velocity is set after the removed lines by this commit
- feat: add one test case (goal on left side)
* Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>>
- fix: apply comment from reviewer
- fix(package.xml): update maintainer for the following packages
- [autoware_planning_test_manager]{.title-ref}
- [autoware_test_utils]{.title-ref}
* Update planning/autoware_path_generator/src/node.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>> * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Mitsuhiro Sakamoto <<50359861+mitukou1109@users.noreply.github.com>> * Update planning/autoware_path_generator/src/utils.cpp 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
- bug: fix an issue that smooth connection does not work
- refactor: simplify code
- 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
- refactor: no need this line here
- style(pre-commit): autofix
- bug: fix so we follow the provided review comments
- bug: sorry, this is unsaved fix, ...
- cosmetic: fix wrong comment
- bug: unused function [get_goal_lanelet()]{.title-ref} remaining
- 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
* Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>> * Update planning/autoware_path_generator/src/utils.cpp Co-authored-by: Kosuke Takeuchi <<kosuke.tnp@gmail.com>> * style(pre-commit): autofix ---------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>>
- feat(path_generator): publish hazard signal (#252) publish hazard signal (no command)
- fix(path_generator): set current pose appropriately in test (#250) set start pose of route as current pose
- feat(path_generator): add turn signal activation feature
(#220)
* add path_generator package fix spell check error include
necessary headers change package version to 0.0.0 Co-authored-by:
Yutaka Kondo <<yutaka.kondo@youtalk.jp>> fix include guard name
Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>> replace
flowchart uml with pre-generated image Co-authored-by: Yutaka Kondo
<<yutaka.kondo@youtalk.jp>> style(pre-commit): autofix replace
tier4_planning_msgs with autoware_internal_planning_msgs
style(pre-commit): autofix use LaneletSequence instead of
ConstLanelets set orientation to path points crop path bound to fit
trajectory offset path bound no need to make return value optional
address deprecation warning add doxygen comments support multiple
previous/next lanelets fix path bound cut issue group parameters add
turn signal activation feature fix turn direction check process
consider required end point keep turn signal activated until
reaching desired end point if without conflicts add missing
parameters
- add include
- use trajectory class
* minor change ---------Co-authored-by: mitukou1109 <<mitukou1109@gmail.com>>
- test(path_generator): add tests
(#215)
- test(path_generator): add tests
- add tests
- adapt test to new test manager
- migrate to autoware_internal_planning_msgs
* use intersection map for unit tests ---------fix pre-commit fix pre-commit * Update planning/autoware_path_generator/test/test_path_generator_node_interface.cpp Co-authored-by: Satoshi OTA <<44889564+satoshi-ota@users.noreply.github.com>> * fix for latest ---------Co-authored-by: Mitsuhiro Sakamoto <<50359861+mitukou1109@users.noreply.github.com>> Co-authored-by: Satoshi OTA <<44889564+satoshi-ota@users.noreply.github.com>>
- feat(path_generator): add path cut feature
(#216)
* feat(path_generator): add path cut feature add path_generator
package fix spell check error include necessary headers change
package version to 0.0.0 Co-authored-by: Yutaka Kondo
<<yutaka.kondo@youtalk.jp>> fix include guard name Co-authored-by:
Yutaka Kondo <<yutaka.kondo@youtalk.jp>> replace flowchart uml
with pre-generated image Co-authored-by: Yutaka Kondo
<<yutaka.kondo@youtalk.jp>> style(pre-commit): autofix replace
tier4_planning_msgs with autoware_internal_planning_msgs
style(pre-commit): autofix use LaneletSequence instead of
ConstLanelets set orientation to path points crop path bound to fit
trajectory offset path bound no need to make return value optional
address deprecation warning add doxygen comments support multiple
previous/next lanelets fix path bound cut issue group parameters add
path cut feature ensure s_end is not negative simplify return value
selection add doxygen comments
- ignore makeIndexedSegmenTree from spell check
* delete comments from cspell for pre-commit ---------Co-authored-by: mitukou1109 <<mitukou1109@gmail.com>>
- feat(path_generator): add path_generator package
(#138)
- add path_generator package
- fix spell check error
- include necessary headers
* change package version to 0.0.0 Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>> * fix include guard name Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>> * replace flowchart uml with pre-generated image Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>>
- style(pre-commit): autofix
- replace tier4_planning_msgs with autoware_internal_planning_msgs
- style(pre-commit): autofix
- use LaneletSequence instead of ConstLanelets
- set orientation to path points
- crop path bound to fit trajectory
- offset path bound
- no need to make return value optional
- address deprecation warning
- add doxygen comments
- support multiple previous/next lanelets
- fix path bound cut issue
- group parameters
- use autoware_utils
- test(path_generator): add tests (#1)
- add tests
- adapt test to new test manager
- migrate to autoware_internal_planning_msgs
* use intersection map for unit tests ---------
- fix pre-commit
- fix pre-commit
* Revert "fix pre-commit" This reverts commit 9b3ae3e93c826f571101203f2b0defc5e238741b. Revert "fix pre-commit" This reverts commit 6a3c5312920ba4551ced5247674209318b31c657. Revert "test(path_generator): add tests (#1)" This reverts commit 7773976d3651e7e3b0b12f405f800abebfb6abe8. ---------Co-authored-by: Yutaka Kondo <<yutaka.kondo@youtalk.jp>> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]\@users.noreply.github.com> Co-authored-by: kosuke55 <<kosuke.tnp@gmail.com>>
- Contributors: Junya Sasaki, Kosuke Takeuchi, Mitsuhiro Sakamoto, NorahXiong, Yutaka Kondo, mitsudome-r