Skip to content

Commit d3c5635

Browse files
committed
allow return of trans and rot manipulability as a tuple
1 parent 4e06237 commit d3c5635

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

roboticstoolbox/robot/Robot.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ def manipulability(
417417
"minsingular" or "asada"
418418
:type method: str
419419
:param axes: Task space axes to consider: "all" [default],
420-
"trans" or "rot"
420+
"trans", "rot" or "both"
421421
:type axes: str
422422
:param kwargs: extra arguments to pass to ``jacob0``
423423
:return: manipulability
@@ -492,8 +492,13 @@ def manipulability(
492492
axes = [True, True, True, False, False, False]
493493
elif axes.startswith('rot'):
494494
axes = [False, False, False, True, True, True]
495+
elif axes == 'both':
496+
return (
497+
self.manipulability(q, J, method, axes='trans', **kwargs),
498+
self.manipulability(q, J, method, axes='rot', **kwargs)
499+
)
495500
else:
496-
raise ValueError('axes must be all, trans or rot')
501+
raise ValueError('axes must be all, trans, rot or both')
497502

498503
def yoshikawa(robot, J, q, axes, **kwargs):
499504
J = J[axes, :]

0 commit comments

Comments
 (0)