From c42bd46d6ef64ba6321a5e90bcfd356b1bcf4867 Mon Sep 17 00:00:00 2001
From: "Kem (TiankuiXian)" <1041084556@qq.com>
Date: Tue, 19 Nov 2024 11:44:18 +0900
Subject: [PATCH] feat(control): use preset.yaml to control which modules to
launch for control modules (#1237)
* add control_module_preset
Signed-off-by: xtk8532704 <1041084556@qq.com>
* fix typo
Signed-off-by: xtk8532704 <1041084556@qq.com>
---------
Signed-off-by: xtk8532704 <1041084556@qq.com>
---
.../config/control/preset/default_preset.yaml | 39 +++++++++++++++++++
.../preset/dlr_control_validator_preset.yaml | 39 +++++++++++++++++++
autoware_launch/launch/autoware.launch.xml | 5 ++-
.../tier4_control_component.launch.xml | 9 ++---
.../launch/e2e_simulator.launch.xml | 2 +
.../launch/logging_simulator.launch.xml | 2 +
.../launch/planning_simulator.launch.xml | 2 +
7 files changed, 91 insertions(+), 7 deletions(-)
create mode 100644 autoware_launch/config/control/preset/default_preset.yaml
create mode 100644 autoware_launch/config/control/preset/dlr_control_validator_preset.yaml
diff --git a/autoware_launch/config/control/preset/default_preset.yaml b/autoware_launch/config/control/preset/default_preset.yaml
new file mode 100644
index 0000000000..74ba17b0a1
--- /dev/null
+++ b/autoware_launch/config/control/preset/default_preset.yaml
@@ -0,0 +1,39 @@
+launch:
+ # controller
+ - arg:
+ name: trajectory_follower_mode
+ default: trajectory_follower_node
+ # option: trajectory_follower_node
+ # smart_mpc_trajectory_follower
+ # none
+
+ # external_cmd selector/converter
+ - arg:
+ name: launch_external_cmd_selector
+ default: "true"
+ - arg:
+ name: launch_external_cmd_converter
+ default: "true"
+
+ # optional control checkers
+ - arg:
+ name: launch_lane_departure_checker
+ default: "true"
+ - arg:
+ name: launch_control_validator
+ default: "true"
+ - arg:
+ name: launch_autonomous_emergency_braking
+ default: "true"
+ - arg:
+ name: launch_collision_detector
+ default: "true"
+ - arg:
+ name: launch_obstacle_collision_checker
+ default: "false"
+ - arg:
+ name: launch_predicted_path_checker
+ default: "false"
+ - arg:
+ name: launch_control_evaluator
+ default: "true"
diff --git a/autoware_launch/config/control/preset/dlr_control_validator_preset.yaml b/autoware_launch/config/control/preset/dlr_control_validator_preset.yaml
new file mode 100644
index 0000000000..1ad7ce9ac9
--- /dev/null
+++ b/autoware_launch/config/control/preset/dlr_control_validator_preset.yaml
@@ -0,0 +1,39 @@
+launch:
+ # controller
+ - arg:
+ name: trajectory_follower_mode
+ default: none
+ # option: trajectory_follower_node
+ # smart_mpc_trajectory_follower
+ # none
+
+ # external_cmd selector/converter
+ - arg:
+ name: launch_external_cmd_selector
+ default: "false"
+ - arg:
+ name: launch_external_cmd_converter
+ default: "false"
+
+ # optional control checkers
+ - arg:
+ name: launch_lane_departure_checker
+ default: "false"
+ - arg:
+ name: launch_control_validator
+ default: "true"
+ - arg:
+ name: launch_autonomous_emergency_braking
+ default: "false"
+ - arg:
+ name: launch_collision_detector
+ default: "false"
+ - arg:
+ name: launch_obstacle_collision_checker
+ default: "false"
+ - arg:
+ name: launch_predicted_path_checker
+ default: "false"
+ - arg:
+ name: launch_control_evaluator
+ default: "false"
diff --git a/autoware_launch/launch/autoware.launch.xml b/autoware_launch/launch/autoware.launch.xml
index 95f15f59fb..29378cc0c8 100644
--- a/autoware_launch/launch/autoware.launch.xml
+++ b/autoware_launch/launch/autoware.launch.xml
@@ -9,6 +9,7 @@
+
@@ -113,7 +114,9 @@
-
+
+
+
diff --git a/autoware_launch/launch/components/tier4_control_component.launch.xml b/autoware_launch/launch/components/tier4_control_component.launch.xml
index d23a3c42c5..99cfe7484f 100644
--- a/autoware_launch/launch/components/tier4_control_component.launch.xml
+++ b/autoware_launch/launch/components/tier4_control_component.launch.xml
@@ -1,13 +1,13 @@
+
+
+
-
-
-
@@ -43,10 +43,7 @@
-
-
-
diff --git a/autoware_launch/launch/e2e_simulator.launch.xml b/autoware_launch/launch/e2e_simulator.launch.xml
index b1a5d6ee8b..3237754c48 100644
--- a/autoware_launch/launch/e2e_simulator.launch.xml
+++ b/autoware_launch/launch/e2e_simulator.launch.xml
@@ -10,6 +10,7 @@
+
@@ -51,6 +52,7 @@
+
diff --git a/autoware_launch/launch/logging_simulator.launch.xml b/autoware_launch/launch/logging_simulator.launch.xml
index 8780578a6e..df5f591fc4 100644
--- a/autoware_launch/launch/logging_simulator.launch.xml
+++ b/autoware_launch/launch/logging_simulator.launch.xml
@@ -9,6 +9,7 @@
+
@@ -43,6 +44,7 @@
+
diff --git a/autoware_launch/launch/planning_simulator.launch.xml b/autoware_launch/launch/planning_simulator.launch.xml
index bc601cb30f..b7e21999f1 100644
--- a/autoware_launch/launch/planning_simulator.launch.xml
+++ b/autoware_launch/launch/planning_simulator.launch.xml
@@ -8,6 +8,7 @@
+
@@ -58,6 +59,7 @@
+