From 17401c29a7eea7a089687cce0e44e0cdd2e6c60a Mon Sep 17 00:00:00 2001 From: Bill Finger Date: Mon, 18 Nov 2024 23:59:49 +0300 Subject: [PATCH] add interactive argument to control robot with interactive marker --- doc/en/add_new_robot.md | 4 ++++ doc/ru/add_new_robot.md | 4 ++++ env_manager/rbs_runtime/launch/runtime.launch.py | 10 ++++++++++ rbs_bringup/launch/control.launch.py | 2 +- rbs_bringup/launch/rbs_bringup.launch.py | 1 + 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/doc/en/add_new_robot.md b/doc/en/add_new_robot.md index 8b069ce..ef70a66 100644 --- a/doc/en/add_new_robot.md +++ b/doc/en/add_new_robot.md @@ -104,3 +104,7 @@ Before starting, it is important to understand the basics of the [xacro](https:/ - `velocity` — velocity control, where desired movement speeds are set. - `effort` — effort control, where torques or forces applied to the joints are specified. Default value: `position`. + +- **`interactive`** + Specifies whether to run the `motion_control_handle` controller. + Default value: `true`. diff --git a/doc/ru/add_new_robot.md b/doc/ru/add_new_robot.md index f9cebd2..6f1bbb8 100644 --- a/doc/ru/add_new_robot.md +++ b/doc/ru/add_new_robot.md @@ -106,3 +106,7 @@ - `velocity` — управление скоростью, когда задаются желаемые скорости движения. - `effort` — управление усилием, когда задаются моменты или силы, прикладываемые к суставам. Значение по умолчанию: `position`. + +- **`interactive`** + Указывает, нужно ли запускать контроллер `motion_control_handle`. + Значение по умолчанию: `true`. diff --git a/env_manager/rbs_runtime/launch/runtime.launch.py b/env_manager/rbs_runtime/launch/runtime.launch.py index 0ff5ed9..45d6af7 100644 --- a/env_manager/rbs_runtime/launch/runtime.launch.py +++ b/env_manager/rbs_runtime/launch/runtime.launch.py @@ -41,6 +41,8 @@ def launch_setup(context, *args, **kwargs): control_space = LaunchConfiguration("control_space").perform(context) control_strategy = LaunchConfiguration("control_strategy").perform(context) + interactive = LaunchConfiguration("interactive").perform(context) + if not scene_config_file == "": config_file = {"config_file": scene_config_file} else: @@ -132,6 +134,7 @@ def launch_setup(context, *args, **kwargs): "ee_link_name": ee_link_name, "control_space": control_space, "control_strategy": control_strategy, + "interactive_control": interactive, }.items(), ) @@ -284,6 +287,13 @@ def generate_launch_description(): description="Specify the control strategy (e.g., position control).", ) ) + declared_arguments.append( + DeclareLaunchArgument( + "interactive", + default_value="true", + description="Wheter to run the motion_control_handle controller", + ), + ) return LaunchDescription( declared_arguments + [OpaqueFunction(function=launch_setup)] diff --git a/rbs_bringup/launch/control.launch.py b/rbs_bringup/launch/control.launch.py index 91ab0b9..a2d6df6 100644 --- a/rbs_bringup/launch/control.launch.py +++ b/rbs_bringup/launch/control.launch.py @@ -78,7 +78,7 @@ def generate_launch_description(): DeclareLaunchArgument( "interactive_control", default_value="true", - description="Whether to activate the gripper_controller.", + description="Wheter to run the motion_control_handle controller", ), ] diff --git a/rbs_bringup/launch/rbs_bringup.launch.py b/rbs_bringup/launch/rbs_bringup.launch.py index 06c1047..5872087 100644 --- a/rbs_bringup/launch/rbs_bringup.launch.py +++ b/rbs_bringup/launch/rbs_bringup.launch.py @@ -37,6 +37,7 @@ def launch_setup(context, *args, **kwargs): "ee_link_name": "gripper_grasp_point", "control_space": "task", "control_strategy": "position", + "interactive": "false" }.items(), )