Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion src/compas/robots/model/joint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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``."""
Expand Down
5 changes: 5 additions & 0 deletions tests/compas/robots/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down