Skip to content

Commit 16e10f4

Browse files
committed
now running smooth
1 parent 7e89ac8 commit 16e10f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Runtime/Scripts/ROS/Unity/Controllers/ZOArmController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ protected double[] GetJointPositionsAtTimeSeconds(JointTrajectoryPointMessage[]
386386
for (int p = 0; p < numPositions; p++) {
387387
double aJointPosition = points[i - 1].positions[p];
388388
double bJointPosition = points[i].positions[p];
389-
interpolatedJointPositions[p] = Mathf.LerpAngle((float)aJointPosition * Mathf.Rad2Deg, (float)bJointPosition * Mathf.Deg2Rad, (float)t) * Mathf.Deg2Rad;
389+
interpolatedJointPositions[p] = Mathf.Lerp((float)aJointPosition, (float)bJointPosition, (float)t);
390390
}
391391

392392
return interpolatedJointPositions;

0 commit comments

Comments
 (0)