From 56d1ab1af8615793ba6be6dd47cca16de1107df6 Mon Sep 17 00:00:00 2001 From: Michael Ferguson Date: Mon, 14 Oct 2024 11:55:08 -0400 Subject: [PATCH] fix move_group_capabilities usage (#3018) --- moveit_configs_utils/moveit_configs_utils/launches.py | 7 ++++++- .../moveit_configs_utils/moveit_configs_builder.py | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/moveit_configs_utils/moveit_configs_utils/launches.py b/moveit_configs_utils/moveit_configs_utils/launches.py index c8e3bb533c..a423395000 100644 --- a/moveit_configs_utils/moveit_configs_utils/launches.py +++ b/moveit_configs_utils/moveit_configs_utils/launches.py @@ -204,7 +204,12 @@ def generate_move_group_launch(moveit_config): ) ) # inhibit these default MoveGroup capabilities (space separated) - ld.add_action(DeclareLaunchArgument("disable_capabilities", default_value="")) + ld.add_action( + DeclareLaunchArgument( + "disable_capabilities", + default_value=moveit_config.move_group_capabilities["disable_capabilities"], + ) + ) # do not copy dynamics information from /joint_states to internal robot monitoring # default to false, because almost nothing in move_group relies on this information diff --git a/moveit_configs_utils/moveit_configs_utils/moveit_configs_builder.py b/moveit_configs_utils/moveit_configs_utils/moveit_configs_builder.py index 04cb077514..4d547d6209 100644 --- a/moveit_configs_utils/moveit_configs_utils/moveit_configs_builder.py +++ b/moveit_configs_utils/moveit_configs_utils/moveit_configs_builder.py @@ -108,7 +108,9 @@ class MoveItConfigs: # A dictionary that has the sensor 3d configuration parameters. sensors_3d: Dict = field(default_factory=dict) # A dictionary containing move_group's non-default capabilities. - move_group_capabilities: Dict = field(default_factory=dict) + move_group_capabilities: Dict = field( + default_factory=lambda: {"capabilities": "", "disable_capabilities": ""} + ) # A dictionary containing the overridden position/velocity/acceleration limits. joint_limits: Dict = field(default_factory=dict) # A dictionary containing MoveItCpp related parameters.