-
Notifications
You must be signed in to change notification settings - Fork 3
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: planning control evaluator #2
Merged
Merged
Changes from 26 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
6f279eb
feat: planning control node
hayato-m126 6fd279f
feat: update evaluation logic
hayato-m126 3656ce6
feat: update evaluation logic
hayato-m126 ba71358
fix: cast string
hayato-m126 872c70b
fix: field
hayato-m126 14ea7ab
feat: add unit test
hayato-m126 d20482c
chore: add temporary logic
hayato-m126 df97d79
fix: lane condition
hayato-m126 f65d46c
fix: lane s condition
hayato-m126 3cda13f
chore: allow empty KinematicCondition
hayato-m126 8de32ca
chore: add output decision
hayato-m126 1d3aa67
chore: update sample
hayato-m126 686177b
chore: pre-commit
hayato-m126 fa543a8
feat: add remap /localization/acceleration
hayato-m126 233ac3b
docs: update
hayato-m126 281e0e9
docs: update can msg
hayato-m126 d608bd1
feat: support LaunchPerception and LaunchPlanning
hayato-m126 509c715
feat: remap topic in bag
hayato-m126 6b78be4
fix: pre-commit
hayato-m126 ec98b03
chore: update status length check
hayato-m126 f068318
fix: remap
hayato-m126 b0909a0
docs: update document
hayato-m126 2c46423
docs: update sample
hayato-m126 618f972
Merge branch 'main' into feat/planning-control-evaluator
hayato-m126 89ef9df
feat: update unit test
hayato-m126 2ffc651
fix: local variable lane_info_tuple referenced before assignment
hayato-m126 2870b9a
Merge branch 'main' into feat/planning-control-evaluator
hayato-m126 f2ff41c
Merge branch 'develop' into feat/planning-control-evaluator
hayato-m126 f9f1318
Merge remote-tracking branch 'origin/develop' into feat/planning-cont…
hayato-m126 4b07ff1
feat: update scenario format and enable/disable component
hayato-m126 b017c63
Merge branch 'develop' into feat/planning-control-evaluator
hayato-m126 38b8345
Merge branch 'develop' into feat/planning-control-evaluator
hayato-m126 f87670d
feat: update topic name
hayato-m126 16e32ae
fix: pre-commit
hayato-m126 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
# Evaluate Planning Control | ||
|
||
Evaluate whether Planning / Control metrics are output at specified times and conditions | ||
|
||
## Evaluation Method | ||
|
||
Launching the file executes the following steps: | ||
|
||
1. Execute launch of evaluation node (`planning_control_evaluator_node`), `logging_simulator.launch` file and `ros2 bag play` command | ||
2. Autoware receives sensor data output from input rosbag and the perception module performs recognition. | ||
3. Using the results of perception, Autoware output Metrics to `/diagnostic/planning_evaluator/metrics` for planning and `/diagnostic/control_evaluator/metrics` for control. | ||
4. The evaluation node subscribes to the topic and evaluates data. The result is dumped into a file. | ||
5. When the playback of the rosbag is finished, Autoware's launch is automatically terminated, and the evaluation is completed. | ||
|
||
## Evaluation Result | ||
|
||
It is evaluated when status[0].name of the topic matches the module name specified in the scenario and status[0].value[0].key is a decision. | ||
If a lane condition is described in the scenario, it is evaluated when the lane condition is also satisfied. | ||
If the conditions for evaluation are not met, no log is output. | ||
|
||
### Normal | ||
|
||
Normal if status[0].values[0].value matches the decision in the scenario. | ||
If kinematic_condition is specified, additionally, kinematic_state must meet the condition. | ||
|
||
### Error | ||
|
||
When the normal condition is not met | ||
|
||
## Topic name and data type used by evaluation node | ||
|
||
Subscribed topics: | ||
|
||
| Topic name | Data type | | ||
| -------------------------------------- | ------------------------------------- | | ||
| /diagnostic/control_evaluator/metrics | diagnostic_msgs::msg::DiagnosticArray | | ||
| /diagnostic/planning_evaluator/metrics | diagnostic_msgs::msg::DiagnosticArray | | ||
|
||
Published topics: | ||
|
||
| Topic name | Data type | | ||
| ---------- | --------- | | ||
| N/A | N/A | | ||
|
||
## Arguments passed to logging_simulator.launch | ||
|
||
To make Autoware processing less resource-consuming, modules that are not relevant to evaluation are disabled by passing the `false` parameter as a launch argument. | ||
|
||
- localization: false | ||
|
||
### Arguments specified in the scenario or launch command | ||
|
||
- sensing: It can be disabled by specifying LaunchSensing: false in the scenario. Or specify sensing:=false in the launch command | ||
- perception: It can be disabled by specifying LaunchPerception: false in the scenario. Or specify perception:=false in the launch command | ||
- planning: It can be disabled by specifying LaunchPlanning: false in the scenario. Or specify planning:=false in the launch command | ||
|
||
```shell | ||
ros2 launch log_evaluator log_evaluator.launch.py scenario_path:=${planning_control_scenario_path} sensing:=false perception:=false planning:=false | ||
``` | ||
|
||
## About simulation | ||
|
||
State the information required to run the simulation. | ||
|
||
### Topic to be included in the input rosbag | ||
|
||
| Topic name | Data type | | ||
| -------------------------------------- | -------------------------------------------- | | ||
| /pacmod/from_can_bus | can_msgs/msg/Frame | | ||
| /localization/kinematic_state | nav_msgs/msg/Odometry | | ||
| /localization/acceleration | geometry_msgs/msg/AccelWithCovarianceStamped | | ||
| /sensing/lidar/concatenated/pointcloud | sensor_msgs/msg/PointCloud2 | | ||
| /tf | tf2_msgs/msg/TFMessage | | ||
| /planning/mission_planning/route | autoware_planning_msgs/msg/LaneletRoute | | ||
|
||
The vehicle topics can be included instead of CAN. | ||
|
||
| Topic name | Data type | | ||
| -------------------------------------- | --------------------------------------------------- | | ||
| /localization/kinematic_state | nav_msgs/msg/Odometry | | ||
| /localization/acceleration | geometry_msgs/msg/AccelWithCovarianceStamped | | ||
| /sensing/lidar/concatenated/pointcloud | sensor_msgs/msg/PointCloud2 | | ||
| /tf | tf2_msgs/msg/TFMessage | | ||
| /planning/mission_planning/route | autoware_planning_msgs/msg/LaneletRoute | | ||
| /vehicle/status/control_mode | autoware_auto_vehicle_msgs/msg/ControlModeReport | | ||
| /vehicle/status/gear_status | autoware_auto_vehicle_msgs/msg/GearReport | | ||
| /vehicle/status/steering_status | autoware_auto_vehicle_msgs/SteeringReport | | ||
| /vehicle/status/turn_indicators_status | autoware_auto_vehicle_msgs/msg/TurnIndicatorsReport | | ||
| /vehicle/status/velocity_status | autoware_auto_vehicle_msgs/msg/VelocityReport | | ||
|
||
### Topics that must not be included in the input rosbag | ||
|
||
| Topic name | Data type | | ||
| ---------- | ----------------------- | | ||
| -------- | ----------------------- | | ||
| /clock | rosgraph_msgs/msg/Clock | | ||
|
||
The clock is output by the --clock option of ros2 bag play, so if it is recorded in the bag itself, it is output twice, so it is not included in the bag. | ||
|
||
## About Evaluation | ||
|
||
State the information necessary for the evaluation. | ||
|
||
### Scenario Format | ||
|
||
See [sample](https://github.com/tier4/driving_log_replayer/blob/main/sample/planning_control/scenario.ja.yaml). | ||
|
||
### Evaluation Result Format | ||
|
||
See [sample](https://github.com/tier4/driving_log_replayer/blob/main/sample/planning_control/result.json). | ||
|
||
The result format is shown below. | ||
**NOTE: common part of the result file format, which has already been explained, is omitted.** | ||
|
||
Success is determined when all evaluation conditions set in planning and control are met. | ||
|
||
```json | ||
{ | ||
"Frame": { | ||
"[Planning|Control]_CONDITION_INDEX": { | ||
"Result": { "Total": "Success or Fail", "Frame": "Success or Fail" }, | ||
"Info": { | ||
"TotalPassed": "Total number of topics that passed the evaluation criteria", | ||
"Decision": "Decision of the acquired TOPIC", | ||
"LaneInfo": "[lane_id, s, t]", | ||
"KinematicState": "[vel, acc, jerk]" | ||
} | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
# Planning Controlの評価 | ||
|
||
Planning / ControlのMetricsが指定の条件で出力されているか評価する | ||
|
||
## 評価方法 | ||
|
||
launch を立ち上げると以下のことが実行され、評価される。 | ||
|
||
1. launch で評価ノード(`planning_control_evaluator_node`)と `logging_simulator.launch`、`ros2 bag play`コマンドを立ち上げる | ||
2. bag から出力されたセンサーデータを autoware が受け取って、perception モジュールが認識を行う | ||
3. perceptionの結果を使って、planningは `/diagnostic/planning_evaluator/metrics` に controlは `/diagnostic/control_evaluator/metrics`にMetricsを出力する | ||
4. 評価ノードが topic を subscribe して、各基準を満たしているかを判定して結果をファイルに記録する | ||
5. bag の再生が終了すると自動で launch が終了して評価が終了する | ||
|
||
## 評価結果 | ||
|
||
topicのstatus[0].nameがシナリオで指定したモジュール名と一致し、且つ、status[0].value[0].keyがdecisionの場合に評価される。 | ||
また、シナリオでレーン条件を記述した場合は、レーン条件も満たした場合に評価される。 | ||
評価の条件を満たさない場合は、ログも出力されない。 | ||
|
||
### 正常 | ||
|
||
status[0].values[0].valueがシナリオのdecisionと一致した場合に正常となる。 | ||
kinematic_conditionを指定した場合は追加で、kinematic_stateが条件を満たしている必要がある。 | ||
|
||
### 異常 | ||
|
||
正常の条件を満たさないとき | ||
|
||
## 評価ノードが使用する Topic 名とデータ型 | ||
|
||
Subscribed topics: | ||
|
||
| Topic name | Data type | | ||
| -------------------------------------- | ------------------------------------- | | ||
| /diagnostic/control_evaluator/metrics | diagnostic_msgs::msg::DiagnosticArray | | ||
| /diagnostic/planning_evaluator/metrics | diagnostic_msgs::msg::DiagnosticArray | | ||
|
||
Published topics: | ||
|
||
| Topic name | Data type | | ||
| ---------- | --------- | | ||
| N/A | N/A | | ||
|
||
## logging_simulator.launch に渡す引数 | ||
|
||
autoware の処理を軽くするため、評価に関係のないモジュールは launch の引数に false を渡すことで無効化する。以下を設定している。 | ||
|
||
- localization: false | ||
|
||
### シナリオまたはlaunchコマンドで指定する引数 | ||
|
||
- sensing: シナリオにLaunchSensing: falseを指定することで無効化できる。またはlaunchコマンドでsensing:=falseを指定する | ||
- perception: シナリオにLaunchPerception: falseを指定することで無効化できる。またはlaunchコマンドでperception:=falseを指定する | ||
- planning: シナリオにLaunchPlanning: falseを指定することで無効化できる。またはlaunchコマンドでplanning:=falseを指定する | ||
|
||
```shell | ||
ros2 launch log_evaluator log_evaluator.launch.py scenario_path:=${planning_control_scenario_path} sensing:=false perception:=false planning:=false | ||
``` | ||
|
||
## simulation | ||
|
||
シミュレーション実行に必要な情報を述べる。 | ||
|
||
### 入力 rosbag に含まれるべき topic | ||
|
||
| topic 名 | データ型 | | ||
| -------------------------------------- | -------------------------------------------- | | ||
| /pacmod/from_can_bus | can_msgs/msg/Frame | | ||
| /localization/kinematic_state | nav_msgs/msg/Odometry | | ||
| /localization/acceleration | geometry_msgs/msg/AccelWithCovarianceStamped | | ||
| /sensing/lidar/concatenated/pointcloud | sensor_msgs/msg/PointCloud2 | | ||
| /tf | tf2_msgs/msg/TFMessage | | ||
| /planning/mission_planning/route | autoware_planning_msgs/msg/LaneletRoute | | ||
|
||
CAN の代わりに vehicle の topic を含めても良い。 | ||
|
||
| topic 名 | データ型 | | ||
| -------------------------------------- | --------------------------------------------------- | | ||
| /localization/kinematic_state | nav_msgs/msg/Odometry | | ||
| /localization/acceleration | geometry_msgs/msg/AccelWithCovarianceStamped | | ||
| /sensing/lidar/concatenated/pointcloud | sensor_msgs/msg/PointCloud2 | | ||
| /tf | tf2_msgs/msg/TFMessage | | ||
| /planning/mission_planning/route | autoware_planning_msgs/msg/LaneletRoute | | ||
| /vehicle/status/control_mode | autoware_auto_vehicle_msgs/msg/ControlModeReport | | ||
| /vehicle/status/gear_status | autoware_auto_vehicle_msgs/msg/GearReport | | ||
| /vehicle/status/steering_status | autoware_auto_vehicle_msgs/SteeringReport | | ||
| /vehicle/status/turn_indicators_status | autoware_auto_vehicle_msgs/msg/TurnIndicatorsReport | | ||
| /vehicle/status/velocity_status | autoware_auto_vehicle_msgs/msg/VelocityReport | | ||
|
||
### 入力 rosbag に含まれてはいけない topic | ||
|
||
| topic 名 | データ型 | | ||
| -------- | ----------------------- | | ||
| /clock | rosgraph_msgs/msg/Clock | | ||
|
||
clock は、ros2 bag play の--clock オプションによって出力しているので、bag 自体に記録されていると 2 重に出力されてしまうので bag には含めない | ||
|
||
## evaluation | ||
|
||
評価に必要な情報を述べる。 | ||
|
||
### シナリオフォーマット | ||
|
||
[サンプル](https://github.com/tier4/driving_log_replayer/blob/main/sample/planning_control/scenario.ja.yaml)参照 | ||
|
||
### 評価結果フォーマット | ||
|
||
[サンプル](https://github.com/tier4/driving_log_replayer/blob/main/sample/planning_control/result.json)参照 | ||
|
||
以下に、それぞれの評価の例を記述する。 | ||
**注:結果ファイルフォーマットで解説済みの共通部分については省略する。** | ||
|
||
planning と controlで設定した全ての評価条件で成功している場合に成功と判定される。 | ||
|
||
```json | ||
{ | ||
"Frame": { | ||
"[Planning|Control]_CONDITION_INDEX": { | ||
"Result": { "Total": "Success or Fail", "Frame": "Success or Fail" }, | ||
"Info": { | ||
"TotalPassed": "評価条件をパスしたtopicの総数", | ||
"Decision": "取得したtopicのdecision", | ||
"LaneInfo": "[lane_id, s, t]", | ||
"KinematicState": "[vel, acc, jerk]" | ||
} | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/tf_static: | ||
reliability: reliable | ||
history: keep_last | ||
depth: 1 | ||
durability: transient_local | ||
/planning/mission_planning/route: | ||
reliability: reliable | ||
history: keep_last | ||
depth: 1 | ||
durability: transient_local | ||
/perception/obstacle_segmentation/pointcloud: | ||
depth: 10 | ||
durability: volatile | ||
history: keep_last | ||
reliability: best_effort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tier4/driving_log_replayer#529
すみません、こちらと同様にrename予定です
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
autowarefoundation/autoware.universe#8152
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated topic name in f87670d