Skip to content

Commit

Permalink
Fix joint limits in revolute and prismatic joints.
Browse files Browse the repository at this point in the history
  • Loading branch information
david-dorf committed Apr 8, 2024
1 parent 5b54c9c commit 48230e6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Fusion360/ExportURDF.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,6 @@ def fillJointTemplate(joint, jointType):
elif jointTypeStr == 'revolute':
joint_axis = joint.jointMotion.rotationAxisVector
joint_limits = joint.jointMotion.rotationLimits
joint_min = min(joint_limits)
joint_max = max(joint_limits)
return jointTemplate % (joint.name,
joint_origin.origin.x,
joint_origin.origin.y,
Expand All @@ -198,8 +196,8 @@ def fillJointTemplate(joint, jointType):
joint_axis.x,
joint_axis.y,
joint_axis.z,
joint_min,
joint_max)
joint_limits.minimumValue,
joint_limits.maximumValue)
elif jointTypeStr == 'prismatic':
return jointTemplate % (joint.name,
joint_origin.origin.x,
Expand All @@ -212,6 +210,8 @@ def fillJointTemplate(joint, jointType):
joint.occurrenceTwo.name,
joint_axis.x,
joint_axis.y,
joint_axis.z)
joint_axis.z,
joint_limits.minimumValue,
joint_limits.maximumValue)
else:
raise ValueError('Invalid joint type')

0 comments on commit 48230e6

Please sign in to comment.