add interactive argument to control robot with interactive marker

This commit is contained in:
Ilya Uraev 2024-11-18 23:59:49 +03:00
parent 85eec1b7d7
commit 17401c29a7
5 changed files with 20 additions and 1 deletions

View file

@ -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`.

View file

@ -106,3 +106,7 @@
- `velocity` — управление скоростью, когда задаются желаемые скорости движения.
- `effort` — управление усилием, когда задаются моменты или силы, прикладываемые к суставам.
Значение по умолчанию: `position`.
- **`interactive`**
Указывает, нужно ли запускать контроллер `motion_control_handle`.
Значение по умолчанию: `true`.

View file

@ -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)]

View file

@ -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",
),
]

View file

@ -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(),
)