File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,38 @@ def ishom2(self):
259
259
260
260
#----------------------- functions
261
261
262
+ def det (self ):
263
+ """
264
+ Determinant of rotational component (superclass method)
265
+
266
+ :return: Determinant of rotational component
267
+ :rtype: float or NumPy array
268
+
269
+ ``x.det()`` is the determinant of the rotation component of the values
270
+ of ``x``.
271
+
272
+ Example::
273
+ >>> x=SE3.Rand()
274
+ >>> x.det()
275
+ 1.0000000000000004
276
+ >>> x=SE3.Rand(N=2)
277
+ >>> x.det()
278
+ [0.9999999999999997, 1.0000000000000002]
279
+
280
+ :SymPy: not supported
281
+ """
282
+ if type (self ).__name__ in ('SO3' , 'SE3' ):
283
+ if len (self ) == 1 :
284
+ return np .linalg .det (self .A [:3 ,:3 ])
285
+ else :
286
+ return [np .linalg .det (T [:3 ,:3 ]) for T in self .data ]
287
+ elif type (self ).__name__ in ('SO2' , 'SE2' ):
288
+ if len (self ) == 1 :
289
+ return np .linalg .det (self .A [:2 ,:2 ])
290
+ else :
291
+ return [np .linalg .det (T [:2 ,:2 ]) for T in self .data ]
292
+
293
+
262
294
def log (self , twist = False ):
263
295
"""
264
296
Logarithm of pose (superclass method)
You can’t perform that action at this time.
0 commit comments