From d864d9ce69d8f6034fdf8a6307e4e0fcbb898073 Mon Sep 17 00:00:00 2001 From: Michael Ferguson Date: Wed, 2 Oct 2024 14:09:13 -0400 Subject: [PATCH 1/2] fix move_group_capabilities usage * this fixes an issue seen when no capabilities are defined (#2734) * also adds ability to specify disabled capabilities --- moveit_configs_utils/moveit_configs_utils/launches.py | 7 ++++++- .../moveit_configs_utils/moveit_configs_builder.py | 2 +- 2 files changed, 7 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..5cf80a3f93 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,7 @@ 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. From 483df1da1de961a670f825863469e07298d97aab Mon Sep 17 00:00:00 2001 From: Michael Ferguson Date: Wed, 2 Oct 2024 14:21:30 -0400 Subject: [PATCH 2/2] formatting as recommended by CI --- .../moveit_configs_utils/moveit_configs_builder.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 5cf80a3f93..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=lambda: {"capabilities": "", "disable_capabilities": ""}) + 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.