From 48230e63b31b055d7b895d6456359ab55d56749c Mon Sep 17 00:00:00 2001 From: daviddorf2023 Date: Mon, 8 Apr 2024 11:58:07 -0400 Subject: [PATCH] Fix joint limits in revolute and prismatic joints. --- Fusion360/ExportURDF.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Fusion360/ExportURDF.py b/Fusion360/ExportURDF.py index ffc17d3..b3e7482 100644 --- a/Fusion360/ExportURDF.py +++ b/Fusion360/ExportURDF.py @@ -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, @@ -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, @@ -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')