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

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