@@ -1463,16 +1463,43 @@ def Delta(cls, d):
1463
1463
:rtype: SE3 instance
1464
1464
1465
1465
1466
- ``T = delta2tr (d)`` is an SE(3) representing differential
1466
+ ``SE3.Delta2tr (d)`` is an SE(3) representing differential
1467
1467
motion :math:`d = [\delta_x, \delta_y, \delta_z, \theta_x, \theta_y, \theta_z]`.
1468
1468
1469
1469
:Reference: Robotics, Vision & Control: Second Edition, P. Corke, Springer 2016; p67.
1470
1470
1471
- :seealso: :func :`~delta`, :func:`~spatialmath.base.transform3d.delta2tr`
1471
+ :seealso: :meth :`~delta` :func:`~spatialmath.base.transform3d.delta2tr`
1472
1472
:SymPy: supported
1473
1473
"""
1474
1474
return cls (base .trnorm (base .delta2tr (d )))
1475
1475
1476
+ @classmethod
1477
+ def Trans (cls , x , y = None , z = None ):
1478
+ """
1479
+ Create SE(3) from translation vector
1480
+
1481
+ :param x: x-coordinate or translation vector
1482
+ :type x: float or array_like(3)
1483
+ :param y: y-coordinate, defaults to None
1484
+ :type y: float, optional
1485
+ :param z: z-coordinate, defaults to None
1486
+ :type z: float, optional
1487
+ :return: SE(3) matrix
1488
+ :rtype: SE3 instance
1489
+
1490
+ ``T = SE3.Trans(x, y, z)`` is an SE(3) representing pure translation.
1491
+
1492
+ ``T = SE3.Trans([x, y, z])`` as above, but translation is given as an
1493
+ array.
1494
+
1495
+ """
1496
+ if y is None and z is None :
1497
+ # single passed value, assume is 3-vector
1498
+ t = base .getvector (x , 3 )
1499
+ else :
1500
+ t = np .array ([x , y , z ])
1501
+ return cls (t )
1502
+
1476
1503
@classmethod
1477
1504
def Tx (cls , x ):
1478
1505
"""
@@ -1573,7 +1600,7 @@ def Rt(cls, R, t=None, check=True):
1573
1600
if t is None :
1574
1601
t = np .zeros ((3 ,))
1575
1602
return cls (base .rt2tr (R , t , check = check ), check = check )
1576
-
1603
+
1577
1604
def angdist (self , other , metric = 6 ):
1578
1605
r"""
1579
1606
Angular distance metric between poses
0 commit comments