From c6e6333983672a03bb4e9143f844538e76a761dd Mon Sep 17 00:00:00 2001 From: motty Date: Thu, 16 Jul 2026 16:22:50 +0900 Subject: [PATCH] =?UTF-8?q?launch=20=E3=81=AB=20choice=20=E6=8C=87?= =?UTF-8?q?=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crane_plus_description/launch/display.launch.py | 1 + crane_plus_examples/launch/camera_example.launch.py | 9 +++++++-- crane_plus_examples/launch/demo.launch.py | 6 +++++- crane_plus_examples/launch/example.launch.py | 12 +++++++----- .../launch/camera_example.launch.py | 8 +++++--- crane_plus_examples_py/launch/example.launch.py | 6 +++--- .../launch/crane_plus_with_table.launch.py | 5 ++++- 7 files changed, 32 insertions(+), 15 deletions(-) diff --git a/crane_plus_description/launch/display.launch.py b/crane_plus_description/launch/display.launch.py index 1721a9f0..603ca6d2 100644 --- a/crane_plus_description/launch/display.launch.py +++ b/crane_plus_description/launch/display.launch.py @@ -25,6 +25,7 @@ def generate_launch_description(): declare_use_camera = DeclareLaunchArgument( 'use_camera', default_value='false', + choices=['true', 'false'], description='Set true to attach the camera model.', ) diff --git a/crane_plus_examples/launch/camera_example.launch.py b/crane_plus_examples/launch/camera_example.launch.py index 367b6035..60468737 100644 --- a/crane_plus_examples/launch/camera_example.launch.py +++ b/crane_plus_examples/launch/camera_example.launch.py @@ -23,18 +23,23 @@ def generate_launch_description(): declare_use_camera = DeclareLaunchArgument( - 'use_camera', default_value='true', description='Use camera.' + 'use_camera', + default_value='true', + choices=['true', 'false'], + description='Use camera.', ) declare_example_name = DeclareLaunchArgument( 'example', default_value='color_detection', - description=('Set an example executable name: [color_detection]'), + choices=['aruco_detection', 'color_detection'], + description='Set an example executable name.', ) declare_use_sim_time = DeclareLaunchArgument( 'use_sim_time', default_value='false', + choices=['true', 'false'], description=('Set true when using the gazebo simulator.'), ) diff --git a/crane_plus_examples/launch/demo.launch.py b/crane_plus_examples/launch/demo.launch.py index b5d85b34..a82d1efe 100644 --- a/crane_plus_examples/launch/demo.launch.py +++ b/crane_plus_examples/launch/demo.launch.py @@ -30,7 +30,10 @@ def generate_launch_description(): ) declare_use_camera = DeclareLaunchArgument( - 'use_camera', default_value='false', description='Use camera.' + 'use_camera', + default_value='false', + choices=['true', 'false'], + description='Use camera.', ) declare_video_device = DeclareLaunchArgument( @@ -42,6 +45,7 @@ def generate_launch_description(): declare_use_mock_components = DeclareLaunchArgument( 'use_mock_components', default_value='false', + choices=['true', 'false'], description='Use mock_components or not.', ) diff --git a/crane_plus_examples/launch/example.launch.py b/crane_plus_examples/launch/example.launch.py index 29fd91eb..5ac3d232 100644 --- a/crane_plus_examples/launch/example.launch.py +++ b/crane_plus_examples/launch/example.launch.py @@ -23,21 +23,23 @@ def generate_launch_description(): declare_use_camera = DeclareLaunchArgument( - 'use_camera', default_value='false', description='Use camera.' + 'use_camera', + default_value='false', + choices=['true', 'false'], + description='Use camera.', ) declare_example_name = DeclareLaunchArgument( 'example', default_value='gripper_control', - description=( - 'Set an example executable name: ' - '[gripper_control, pose_groupstate, joint_values, pick_and_place]' - ), + choices=['gripper_control', 'pose_groupstate', 'joint_values', 'pick_and_place'], + description='Set an example executable name.', ) declare_use_sim_time = DeclareLaunchArgument( 'use_sim_time', default_value='false', + choices=['true', 'false'], description=('Set true when using the gazebo simulator.'), ) diff --git a/crane_plus_examples_py/launch/camera_example.launch.py b/crane_plus_examples_py/launch/camera_example.launch.py index 35ea2af1..3e8e4a7a 100644 --- a/crane_plus_examples_py/launch/camera_example.launch.py +++ b/crane_plus_examples_py/launch/camera_example.launch.py @@ -50,14 +50,16 @@ def generate_launch_description(): } declare_example_name = DeclareLaunchArgument( - 'example', default_value='color_detection', - description=('Set an example executable name: ' - '[aruco_detection, color_detection]') + 'example', + default_value='color_detection', + choices=['aruco_detection', 'color_detection'], + description='Set an example executable name.', ) declare_use_sim_time = DeclareLaunchArgument( 'use_sim_time', default_value='false', + choices=['true', 'false'], description=('Set true when using the gazebo simulator.'), ) diff --git a/crane_plus_examples_py/launch/example.launch.py b/crane_plus_examples_py/launch/example.launch.py index 3915f40f..a8d3bdb0 100644 --- a/crane_plus_examples_py/launch/example.launch.py +++ b/crane_plus_examples_py/launch/example.launch.py @@ -52,14 +52,14 @@ def generate_launch_description(): declare_example_name = DeclareLaunchArgument( 'example', default_value='gripper_control', - description='Set an example executable name: \ - [gripper_control, pose_groupstate, \ - joint_values, pick_and_place]' + choices=['gripper_control', 'pose_groupstate', 'joint_values', 'pick_and_place'], + description='Set an example executable name.', ) declare_use_sim_time = DeclareLaunchArgument( 'use_sim_time', default_value='false', + choices=['true', 'false'], description=('Set true when using the gazebo simulator.'), ) diff --git a/crane_plus_gazebo/launch/crane_plus_with_table.launch.py b/crane_plus_gazebo/launch/crane_plus_with_table.launch.py index 61c9e6a8..2179af22 100644 --- a/crane_plus_gazebo/launch/crane_plus_with_table.launch.py +++ b/crane_plus_gazebo/launch/crane_plus_with_table.launch.py @@ -30,7 +30,10 @@ def generate_launch_description(): declare_use_camera = DeclareLaunchArgument( - 'use_camera', default_value='false', description='Use camera.' + 'use_camera', + default_value='false', + choices=['true', 'false'], + description='Use camera.', ) declare_rviz_config = DeclareLaunchArgument(