diff --git a/CHANGELOG.md b/CHANGELOG.md index 482b0d86cbef..053d5454dfed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +* Fixed bug where mimic joints were considered configurable. + ### Removed diff --git a/src/compas/robots/model/joint.py b/src/compas/robots/model/joint.py index 5e382c71e5c5..9c88599750ea 100644 --- a/src/compas/robots/model/joint.py +++ b/src/compas/robots/model/joint.py @@ -835,7 +835,7 @@ def calculate_transformation(self, position): def is_configurable(self): """Returns ``True`` if the joint can be configured, otherwise ``False``.""" - return self.type != Joint.FIXED + return self.type != Joint.FIXED and self.mimic is None def is_scalable(self): """Returns ``True`` if the joint can be scaled, otherwise ``False``.""" diff --git a/tests/compas/robots/test_model.py b/tests/compas/robots/test_model.py index 7cf4299c81ea..f52707de0242 100644 --- a/tests/compas/robots/test_model.py +++ b/tests/compas/robots/test_model.py @@ -604,6 +604,11 @@ def test_unknown_axis_attribute_data(urdf_with_unknown_attr): assert r.joints[0].axis.attr['rpy'] == '0 0 0' +def test_get_configurable_joint_names(urdf_file): + model = RobotModel.from_urdf_file(urdf_file) + assert 'panda_finger_joint2' not in model.get_configurable_joint_names() + + def test_ensure_geometry(urdf_file, urdf_file_with_shapes_only): robot = RobotModel.from_urdf_file(urdf_file) with pytest.raises(Exception):