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

feat(mission_planner)!: introduce route_selector node #6363

Conversation

isamu-takagi
Copy link
Contributor

@isamu-takagi isamu-takagi commented Feb 8, 2024

Description

Introduce the route_selector node to the mission_planner package. The route_selector node manages main/mrm routes and makes requests to the mission_planner node. Therefore, now the mission_planner node only needs to plan the current route.

Related links

Tests performed

  1. Merge the dependent PRs.
  2. Launch planning simulator.
  3. Add MrmGoalTool and RouteSelectorPanel to rviz.
  4. Set topic name from rviz tool property panel.
    • 2D Goal Pose: /rviz/route_selector/main/goal
    • Mrm Goal Pose: /rviz/route_selector/mrm/goal
  5. Check if the normal route can be set (use 2D Goal Pose)
  6. Check if the mrm route can be set (use Mrm Goal Pose)
  7. Check if it can return to normal route (push clear button of MRM state)
  8. Check if the mrm route can be set again (use Mrm Goal Pose)
  9. Check if the normal route setting is rejected during MRM (use 2D Goal Pose)

https://evaluation.tier4.jp/evaluation/reports/7d8458ad-5132-5f28-b0b2-1c117bc1b7e6?project_id=prd_jt

Notes for reviewers

simplescreenrecorder-2024-02-08_22.21.30.mp4

Interface changes

Add:

  • /planning/mission_planning/route_selector/main/route
  • /planning/mission_planning/route_selector/main/state
  • /planning/mission_planning/route_selector/mrm/route
  • /planning/mission_planning/route_selector/mrm/state
  • /planning/mission_planning/mission_planner/clear_route
  • /planning/mission_planning/mission_planner/set_lanelet_route
  • /planning/mission_planning/mission_planner/set_waypoint_route
  • /planning/mission_planning/route_selector/main/clear_route
  • /planning/mission_planning/route_selector/main/set_lanelet_route
  • /planning/mission_planning/route_selector/main/set_waypoint_route
  • /planning/mission_planning/route_selector/mrm/clear_route
  • /planning/mission_planning/route_selector/mrm/set_lanelet_route
  • /planning/mission_planning/route_selector/mrm/set_waypoint_route

Type change:

  • /planning/mission_planning/state

Effects on system behavior

The MRM route will no longer be reflected in AD API.

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.

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
@github-actions github-actions bot added component:planning Route planning, decision-making, and navigation. (auto-assigned) component:launch Launch files, scripts and initialization tools. (auto-assigned) labels Feb 8, 2024
@isamu-takagi isamu-takagi changed the title Feat/mission planner route selector feat(mission_planner): introduce route_selector node Feb 8, 2024
@isamu-takagi isamu-takagi changed the title feat(mission_planner): introduce route_selector node feat(mission_planner): introduce route_selector node Feb 8, 2024
@isamu-takagi isamu-takagi changed the title feat(mission_planner): introduce route_selector node feat(mission_planner)!: introduce route_selector node Feb 8, 2024
Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
Copy link
Contributor

@kosuke55 kosuke55 left a comment

Choose a reason for hiding this comment

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

thanks!!! looks very nice!

soblin added a commit to tier4/autoware.universe that referenced this pull request Feb 19, 2024
Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
soblin added a commit to tier4/autoware.universe that referenced this pull request Feb 21, 2024
Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
soblin added a commit to tier4/autoware.universe that referenced this pull request Feb 21, 2024
Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
@isamu-takagi isamu-takagi added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Feb 21, 2024

// During MRM, only change the state.
if (mrm_operating_) {
main_.change_state(now(), RouteState::SET);
Copy link
Contributor

Choose a reason for hiding this comment

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

The snippet main_.change_state(now(), RouteState::SET); is going to be updated to INERRUPTED in this PR or in the future, right ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, updated fa07c4c

// During MRM, only change the state.
if (mrm_operating_) {
main_.change_state(now(), RouteState::SET);
res->status.success = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd appreciate if you could add some NOTE for how to notify the API that the main route is canceled during MRM.

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
Copy link

codecov bot commented Feb 21, 2024

Codecov Report

Attention: 328 lines in your changes are missing coverage. Please review.

Comparison is base (e329fda) 15.24% compared to head (4d67f93) 15.26%.
Report is 26 commits behind head on main.

Files Patch % Lines
...on_planner/src/mission_planner/mission_planner.cpp 0.00% 161 Missing ⚠️
...ion_planner/src/mission_planner/route_selector.cpp 0.00% 143 Missing ⚠️
...sion_planner/src/mission_planner/service_utils.hpp 0.00% 18 Missing ⚠️
...sion_planner/src/mission_planner/service_utils.cpp 0.00% 4 Missing ⚠️
...n_planner/src/lanelet2_plugins/default_planner.cpp 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6363      +/-   ##
==========================================
+ Coverage   15.24%   15.26%   +0.01%     
==========================================
  Files        1816     1819       +3     
  Lines      125147   125245      +98     
  Branches    38188    38263      +75     
==========================================
+ Hits        19075    19114      +39     
- Misses      84684    84706      +22     
- Partials    21388    21425      +37     
Flag Coverage Δ *Carryforward flag
differential 12.95% <0.00%> (?)
total 15.28% <ø> (+0.04%) ⬆️ Carriedforward from e329fda

*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.

@isamu-takagi isamu-takagi merged commit 46612e3 into autowarefoundation:main Feb 21, 2024
22 of 25 checks passed
@isamu-takagi isamu-takagi deleted the feat/mission-planner-route-selector branch February 21, 2024 18:35
StepTurtle pushed a commit to StepTurtle/autoware.universe that referenced this pull request Feb 28, 2024
…tion#6363)

* feat(mission_planner): introduce route_selector node

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* remove unused file

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* fix use goal pose only when resuming

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* fix: change mrm mode if route set is successful

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* add interrupted state

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* fix mrm set route uuid

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* remove unused reference

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* add resume route function

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* try to resume planned route

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* remove debug code

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* use full license text instead of spdx

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

---------

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
HansRobo pushed a commit that referenced this pull request Mar 12, 2024
* feat(mission_planner): introduce route_selector node

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* remove unused file

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* fix use goal pose only when resuming

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* fix: change mrm mode if route set is successful

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* add interrupted state

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* fix mrm set route uuid

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* remove unused reference

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* add resume route function

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* try to resume planned route

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* remove debug code

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* use full license text instead of spdx

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

---------

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
…tion#6363)

* feat(mission_planner): introduce route_selector node

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* remove unused file

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* fix use goal pose only when resuming

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* fix: change mrm mode if route set is successful

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* add interrupted state

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* fix mrm set route uuid

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* remove unused reference

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* add resume route function

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* try to resume planned route

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* remove debug code

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* use full license text instead of spdx

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

---------

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:launch Launch files, scripts and initialization tools. (auto-assigned) 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.

3 participants