File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
Original file line number Diff line number Diff line change @@ -397,6 +397,55 @@ def Exp(cls, S, check=True): # pylint: disable=arguments-differ
397
397
return cls ([tr .trexp2 (s ) for s in S ])
398
398
else :
399
399
return cls (tr .trexp2 (S ), check = False )
400
+ @classmethod
401
+ def Tx (cls , x ):
402
+ """
403
+ Create an SE(2) translation along the X-axis
404
+
405
+ :param x: translation distance along the X-axis
406
+ :type x: float
407
+ :return: SE(2) matrix
408
+ :rtype: SE2 instance
409
+
410
+ `SE2.Tx(x)` is an SE(2) translation of ``x`` along the x-axis
411
+
412
+ Example:
413
+
414
+ .. runblock:: pycon
415
+
416
+ >>> SE2.Tx(2)
417
+ >>> SE2.Tx([2,3])
418
+
419
+
420
+ :seealso: :func:`~spatialmath.base.transforms3d.transl`
421
+ :SymPy: supported
422
+ """
423
+ return cls ([base .transl2 (_x , 0 ) for _x in base .getvector (x )], check = False )
424
+
425
+
426
+ @classmethod
427
+ def Ty (cls , y ):
428
+ """
429
+ Create an SE(2) translation along the Y-axis
430
+
431
+ :param y: translation distance along the Y-axis
432
+ :type y: float
433
+ :return: SE(2) matrix
434
+ :rtype: SE2 instance
435
+
436
+ `SE2.Ty(y) is an SE(2) translation of ``y`` along the y-axis
437
+
438
+ Example:
439
+
440
+ .. runblock:: pycon
441
+
442
+ >>> SE2.Ty(2)
443
+ >>> SE2.Ty([2,3])
444
+
445
+ :seealso: :func:`~spatialmath.base.transforms3d.transl`
446
+ :SymPy: supported
447
+ """
448
+ return cls ([base .transl2 (0 , _y ) for _y in base .getvector (y )], check = False )
400
449
401
450
@staticmethod
402
451
def isvalid (x , check = True ):
You can’t perform that action at this time.
0 commit comments