Skip to content

Fix URDF importer dropping joint friction values - #1

Draft
fatimaanes wants to merge 1 commit into
mainfrom
fix/urdf-joint-friction
Draft

Fix URDF importer dropping joint friction values#1
fatimaanes wants to merge 1 commit into
mainfrom
fix/urdf-joint-friction

Conversation

@fatimaanes

Copy link
Copy Markdown
Owner

Description

Joint friction values from <dynamics friction="..."> in URDF files are correctly parsed and stored in the joint data dictionary, but never forwarded to add_joint_revolute(), add_joint_prismatic(), or the JointDofConfig for planar (D6) joints. All imported joints silently get zero friction regardless of their URDF specification.

Changes

  • Extract joint_friction = joint["friction"] alongside joint_damping
  • Pass friction=joint_friction to add_joint_revolute() and add_joint_prismatic()
  • Pass friction=joint_friction to both JointDofConfig instances for planar joints
  • Add CHANGELOG entry under [Unreleased] > Fixed

Tests

  • test_joint_friction_parsed_from_urdf: verifies friction values (0.25 revolute, 0.75 prismatic) round-trip through URDF import
  • test_joint_friction_defaults_to_zero: verifies joints without <dynamics friction> default to 0.0

Impact

Any URDF robot with non-zero joint friction (common for realistic manipulators) was simulating with zero friction on all joints. This fix is backward-compatible — joints without friction specifications continue to default to 0.0.

Joint friction parsed from <dynamics friction='...'> was stored in the
joint data dict but never forwarded to add_joint_revolute(),
add_joint_prismatic(), or the JointDofConfig for planar (D6) joints.

This adds the friction= parameter to all three joint creation paths and
includes tests verifying friction values round-trip through URDF import.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant