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(operation_mode_transition_manager): support ad api #1535

Conversation

isamu-takagi
Copy link
Contributor

@isamu-takagi isamu-takagi commented Aug 8, 2022

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

Description

The operation mode transition manager supports AD API. State transition is unified as follows (local mode is same as remote).
When in vehicle control mode (disengage), the operation mode can be changed immediately without checking. When the control mode changes to autoware (engage) or the operation mode changes in autoware control mode (e.g. stop to autonomous), the operation mode will be transition mode. The transition mode exits when the conditions are satisfied.

control-operation-mode-state-transition drawio

Related links

tier4/tier4_autoware_msgs#46

Tests performed

  • mode change in vehicle control mode
    1. change to vehicle control mode if not
    2. change to autonomous mode and check if it completes without transition mode
  • stop to auto (in autoware control)
    1. change to autoware control mode if not
    2. change to autonomous mode
    3. check the mode is autonomous transition, and then transition flag is false
    4. check the mode is autonomous transition, mode returns to stop if transition failed
  • vehicle control to auto (in autoware control)
    1. change to vehicle control mode if not
    2. change to autonomous mode if not
    3. change to autoware control mode
    4. check the mode is autonomous transition, and then transition flag is false
    5. check the mode is autonomous transition, mode returns to vehicle control if transition failed

Notes for reviewers

By default, the transition time is too short for testing. It can be changed with this parameter.
launch/tier4_control_launch/config/operation_mode_transition_manager/operation_mode_transition_manager.param.yaml

  stable_check:
    duration: 0.1

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>
@isamu-takagi isamu-takagi force-pushed the feature/ad-api/operation-mode-transition-manager branch from 1fc9ecd to 2076df8 Compare August 10, 2022 14:42
Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
@stale
Copy link

stale bot commented Oct 11, 2022

This pull request has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the status:stale Inactive or outdated issues. (auto-assigned) label Oct 11, 2022
Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
@stale stale bot removed the status:stale Inactive or outdated issues. (auto-assigned) label Oct 23, 2022
@isamu-takagi isamu-takagi marked this pull request as draft November 1, 2022 08:52
…thub.com:isamu-takagi/autoware.universe into feature/ad-api/operation-mode-transition-manager
Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
@isamu-takagi isamu-takagi marked this pull request as ready for review November 7, 2022 07:45
@isamu-takagi isamu-takagi requested a review from tkhmy November 7, 2022 07:46
Copy link
Contributor

@tkhmy tkhmy left a comment

Choose a reason for hiding this comment

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

LGTM
Tested with following case

  • vehicle engage during manual driving
  • change from engage to manual driving and back to engage
  • when vehicle is out of the lane, it will not engage

@isamu-takagi
Copy link
Contributor Author

CI will pass after merging tier4/tier4_autoware_msgs#46.

@isamu-takagi isamu-takagi enabled auto-merge (squash) November 10, 2022 11:24
@codecov
Copy link

codecov bot commented Nov 10, 2022

Codecov Report

Base: 11.14% // Head: 11.09% // Decreases project coverage by -0.04% ⚠️

Coverage data is based on head (830faa0) compared to base (f07801d).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1535      +/-   ##
==========================================
- Coverage   11.14%   11.09%   -0.05%     
==========================================
  Files        1203     1207       +4     
  Lines       86261    86634     +373     
  Branches    20827    20879      +52     
==========================================
  Hits         9612     9612              
- Misses      66493    66861     +368     
- Partials    10156    10161       +5     
Flag Coverage Δ *Carryforward flag
differential 8.06% <0.00%> (?)
total 11.11% <0.00%> (ø) Carriedforward from f07801d

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

Impacted Files Coverage Δ
...tion_mode_transition_manager/src/compatibility.cpp 0.00% <0.00%> (ø)
...rol/operation_mode_transition_manager/src/data.cpp 0.00% <0.00%> (ø)
...rol/operation_mode_transition_manager/src/data.hpp 0.00% <0.00%> (ø)
...rol/operation_mode_transition_manager/src/node.cpp 0.00% <0.00%> (ø)
...ol/operation_mode_transition_manager/src/state.cpp 0.00% <0.00%> (ø)
...ol/operation_mode_transition_manager/src/state.hpp 0.00% <0.00%> (ø)
control/vehicle_cmd_gate/src/vehicle_cmd_gate.cpp 0.23% <0.00%> (-0.07%) ⬇️
control/vehicle_cmd_gate/src/vehicle_cmd_gate.hpp 0.00% <ø> (ø)
... and 1 more

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

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

@isamu-takagi isamu-takagi merged commit c7c078a into autowarefoundation:main Nov 10, 2022
@isamu-takagi isamu-takagi deleted the feature/ad-api/operation-mode-transition-manager branch November 10, 2022 12:05
HansRobo pushed a commit to HansRobo/autoware.universe that referenced this pull request Dec 16, 2022
…dation#1535)

* feat(operation_mode_transition_manager): support ad api

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

* fix: merge operation mode state message

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

* feat(autoware_ad_api_msgs): define operation mode interface

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

* fix: add message

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

* Update common/autoware_ad_api_msgs/operation_mode/msg/OperationModeState.msg

Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>

* Update common/autoware_ad_api_msgs/operation_mode/msg/OperationModeState.msg

Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>

* feat: apply field name change

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

* feat: move adapi message

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

* feat: change message type

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

* fix: fix build error

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

* fix: fix error message

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

* WIP

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

* feat: add compatibility

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

* fix: fix operation mode change when disable autoware control

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

* fix: fix operation mode change when autoware control is disabled

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

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
YoshiRi pushed a commit to YoshiRi/autoware.universe that referenced this pull request Jan 11, 2023
…dation#1535)

* feat(operation_mode_transition_manager): support ad api

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

* fix: merge operation mode state message

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

* feat(autoware_ad_api_msgs): define operation mode interface

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

* fix: add message

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

* Update common/autoware_ad_api_msgs/operation_mode/msg/OperationModeState.msg

Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>

* Update common/autoware_ad_api_msgs/operation_mode/msg/OperationModeState.msg

Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>

* feat: apply field name change

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

* feat: move adapi message

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

* feat: change message type

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

* fix: fix build error

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

* fix: fix error message

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

* WIP

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

* feat: add compatibility

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

* fix: fix operation mode change when disable autoware control

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

* fix: fix operation mode change when autoware control is disabled

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

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
Signed-off-by: yoshiri <yoshiyoshidetteiu@gmail.com>
vividf pushed a commit to vividf/autoware.universe that referenced this pull request Oct 3, 2024
…k-point-types-update

feat: cherry pick point types update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants