Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8813480

Browse filesBrowse files
committed
Add theta method
norm of angle about the screw
1 parent a5011df commit 8813480
Copy full SHA for 8813480

File tree

Expand file treeCollapse file tree

1 file changed

+12
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+12
-0
lines changed

‎spatialmath/twist.py

Copy file name to clipboardExpand all lines: spatialmath/twist.py
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,18 @@ def unit(self):
183183
"""
184184
return Twist3(base.unitvec(self.S))
185185

186+
def theta(self):
187+
"""
188+
Twist angle (superclass method)
189+
190+
:return: magnitude of rotation (1x1) about the twist axis in radians
191+
:rtype: float
192+
"""
193+
if self.N == 2:
194+
return abs(self.w)
195+
else:
196+
return base.norm(np.array(self.w))
197+
186198
def inv(self):
187199
"""
188200
Inverse of Twist (superclass method)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.