Skip to content

Commit c101075

Browse files
authored
Merge pull request #1033 from tier4/feat/condition_groups_visualization
Feat/condition groups visualization
2 parents 06c17a0 + 0e7d7a6 commit c101075

File tree

12 files changed

+1166
-103
lines changed

12 files changed

+1166
-103
lines changed

docs/ReleaseNotes.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
Major Changes :race_car: :red_car: :blue_car:
66

7-
| Feature | Brief summary | Category | Pull request | Contributor |
8-
| --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------------------- | --------------------------------------------- |
9-
| Traffic Light Simulation | Start supporting to traffic light messages in `autoware_perception_msgs`. | `openscenario_interpreter`, `traffic_simulator`, `simple_sensor_simulator` | [#1027](https://github.com/tier4/scenario_simulator_v2/pull/1027) | [HansRobo](https://github.com/HansRobo) |
10-
| Detailed control of permissions for autonomous decisions | Add `featureIdentifiersRequiringExternalPermissionForAutonomousDecisions` property for ObjectController. scenario_simulator_v2 controls auto_mode of Autoware planning modules by settings in the property. | `openscenario_interpreter`, `concealer` | [#1092](https://github.com/tier4/scenario_simulator_v2/pull/1092) | [HansRobo](https://github.com/HansRobo) |
11-
| OpenSCENARIO `Controller.Properties.Property` | Support the property `allowGoalModification` to turn on the Autoware feature `allow_goal_modification`. | `openscenario_interpreter`, `concealer` | [#997](https://github.com/tier4/scenario_simulator_v2/pull/997) | [yamacir-kit](https://github.com/yamacir-kit) |
12-
| OpenSCENARIO 1.2 `UserDefinedAction.CustomCommandAction` | Add `PseudoTrafficSignalDetectorConfidenceSetAction@v1`, a CustomCommandAction to control confidences in traffic light topic. | `openscenario_interpreter`, `traffic_simulator` | [#1111](https://github.com/tier4/scenario_simulator_v2/pull/1111) | [HansRobo](https://github.com/HansRobo) |
13-
| Ego Vehicle Simulation | Update ego vehicle models ( Import `simple_planning_simulator` changes except [autowarefoundation/autoware.universe#4941](https://github.com/autowarefoundation/autoware.universe/pull/4941) ) | `simple_sensor_simulator` | [#1144](https://github.com/tier4/scenario_simulator_v2/pull/1144) | [HansRobo](https://github.com/HansRobo) |
14-
| Add `API::getLaneletLength()` and `API::getMapPoseFromRelativePose()` | Add `API::getLaneletLength()`to get a length of target lanelet, and `API::getMapPoseFromRelativePose()` to transform relative pose to map pose. | `traffic_simulator` | [#1145](https://github.com/tier4/scenario_simulator_v2/pull/1145) | [hakuturu583](https://github.com/hakuturu583) |
15-
| Start supporting ego entity in C++ scenario | Enable spawn ego entity in C++ scenarios in cpp_mock_scenarios package. | `cpp_mock_scenarios` | [#1145](https://github.com/tier4/scenario_simulator_v2/pull/1145) | [hakuturu583](https://github.com/hakuturu583) |
16-
7+
| Feature | Brief summary | Category | Pull request | Contributor |
8+
| --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------- |
9+
| Traffic Light Simulation | Start supporting to traffic light messages in `autoware_perception_msgs`. | `openscenario_interpreter`, `traffic_simulator`, `simple_sensor_simulator` | [#1027](https://github.com/tier4/scenario_simulator_v2/pull/1027) | [HansRobo](https://github.com/HansRobo) |
10+
| Detailed control of permissions for autonomous decisions | Add `featureIdentifiersRequiringExternalPermissionForAutonomousDecisions` property for ObjectController. scenario_simulator_v2 controls auto_mode of Autoware planning modules by settings in the property. | `openscenario_interpreter`, `concealer` | [#1092](https://github.com/tier4/scenario_simulator_v2/pull/1092) | [HansRobo](https://github.com/HansRobo) |
11+
| OpenSCENARIO `Controller.Properties.Property` | Support the property `allowGoalModification` to turn on the Autoware feature `allow_goal_modification`. | `openscenario_interpreter`, `concealer` | [#997](https://github.com/tier4/scenario_simulator_v2/pull/997) | [yamacir-kit](https://github.com/yamacir-kit) |
12+
| OpenSCENARIO 1.2 `UserDefinedAction.CustomCommandAction` | Add `PseudoTrafficSignalDetectorConfidenceSetAction@v1`, a CustomCommandAction to control confidences in traffic light topic. | `openscenario_interpreter`, `traffic_simulator` | [#1111](https://github.com/tier4/scenario_simulator_v2/pull/1111) | [HansRobo](https://github.com/HansRobo) |
13+
| Ego Vehicle Simulation | Update ego vehicle models ( Import `simple_planning_simulator` changes except [autowarefoundation/autoware.universe#4941](https://github.com/autowarefoundation/autoware.universe/pull/4941) ) | `simple_sensor_simulator` | [#1144](https://github.com/tier4/scenario_simulator_v2/pull/1144) | [HansRobo](https://github.com/HansRobo) |
14+
| Add `API::getLaneletLength()` and `API::getMapPoseFromRelativePose()` | Add `API::getLaneletLength()`to get a length of target lanelet, and `API::getMapPoseFromRelativePose()` to transform relative pose to map pose. | `traffic_simulator` | [#1145](https://github.com/tier4/scenario_simulator_v2/pull/1145) | [hakuturu583](https://github.com/hakuturu583) |
15+
| Start supporting ego entity in C++ scenario | Enable spawn ego entity in C++ scenarios in cpp_mock_scenarios package. | `cpp_mock_scenarios` | [#1145](https://github.com/tier4/scenario_simulator_v2/pull/1145) | [hakuturu583](https://github.com/hakuturu583) |
16+
| Visualize context in rviz display | Enable visualize `openscenario_interpreter_msgs/msg/Context` messages in rviz display | `openscenario_visualization` | [#1033](https://github.com/tier4/scenario_simulator_v2/pull/1033) | [kyoichi-sugahara](https://github.com/kyoichi-sugahara) |
1717

1818
Bug Fixes:bug:
1919

docs/image/condition_group.png

282 KB
Loading
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# **Visualizing the Internal Information of the Simulator**
2+
3+
This document provides instructions for users on how to visualize the internal information of `scenario_simulator_v2` using rviz. It also covers features that can be beneficial for analyzing this information. Please note, **this document is based on information up to version v0.7.0**.
4+
5+
## Table of Contents
6+
7+
- [**Visualizing the Internal Information of the Simulator**](#visualizing-the-internal-information-of-the-simulator)
8+
- [Table of Contents](#table-of-contents)
9+
- [**Visualizing Entity Information**](#visualizing-entity-information)
10+
- [**Visualizing the Status of ConditionGroups**](#visualizing-the-status-of-conditiongroups)
11+
12+
## **Visualizing Entity Information**
13+
14+
WIP
15+
16+
## **Visualizing the Status of ConditionGroups**
17+
18+
`ConditionGroup`s defined in the scenario file can be checked on rviz, a visualization tool.
19+
20+
A `ConditionGroup` acts as a trigger for events described in the scenario. A `ConditionGroup` is deemed true when all its sub-Conditions are fulfilled. Furthermore, event triggers can have multiple `ConditionGroup`s. If the evaluation of any one `ConditionGroup` becomes true, the trigger is activated.
21+
22+
One usage example is to display `ConditionGroup`s at the moment the scenario fails. This allows you to analyze the cause of the failure.
23+
24+
The display structure is as follows, and allows multiple Conditions to be included in one `ConditionGroup`:
25+
26+
```markdown
27+
Condition Group Name: xxx
28+
Current Evaluation: xxx
29+
Current Value: true/false
30+
Type: ReachPositionCondition, CollisionCondition, etc.
31+
Current Evaluation:
32+
Current Value:
33+
Type:
34+
35+
Condition Group Name: xxx
36+
Current Evaluation: xxx
37+
Current Value: true/false
38+
Type: ReachPositionCondition, CollisionCondition, etc.
39+
Current Evaluation:
40+
Current Value:
41+
Type:
42+
43+
```
44+
45+
Each condition is described using three elements:
46+
47+
- **Current Evaluation**: Current achievement status
48+
- **Current Value**: The fulfillment status of the condition expressed in true/false
49+
- **Type**: Types of conditions, such as `ReachPositionCondition`, `CollisionCondition`, etc.
50+
51+
To visualize the achievement status, check the `ConditionGroup` checkbox as demonstrated in the image below.
52+
![condition group visualization](../image/condition_group.png "condition group visualization")")
53+
54+
If an `Event name` is defined in the `ConditionGroup`, that name will be reflected. If left blank, names like `ConditionGroup1`, `ConditionGroup2`, `ConditionGroup3`, etc. are automatically assigned. However, this information alone doesn't clarify if each `ConditionGroup` is linked to success or failure conditions. Therefore, when visualizing with rviz and you want this information to be apparent, we recommend explicitly defining the `Event name` as `SuccessCondition` or similar when creating the scenario file.
55+
56+
---

openscenario/openscenario_visualization/CMakeLists.txt

Lines changed: 32 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -17,121 +17,61 @@ endif()
1717

1818
# find dependencies
1919
find_package(Eigen3 REQUIRED)
20-
find_package(ament_cmake REQUIRED)
21-
find_package(class_loader REQUIRED)
22-
find_package(openscenario_interpreter_msgs REQUIRED)
23-
find_package(pluginlib REQUIRED)
24-
find_package(quaternion_operation REQUIRED)
25-
find_package(rclcpp REQUIRED)
26-
find_package(rclcpp_components REQUIRED)
27-
find_package(rclcpp_lifecycle REQUIRED)
28-
find_package(rviz_common REQUIRED)
29-
find_package(traffic_simulator REQUIRED)
30-
find_package(traffic_simulator_msgs REQUIRED)
31-
find_package(visualization_msgs REQUIRED)
32-
33-
ament_export_dependencies(class_loader REQUIRED)
34-
ament_export_dependencies(pluginlib REQUIRED)
35-
ament_export_dependencies(rclcpp REQUIRED)
36-
ament_export_dependencies(std_msgs REQUIRED)
37-
ament_export_dependencies(Eigen3 REQUIRED)
38-
39-
include_directories(
40-
include
20+
find_package(Qt5 ${rviz_QT_VERSION} REQUIRED Core Widgets)
21+
find_package(ament_cmake_auto REQUIRED)
22+
ament_auto_find_build_dependencies()
23+
24+
# Qt settings
25+
set(CMAKE_INCLUDE_CURRENT_DIR ON)
26+
set(CMAKE_AUTOMOC ON)
27+
set(CMAKE_AUTORCC ON)
28+
add_definitions(-DQT_NO_KEYWORDS)
29+
30+
# Include directories
31+
include_directories(include
4132
${EIGEN3_INCLUDE_DIR}
42-
)
33+
${Qt5Core_INCLUDE_DIRS}
34+
${Qt5Widgets_INCLUDE_DIRS}
35+
SYSTEM
36+
${OGRE_INCLUDE_DIRS})
4337

44-
add_library(openscenario_visualization_component SHARED
38+
ament_auto_add_library(openscenario_visualization_component SHARED
4539
src/openscenario_visualization_component.cpp
4640
)
47-
ament_target_dependencies(openscenario_visualization_component
48-
rclcpp
49-
rclcpp_components
50-
rclcpp_lifecycle
51-
traffic_simulator
52-
visualization_msgs
53-
traffic_simulator_msgs
54-
quaternion_operation
55-
)
56-
add_executable(openscenario_visualization_node
41+
42+
ament_auto_add_executable(openscenario_visualization_node
5743
src/openscenario_visualization_node.cpp
5844
)
5945
target_link_libraries(openscenario_visualization_node openscenario_visualization_component)
60-
ament_target_dependencies(openscenario_visualization_node
61-
quaternion_operation
62-
rclcpp
63-
rclcpp_components
64-
rclcpp_lifecycle
65-
traffic_simulator
66-
traffic_simulator_msgs
67-
visualization_msgs
68-
)
6946

70-
###############
71-
# Qt settings #
72-
###############
73-
find_package(Qt5 ${rviz_QT_VERSION} REQUIRED Core Widgets)
74-
macro(qt_wrap_ui)
75-
qt5_wrap_ui(${ARGN})
76-
endmacro()
77-
include_directories(${Qt5Core_INCLUDE_DIRS})
78-
include_directories(${Qt5Widgets_INCLUDE_DIRS})
7947
add_definitions(-DQT_NO_KEYWORDS)
80-
set(CMAKE_INCLUDE_CURRENT_DIR ON)
81-
set(CMAKE_AUTOMOC ON)
82-
set(CMAKE_AUTORCC ON)
83-
84-
pluginlib_export_plugin_description_file(rviz_common plugins.xml)
8548

86-
include_directories(
87-
include
88-
)
89-
90-
qt5_wrap_ui(UIC_FILES
91-
src/ui/context_panel_plugin.ui
92-
)
49+
qt5_wrap_ui(UIC_FILES src/ui/context_panel_plugin.ui)
9350

94-
add_library(openscenario_visualization_rviz_plugin SHARED
51+
ament_auto_add_library(openscenario_visualization_rviz_plugin SHARED
9552
include/openscenario_visualization/context_panel_plugin.hpp
9653
src/context_panel_plugin.cpp
97-
${UIC_FILES})
98-
ament_target_dependencies(openscenario_visualization_rviz_plugin
99-
Qt5
100-
pluginlib
101-
rclcpp
102-
openscenario_interpreter_msgs
103-
rviz_common
54+
${UIC_FILES}
55+
include/openscenario_visualization_condition_groups_plugin/jsk_overlay_utils.hpp
56+
src/openscenario_visualization_condition_groups_plugin/jsk_overlay_utils.cpp
57+
include/openscenario_visualization_condition_groups_plugin/openscenario_visualization_condition_groups_plugin.hpp
58+
src/openscenario_visualization_condition_groups_plugin/openscenario_visualization_condition_groups_plugin.cpp
10459
)
60+
10561
target_include_directories(openscenario_visualization_rviz_plugin PRIVATE "${OGRE_PREFIX_DIR}/include")
10662

10763
install(DIRECTORY icons DESTINATION share/openscenario_visualization)
10864
install(DIRECTORY include/ DESTINATION include)
10965

110-
install(TARGETS openscenario_visualization_rviz_plugin
111-
ARCHIVE DESTINATION lib
112-
LIBRARY DESTINATION lib
113-
RUNTIME DESTINATION bin)
114-
115-
install(TARGETS openscenario_visualization_node DESTINATION lib/openscenario_visualization)
116-
117-
install(TARGETS
118-
openscenario_visualization_component
119-
ARCHIVE DESTINATION lib
120-
LIBRARY DESTINATION lib
121-
RUNTIME DESTINATION bin)
12266
ament_export_libraries(openscenario_visualization_component)
123-
rclcpp_components_register_nodes(openscenario_visualization_component
124-
"openscenario_visualization::OpenscenarioVisualizationComponent")
67+
68+
rclcpp_components_register_nodes(openscenario_visualization_component "openscenario_visualization::OpenscenarioVisualizationComponent")
12569

12670
if(BUILD_TESTING)
12771
find_package(ament_lint_auto REQUIRED)
128-
# the following line skips the linter which checks for copyrights
129-
# uncomment the line when a copyright and license is not present in all source files
130-
#set(ament_cmake_copyright_FOUND TRUE)
131-
# the following line skips cpplint (only works in a git repo)
132-
# uncomment the line when this package is not in a git repo
133-
#set(ament_cmake_cpplint_FOUND TRUE)
13472
ament_lint_auto_find_test_dependencies()
13573
endif()
13674

137-
ament_package()
75+
pluginlib_export_plugin_description_file(rviz_common plugins.xml)
76+
77+
ament_auto_package()

0 commit comments

Comments
 (0)