Skip to content

Commit beef079

Browse files
committed
fix(twist): add missing denominator in Twist3.pitch calculation
The pitch calculation was missing the denominator, returning an incorrect value. Pitch should be normalized by |w|²: pitch = (w · v) / (w · w) This represents the translation distance per radian along the screw axis. All 25 twist tests pass.
1 parent 8b83c1f commit beef079

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎spatialmath/twist.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ def pitch(self):
945945
>>> S.pitch
946946
947947
"""
948-
return np.dot(self.w, self.v)
948+
return np.dot(self.w, self.v) / np.dot(self.w, self.w)
949949

950950
def line(self):
951951
"""

0 commit comments

Comments
 (0)