autoware.universe icon indicating copy to clipboard operation
autoware.universe copied to clipboard

feat(mission_planner)!: support ad api

Open isamu-takagi opened this issue 2 years ago • 6 comments

Signed-off-by: Takagi, Isamu [email protected]

Description

Introduce AD API for routing. This PR is the mission planner part of the diagram. Here are the changes for each package:

  • component_interface_specs: Add the internal routing interface definitions.
  • tier4_planning_launch: remove redundant launch file.
  • mission_planner: change mission planner to support AD API.

planning-routing drawio

Related links

https://github.com/autowarefoundation/autoware.universe/pull/1494 https://github.com/autowarefoundation/autoware_msgs/pull/33

Tests performed

  1. Launch the planning simulation.
  2. Check the routing state is UNSET.
  3. Call the set_route_points API (refer to notes).
  4. Check the routing state is SET.
  5. Call the set_route_points API and check if it fails.
  6. Start vehicle driving.
  7. When vehicle goals, check the routing state is ARRIVED.
  8. Call the clear_route API.
  9. Call the set_route API (refer to notes)..

Notes for reviewers

Sample Routes are from this position. Screenshot from 2022-08-02 16-20-43

Sample1 (SetRoutePoints)

ros2 service call /planning/routing/set_route_points  autoware_ad_api_msgs/srv/SetRoutePoints "
header: {stamp: {sec: 1659424851, nanosec: 893215051}, frame_id: map}
goal:
  position: {x: 3835.50, y: 73765.91, z: 0.0}
  orientation: {x: 0.0, y: 0.0, z: -0.52530, w: 0.85091}"

Sample2 (SetRoutePoints)

ros2 service call /planning/routing/set_route_points  autoware_ad_api_msgs/srv/SetRoutePoints "
header: {stamp: {sec: 1659424851, nanosec: 893215051}, frame_id: map}
goal:
  position: {x: 3835.50, y: 73765.91, z: 0.0}
  orientation: {x: 0.0, y: 0.0, z: -0.52530, w: 0.85091}
waypoints:
 - position: {x: 3774.31, y: 73802.53, z: 0.0}
   orientation: {x: 0.0, y: 0.0, z: 0.22214, w: 0.97501}"

Sample1 (SetRoute)

ros2 service call /planning/routing/set_route  autoware_ad_api_msgs/srv/SetRoute "
header: {stamp: {sec: 1659424851, nanosec: 893215051}, frame_id: map}
goal:
  position: {x: 3835.50, y: 73765.91, z: 0.0}
  orientation: {x: 0.0, y: 0.0, z: -0.52530, w: 0.85091}
segments:
- {preferred: {id: 34976, type: lane}, alternatives: []}
- {preferred: {id: 34981, type: lane}, alternatives: []}
- {preferred: {id: 34585, type: lane}, alternatives: []}
- {preferred: {id: 34579, type: lane}, alternatives: []}
- {preferred: {id: 34780, type: lane}, alternatives: []}
- {preferred: {id: 34675, type: lane}, alternatives: []}"

Sample2 (SetRoute)

ros2 service call /planning/routing/set_route  autoware_ad_api_msgs/srv/SetRoute "
header: {stamp: {sec: 1659424851, nanosec: 893215051}, frame_id: map}
goal:
  position: {x: 3835.50, y: 73765.91, z: 0.0}
  orientation: {x: 0.0, y: 0.0, z: -0.52530, w: 0.85091}
segments:
- {preferred: {id: 34976, type: lane}, alternatives: []}
- {preferred: {id: 34981, type: lane}, alternatives: []}
- {preferred: {id: 34636, type: lane}, alternatives: []}
- {preferred: {id: 34564, type: lane}, alternatives: []}
- {preferred: {id: 34495, type: lane}, alternatives: []}
- {preferred: {id: 34507, type: lane}, alternatives: []}
- {preferred: {id: 34795, type: lane}, alternatives: []}
- {preferred: {id: 34606, type: lane}, alternatives: []}
- {preferred: {id: 34672, type: lane}, alternatives: []}
- {preferred: {id: 34675, type: lane}, alternatives: []}"

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.

isamu-takagi avatar Aug 02 '22 06:08 isamu-takagi

Codecov Report

Base: 10.41% // Head: 10.28% // Decreases project coverage by -0.13% :warning:

Coverage data is based on head (0d3534a) compared to base (f659209). Patch coverage: 1.45% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1495      +/-   ##
==========================================
- Coverage   10.41%   10.28%   -0.14%     
==========================================
  Files        1174     1169       -5     
  Lines       83662    83238     -424     
  Branches    19587    19374     -213     
==========================================
- Hits         8712     8559     -153     
- Misses      65411    65412       +1     
+ Partials     9539     9267     -272     
Flag Coverage Δ *Carryforward flag
differential 11.47% <0.42%> (?)
total 10.32% <6.52%> (-0.08%) :arrow_down: Carriedforward from 0b896a1

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
...include/object_detection/object_polygon_detail.hpp 0.00% <ø> (ø)
...e/object_detection/object_polygon_display_base.hpp 0.00% <0.00%> (ø)
...gin/src/object_detection/object_polygon_detail.cpp 0.00% <0.00%> (ø)
...src/object_detection/predicted_objects_display.cpp 0.00% <0.00%> (ø)
...n/src/object_detection/tracked_objects_display.cpp 0.00% <0.00%> (ø)
common/motion_utils/src/marker/marker_helper.cpp 0.00% <0.00%> (ø)
.../src/goal_pose_visualizer/goal_pose_visualizer.cpp 0.00% <ø> (ø)
...n_planner/src/lanelet2_plugins/default_planner.cpp 0.00% <0.00%> (ø)
...planner/src/lanelet2_plugins/utility_functions.cpp 0.00% <ø> (ø)
...on_planner/src/mission_planner/arrival_checker.cpp 0.00% <0.00%> (ø)
... and 192 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Aug 02 '22 08:08 codecov[bot]

@kenji-miyake @yukkysaito @mitsudome-r In this PR, we changed the route topic name to /planning/mission_planning/route (the first name was /planning/routing/route). However, an error has occurred because the name is already used to distribute the HAD map route internally. So I'll change it to /planning/mission_planning/api_route. Or any other suggestions?

isamu-takagi avatar Aug 26 '22 09:08 isamu-takagi

@isamu-takagi I was thinking that we'll replace (or reuse) the existing topic. Would it be possible for you to explain the problem a bit more concretely? :bow:

kenji-miyake avatar Aug 27 '22 05:08 kenji-miyake

@kenji-miyake The existing topic is an implementation-dependent message type HADMapRoute. The new topic is an implementation-independent API message type Route. So it cannot be replaced without forcing the internal implementation nodes to use the API type.

planning-routing-after drawio

isamu-takagi avatar Aug 27 '22 11:08 isamu-takagi

The discussion resulted in this. (API converts messages.) planning-routing-after drawio

isamu-takagi avatar Aug 30 '22 22:08 isamu-takagi

Waiting for https://github.com/autowarefoundation/autoware_msgs/pull/33.

isamu-takagi avatar Aug 30 '22 23:08 isamu-takagi

When I launch the autoware with this PR merged, it fails with the following error:

[component_container-43] [ERROR 1665995713.014441264] [planning.mission_planning.mission_planning_container] OnLoadNode(): Failed to find class with the requested plugin name 'mission_planner::MissionPlannerLanelet2' in the loaded library:(L219)

Is there any PR I need to merge except for these?

https://github.com/autowarefoundation/autoware.universe/pull/1494 https://github.com/autowarefoundation/autoware_msgs/pull/33 https://github.com/autowarefoundation/autoware_adapi_msgs/pull/14

TakaHoribe avatar Oct 17 '22 08:10 TakaHoribe

@TakaHoribe Are you using TIER IV's meta-repository? I'll sync it.

isamu-takagi avatar Oct 18 '22 01:10 isamu-takagi

Are you using TIER IV's meta-repository? I'll sync it.

Yes. Would you make a PR for the autoware_launch?

TakaHoribe avatar Oct 18 '22 02:10 TakaHoribe

Yes. Would you make a PR for the autoware_launch?

@TakaHoribe https://github.com/tier4/autoware_launch/pull/520

isamu-takagi avatar Oct 19 '22 04:10 isamu-takagi