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(pose_initializer): add a method type to the /localization/initialize service. #7048

Conversation

YamatoAndo
Copy link
Contributor

@YamatoAndo YamatoAndo commented May 17, 2024

Description

I have added the capability to directly initialize by the input pose of the /localization/initialize service.
To facilitate this, a new service message is being defined tier4/tier4_autoware_msgs#121, and I have changed service message type of /localization/initialize
autoware_adapi_v1_msgs::srv::InitializeLocalization -> tier4_localization_msgs::srv::InitializeLocalization.
Along with that I have modified following packages

  • pose_initilizer
  • component_interface_specs
  • default_ad_api

Related links

Tests performed

  • test case1
ros2 service call /localization/initialize tier4_localization_msgs/srv/InitializeLocalization

The initial position is automatically estimated using the GNSS pose.

  • test case2
ros2 service call /localization/initialize tier4_localization_msgs/srv/InitializeLocalization "
method: 0
"

The initial position is automatically estimated using the GNSS pose.

  • test case3
ros2 service call /localization/initialize tier4_localization_msgs/srv/InitializeLocalization "
pose_with_covariance:
  - header:
      frame_id: map
    pose:
      pose:
        position:
          x: 89571.1640625
          y: 42301.1875
          z: -3.1565165519714355
        orientation:
          x: 0.0
          y: 0.0
          z: 0.28072773940524687
          w: 0.9597874433062874
      covariance: [0.25, 0, 0, 0, 0, 0, 0, 0.25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.06853891909122467]
method: 0
"

The initial position is automatically estimated using the input pose.

  • test case4
ros2 service call /localization/initialize tier4_localization_msgs/srv/InitializeLocalization "
pose_with_covariance:
  - header:
      frame_id: map
    pose:
      pose:
        position:
          x: 89571.1640625
          y: 42301.1875
          z: -3.1565165519714355
        orientation:
          x: 0.0
          y: 0.0
          z: 0.28072773940524687
          w: 0.9597874433062874
      covariance: [0.25, 0, 0, 0, 0, 0, 0, 0.25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.06853891909122467]
method: 1
"

The initial position is set directly by the input pose.

Notes for reviewers

This PR should be merged after tier4/tier4_autoware_msgs#121.
Otherwise, the build will fail, and the GitHub CI will not pass.

And this PR should be merged with tier4/tier4_ad_api_adaptor#112 at the same time.

Interface changes

ROS Topic Changes

ROS Parameter Changes

Effects on system behavior

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.

@github-actions github-actions bot added type:documentation Creating or refining documentation. (auto-assigned) component:localization Vehicle's position determination in its environment. (auto-assigned) component:system System design and integration. (auto-assigned) component:common Common packages from the autoware-common repository. (auto-assigned) labels May 17, 2024
@YamatoAndo YamatoAndo changed the title feat(pose_initializer): Add a method type to the /localization/initialize service. feat(pose_initializer): add a method type to the /localization/initialize service. May 17, 2024
@YamatoAndo YamatoAndo marked this pull request as ready for review May 17, 2024 08:18
Copy link
Contributor

@isamu-takagi isamu-takagi left a comment

Choose a reason for hiding this comment

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

LGTM for default_ad_api package

Copy link
Contributor

@yukkysaito yukkysaito left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@KYabuuchi KYabuuchi left a comment

Choose a reason for hiding this comment

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

I think the feature is fine. 👏

Since the method of setting the initial position via CLI is useful, how about writing it in the README of pose_initializer?
For example, a chapter like Direct initial position set via CLI.

@SakodaShintaro
Copy link
Contributor

Thank you.
In the explanation, it looked like it would be fine to just merge the PRs in autoware.universe and tier4_autoware_msgs, but I got a build error.
Is it correct that the PR that Takagi-san linked to also needs to be merged at the same time?

@YamatoAndo
Copy link
Contributor Author

YamatoAndo commented May 20, 2024

@SakodaShintaro

Is it correct that tier4/tier4_ad_api_adaptor#112 also needs to be merged at the same time?

Yes, I'm sorry.

@YamatoAndo
Copy link
Contributor Author

YamatoAndo commented May 20, 2024

@KYabuuchi I added some descriptions to initialize pose via CLI

Signed-off-by: Yamato Ando <[email protected]>
Copy link
Contributor

@KYabuuchi KYabuuchi left a comment

Choose a reason for hiding this comment

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

@YamatoAndo Thank you!
LGTM 😄

Copy link
Contributor

@SakodaShintaro SakodaShintaro left a comment

Choose a reason for hiding this comment

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

Looks Good To Me

@YamatoAndo YamatoAndo added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label May 27, 2024
@YamatoAndo YamatoAndo merged commit 405ec70 into autowarefoundation:main May 28, 2024
36 of 39 checks passed
@YamatoAndo YamatoAndo deleted the feat/pose_initilizer/add_method_type branch May 28, 2024 09:02
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
…alize` service. (autowarefoundation#7048)

* change message type of InitializeLocalization in component_interface_specs

Signed-off-by: Yamato Ando <[email protected]>

* change message type of InitializeLocalizaion in pose_initializer

Signed-off-by: Yamato Ando <[email protected]>

* modify readme

Signed-off-by: Yamato Ando <[email protected]>

* style(pre-commit): autofix

* delete redundant line

Signed-off-by: Yamato Ando <[email protected]>

* fix typo

Signed-off-by: Yamato Ando <[email protected]>

* Update localization/pose_initializer/src/pose_initializer/pose_initializer_core.cpp

Co-authored-by: Ryohsuke Mitsudome <[email protected]>

* add description in readme

Signed-off-by: Yamato Ando <[email protected]>

* style(pre-commit): autofix

* add bash

Signed-off-by: Yamato Ando <[email protected]>

---------

Signed-off-by: Yamato Ando <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ryohsuke Mitsudome <[email protected]>
a-maumau pushed a commit to a-maumau/autoware.universe that referenced this pull request Jun 7, 2024
…alize` service. (autowarefoundation#7048)

* change message type of InitializeLocalization in component_interface_specs

Signed-off-by: Yamato Ando <[email protected]>

* change message type of InitializeLocalizaion in pose_initializer

Signed-off-by: Yamato Ando <[email protected]>

* modify readme

Signed-off-by: Yamato Ando <[email protected]>

* style(pre-commit): autofix

* delete redundant line

Signed-off-by: Yamato Ando <[email protected]>

* fix typo

Signed-off-by: Yamato Ando <[email protected]>

* Update localization/pose_initializer/src/pose_initializer/pose_initializer_core.cpp

Co-authored-by: Ryohsuke Mitsudome <[email protected]>

* add description in readme

Signed-off-by: Yamato Ando <[email protected]>

* style(pre-commit): autofix

* add bash

Signed-off-by: Yamato Ando <[email protected]>

---------

Signed-off-by: Yamato Ando <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ryohsuke Mitsudome <[email protected]>
KhalilSelyan pushed a commit that referenced this pull request Jul 22, 2024
…alize` service. (#7048)

* change message type of InitializeLocalization in component_interface_specs

Signed-off-by: Yamato Ando <[email protected]>

* change message type of InitializeLocalizaion in pose_initializer

Signed-off-by: Yamato Ando <[email protected]>

* modify readme

Signed-off-by: Yamato Ando <[email protected]>

* style(pre-commit): autofix

* delete redundant line

Signed-off-by: Yamato Ando <[email protected]>

* fix typo

Signed-off-by: Yamato Ando <[email protected]>

* Update localization/pose_initializer/src/pose_initializer/pose_initializer_core.cpp

Co-authored-by: Ryohsuke Mitsudome <[email protected]>

* add description in readme

Signed-off-by: Yamato Ando <[email protected]>

* style(pre-commit): autofix

* add bash

Signed-off-by: Yamato Ando <[email protected]>

---------

Signed-off-by: Yamato Ando <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ryohsuke Mitsudome <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:common Common packages from the autoware-common repository. (auto-assigned) component:localization Vehicle's position determination in its environment. (auto-assigned) component:system System design and integration. (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
None yet
Development

Successfully merging this pull request may close these issues.

6 participants