Skip to content

feat(autoware_behavior_path_side_shift_module): accept service inputs and add publisher to inform the current shift length#12474

Open
TaikiYamada4 wants to merge 9 commits intoautowarefoundation:mainfrom
TaikiYamada4:feat/make_side_shift_callable_from_service
Open

feat(autoware_behavior_path_side_shift_module): accept service inputs and add publisher to inform the current shift length#12474
TaikiYamada4 wants to merge 9 commits intoautowarefoundation:mainfrom
TaikiYamada4:feat/make_side_shift_callable_from_service

Conversation

@TaikiYamada4
Copy link
Copy Markdown
Contributor

@TaikiYamada4 TaikiYamada4 commented Apr 13, 2026

Description

The side_shift module of the autoware_behavior_path_planner is somewhat a special module that is outside the frame of Dynamic Driving Tasks (DDT) because this module is aimed to modify the path laterally by a human hand.

Currently this feature obtains its shift length from a topic, however this will not tell the operator to know whether the requested shift_length is successfully received or not. Hence, this PR adds a new service to autoware_behavior_path_side_shift_module.

In addition the newly implemented service not only accepts direct shift length, but also adds a new shift mode that can send whether to go left or right. If this shift mode is selected the vehicle will shift its path with the shift length stated in the unit_shift_amount parameter. This unit shift will be accumulated as the shift request with the same direction has come.

Related links

How was this PR tested?

  • Tested that colcon test passes.
  • Tested that the expected behavior is shown. (Look the video below)
side_shift_service-2026-04-06_11.01.08.mp4
Time What is happening
0:00 - 0:13 The publisher constantly publishing the current lateral offset
0:14 - 0:19 Called the service in RAW_VALUE mode with 1.0 meter
0:20 - 0:31 Called the service in RAW_VALUE mode with -1.0 meter
0:32 - 0:40 Called the service in DIRECTION mode and select RESET(=0)
0:41 - 0:49 Called the service in DIRECTION mode and select LEFT(=1) several times. This shifts the path 0.1 meter each
0:50 - 0:52 RESET again
0:53 - 1:02 Called the service in DIRECTION mode and select RIGHT(=2) several times. This shifts the path 0.1 meter each
1:02 - 1:05 RESET again
1:06 - 1:15 Called the service in RAW_VALUE mode with 3.0 meters but the request declined since it exceeds threshold.

Notes for reviewers

I've moved the lateral_offset subscriber to the side_shift module to

  • Handle the requested_lateral_offset_ from both topic and service correctly
  • Try not to edit the planner_data_ from the module side
  • In the name of modularity

Therefore, the lateral_offset field is removed from the planner_data_.

Besides, the current CI doesn't pass because the srv type must be merged first

Interface changes

Topic changes

Additions and removals

Change type Topic Type Topic Name Message Type Description
Added Srv ~/set_lateral_offset tier4_planning_msgs/SetLateralOffset Set the lateral offset, or select LEFT, RIGHT, RESET to shift. See for further explanation.
Added Pub ~/output/lateral_offset tier4_planning_msgs/LateralOffset The current lateral_offset (in meters)

ROS Parameter Changes

Additions and removals

Change type Parameter Name Type Default Value Description
Added max_shift_magnitude double 1.0 [m] Maximum shift length the side_shift module can perform for safety reasons
Added min_shift_gap double 0.001 [m] Minimum gap that the previous lateral offset and the current lateral offset can have in order not to have a very small shift path
Added unit_shift_amount double 0.1 [m] The shift length once a LEFT or RIGHT command is requested from the set_lateral_offset service.

Effects on system behavior

  1. The autoware_behavior_path_side_shift_module accepts ROS 2 service inputs
  2. The side shift module will not shift the path more than max_shift_magnitude meters

…vior_path_planner and autoware_behavior_path_planner_common

Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>
…n for lateral_offset inputs

Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>
Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Apr 13, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 13, 2026

Thank you for contributing to the Autoware project!

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

Please ensure:

@TaikiYamada4 TaikiYamada4 changed the title Feat/make side shift callable from service feat(autoware_behavior_path_side_shift_module): accept service inputs and add publisher to inform the current shift length Apr 13, 2026
Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>
@TaikiYamada4 TaikiYamada4 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Apr 14, 2026
Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>
@github-actions github-actions bot added the type:documentation Creating or refining documentation. (auto-assigned) label Apr 14, 2026
…us codes in README

Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>
Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>
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) type:documentation Creating or refining documentation. (auto-assigned)

Projects

Status: To Triage

Development

Successfully merging this pull request may close these issues.

1 participant