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(diagnostic_converter): add converter to use planning_evaluator's output for scenario's condition #2514

Conversation

kyoichi-sugahara
Copy link
Contributor

@kyoichi-sugahara kyoichi-sugahara commented Dec 16, 2022

Description

background

  • Planning_evaluator node is designed to evaluate the quality of planning and control.
  • We would like to make use of the evaluation result for the scenairo simulation's pass/fail judgment.
  • Planing evaluator's output diagnostic_msgs::msg::DiagnosticArray can't be understood by scenario_simulator_v2 directly.
  • So in this PR, converter node which convert from diagnostic_msgs::msg::DiagnosticArray to tier4_simulator_msgs::msg::UserDefinedValue which can be understood by scenario_simulator_v2 is implemented.

discussuion

  • UserDefinedValue msg is originally included in scenario_simulator_v2 repository
  • scenario_simulator_v2 side want to keep their compability with other system not only autoware. And autoware-dependent implementation (converter node in this case) shouldn't be included in the scenario_simulator_v2 repository.

node diagram and interface between with scenario_simulator_v2

image

Proposal in related PRs

  • Take UserDefinedValue msg out from scenario_simulator_v2 and tried to make repository for the msg. We noticed this is not the only option with the comment and we decided to add this msg in tier4_autoware_msgs. You can check discussion in this PR
  • implement converter node in autoware side not in scenario_simulator_v2 repositpry

Related PRs

tier4/tier4_autoware_msgs#73: Adding new message type UserDefinedValue and UserDefinedValueCondition to package tier4_simulation_msgs
autowarefoundation/autoware_launch#219: Adding argument so that planning_evaluator node will be launched when scenario_simulator_v2 is running.
tier4/scenario_simulator_v2#874: modify scenario_simulator_v2 so that the output from convertor node cen be understood by scenario_simulator_v2.

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

I've confirmed the contribution guidelines.
The PR follows the pull request guidelines.

In-review checklist for the PR reviewers

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.
    After all checkboxes are checked, anyone who has write access can merge the PR.

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
@github-actions github-actions bot added type:documentation Creating or refining documentation. (auto-assigned) component:planning Route planning, decision-making, and navigation. (auto-assigned) labels Dec 16, 2022
@kyoichi-sugahara kyoichi-sugahara changed the title Feature/evaluator integration feat(diagnostic_converter): add converter to use planning_evaluator's output for scenario's condition Dec 16, 2022
@kyoichi-sugahara kyoichi-sugahara marked this pull request as ready for review December 21, 2022 06:02
@maxime-clem
Copy link
Contributor

I am unable to build the new package due to a missing message:

Starting >>> diagnostic_converter
--- stderr: diagnostic_converter                               
In file included from /home/mclement/autoware/autoware/src/universe/autoware.universe/planning/diagnostic_converter/src/converter_node.cpp:15:
/home/mclement/autoware/autoware/src/universe/autoware.universe/planning/diagnostic_converter/include/converter_node.hpp:21:10: fatal error: scenario_simulator_v2_msgs/msg/user_defined_value.hpp: No such file or directory
   21 | #include <scenario_simulator_v2_msgs/msg/user_defined_value.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In the CI this also causes an issue:

diagnostic_converter: Cannot locate rosdep definition for [scenario_simulator_v2_msgs]

@kyoichi-sugahara
Copy link
Contributor Author

@kyoichi-sugahara kyoichi-sugahara marked this pull request as draft January 18, 2023 06:57
@github-actions github-actions bot added the component:launch Launch files, scripts and initialization tools. (auto-assigned) label Jan 27, 2023
Copy link
Contributor

@maxime-clem maxime-clem left a comment

Choose a reason for hiding this comment

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

Tested and it works well.

@kyoichi-sugahara kyoichi-sugahara enabled auto-merge (squash) March 7, 2023 01:00
@kyoichi-sugahara
Copy link
Contributor Author

@mitsudome-r
Could you review this PR?
I need approve from autoware-global-codeowners.

Comment on lines 110 to 112
<group if="$(var launch_planning_evaluator)">
<include file="$(find-pkg-share planning_evaluator)/launch/planning_evaluator.launch.xml"/>
</group>
Copy link
Member

Choose a reason for hiding this comment

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

@TakaHoribe I remember you saying that planning_evaluator nodes are expected to launch regardless of simulation or real vehicle driving (e.g., to publish diagnostics for MRM triggering). Is it correct?
If that's true, then I think this should be included from planning.launch, not simulator.launch

Copy link
Contributor

Choose a reason for hiding this comment

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

@kyoichi-sugahara @mitsudome-r Thank you for the mention. Right, the planning evaluator should be launched in both sim and real, and thus be called from the planning.launch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mitsudome-r @TakaHoribe
I have modified code so that the planning_evaluator node is always laucnhed from planning.launch and confirmed its behavior with this new PR.

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Copy link
Contributor

@KeisukeShima KeisukeShima left a comment

Choose a reason for hiding this comment

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

LGTM

@kyoichi-sugahara kyoichi-sugahara merged commit fa9b018 into autowarefoundation:main Mar 10, 2023
kosuke55 pushed a commit to tier4/autoware.universe that referenced this pull request Mar 16, 2023
… output for scenario's condition (autowarefoundation#2514)

* add original diagnostic_convertor

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* add test

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* fix typo

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* delete file

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* change include

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* temp

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* delete comments

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* made launch for converter

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* ci(pre-commit): autofix

* ci(pre-commit): autofix

* add diagnostic convertor in launch

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* ci(pre-commit): autofix

* change debug from info

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* change arg name to launch diagnostic convertor

* add planning_evaluator launcher in simulator.launch.xml

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* fix arg wrong setting

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* style(pre-commit): autofix

* use simulation msg in tier4_autoware_msgs

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* style(pre-commit): autofix

* fix README

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* style(pre-commit): autofix

* refactoring

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* style(pre-commit): autofix

* remove unnecessary dependency

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* remove unnecessary dependency

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* move folder

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* reformat

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* style(pre-commit): autofix

* Update evaluator/diagnostic_converter/include/converter_node.hpp

Co-authored-by: Maxime CLEMENT <78338830+maxime-clem@users.noreply.github.com>

* Update evaluator/diagnostic_converter/README.md

Co-authored-by: Maxime CLEMENT <78338830+maxime-clem@users.noreply.github.com>

* Update evaluator/diagnostic_converter/src/converter_node.cpp

Co-authored-by: Maxime CLEMENT <78338830+maxime-clem@users.noreply.github.com>

* Update evaluator/diagnostic_converter/test/test_converter_node.cpp

Co-authored-by: Maxime CLEMENT <78338830+maxime-clem@users.noreply.github.com>

* define diagnostic_topics as parameter

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* fix include way

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* fix include way

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* delete ament_cmake_clang_format from package.xml

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* fix test_depend

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* Update evaluator/diagnostic_converter/test/test_converter_node.cpp

Co-authored-by: Maxime CLEMENT <78338830+maxime-clem@users.noreply.github.com>

* style(pre-commit): autofix

* Update launch/tier4_simulator_launch/launch/simulator.launch.xml

Co-authored-by: Maxime CLEMENT <78338830+maxime-clem@users.noreply.github.com>

---------

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxime CLEMENT <78338830+maxime-clem@users.noreply.github.com>
@kyoichi-sugahara kyoichi-sugahara deleted the feature/evaluator_integration branch April 15, 2023 03:24
satoshi-ota pushed a commit to satoshi-ota/autoware.universe that referenced this pull request Jun 20, 2023
… output for scenario's condition (autowarefoundation#2514)

* add original diagnostic_convertor

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* add test

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* fix typo

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* delete file

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* change include

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* temp

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* delete comments

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* made launch for converter

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* ci(pre-commit): autofix

* ci(pre-commit): autofix

* add diagnostic convertor in launch

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* ci(pre-commit): autofix

* change debug from info

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* change arg name to launch diagnostic convertor

* add planning_evaluator launcher in simulator.launch.xml

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* fix arg wrong setting

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* style(pre-commit): autofix

* use simulation msg in tier4_autoware_msgs

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* style(pre-commit): autofix

* fix README

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* style(pre-commit): autofix

* refactoring

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* style(pre-commit): autofix

* remove unnecessary dependency

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* remove unnecessary dependency

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* move folder

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* reformat

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* style(pre-commit): autofix

* Update evaluator/diagnostic_converter/include/converter_node.hpp

Co-authored-by: Maxime CLEMENT <78338830+maxime-clem@users.noreply.github.com>

* Update evaluator/diagnostic_converter/README.md

Co-authored-by: Maxime CLEMENT <78338830+maxime-clem@users.noreply.github.com>

* Update evaluator/diagnostic_converter/src/converter_node.cpp

Co-authored-by: Maxime CLEMENT <78338830+maxime-clem@users.noreply.github.com>

* Update evaluator/diagnostic_converter/test/test_converter_node.cpp

Co-authored-by: Maxime CLEMENT <78338830+maxime-clem@users.noreply.github.com>

* define diagnostic_topics as parameter

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* fix include way

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* fix include way

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* delete ament_cmake_clang_format from package.xml

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* fix test_depend

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>

* Update evaluator/diagnostic_converter/test/test_converter_node.cpp

Co-authored-by: Maxime CLEMENT <78338830+maxime-clem@users.noreply.github.com>

* style(pre-commit): autofix

* Update launch/tier4_simulator_launch/launch/simulator.launch.xml

Co-authored-by: Maxime CLEMENT <78338830+maxime-clem@users.noreply.github.com>

---------

Signed-off-by: kyoichi-sugahara <kyoichi.sugahara@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxime CLEMENT <78338830+maxime-clem@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:evaluator Evaluation tools for planning, localization etc. (auto-assigned) component:launch Launch files, scripts and initialization tools. (auto-assigned) component:planning Route planning, decision-making, and navigation. (auto-assigned) type:documentation Creating or refining documentation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants