Transforms
Native spatial transform helpers for SO(3) rotations and SE(3) rigid-body transforms. Replaces scipy.spatial.transform with Pinocchio-backed operations (no SciPy dependency).
Rotation (SO3)
Lightweight SO(3) rotation helper. Canonical methods are primary; spatialmath-style shorthands are convenience aliases.
Rotation
Lightweight SO(3) rotation helper using native embodiK/Pinocchio ops.
Replaces scipy.spatial.transform.Rotation for common use cases. Canonical methods (from_matrix, as_matrix, etc.) are primary; spatialmath-style shorthands (Rx, Rz, RPY, etc.) are convenience aliases.
Source code in python/embodik/transforms.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | |
Attributes
Functions
from_matrix
classmethod
from_quat
classmethod
Create from quaternion [x, y, z, w] (scipy/ROS convention).
Source code in python/embodik/transforms.py
from_rotvec
classmethod
Create from axis-angle vector (rotation axis * angle in radians).
Source code in python/embodik/transforms.py
from_euler
classmethod
Create from Euler angles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seq
|
str
|
'xyz', 'x', 'y', or 'z' |
required |
angles
|
Union[float, ndarray]
|
Single angle (for single-axis) or [r, p, y] for 'xyz' |
required |
degrees
|
bool
|
If True, angles are in degrees |
False
|
Source code in python/embodik/transforms.py
identity
classmethod
Rx
classmethod
Ry
classmethod
Rz
classmethod
RPY
classmethod
Create from roll-pitch-yaw [r, p, y] in radians.
Source code in python/embodik/transforms.py
AngVec
classmethod
Create from angle (radians) and unit axis vector.
Source code in python/embodik/transforms.py
EulerVec
classmethod
as_matrix
as_quat
as_rotvec
inv
SO3 Alias
SO3 is an alias for Rotation (spatialmath-style):
SE3
Rigid-body transform (rotation + translation). Supports composition, point transforms, and spatialmath-style property aliases.
SE3
Attributes
Functions
Rt
Rt(R: numpy.ndarray[dtype=float64, shape=(3, 3), order='F'], t: numpy.ndarray[dtype=float64, shape=(3), order='C']) -> embodik._embodik_impl.SE3
Create SE3 from rotation matrix and translation (spatialmath-style)
homogeneous
method descriptor
homogeneous(self) -> numpy.ndarray[dtype=float64, shape=(4, 4), order='F']
Get 4x4 homogeneous transformation matrix
act
method descriptor
act(self, point: numpy.ndarray[dtype=float64, shape=(3), order='C']) -> numpy.ndarray[dtype=float64, shape=(3), order='C']
Transform 3D point from local to world frame: p_world = R @ p + t
SE3 Composition
from embodik import Rt, SE3
T1 = Rt(R=np.eye(3), t=[1, 0, 0])
T2 = Rt(R=np.eye(3), t=[0, 1, 0])
T_composed = T1 * T2 # Pinocchio: ^A M_B * ^B M_C = ^A M_C
SE3 Point Transforms
p_world = T.act(p_local) # p_world = R @ p_local + t
p_local = T.actInv(p_world) # p_local = R.T @ (p_world - t)
Low-Level Utilities
Native C++ functions exposed for advanced use:
| Function | Description |
|---|---|
log3(R) |
Axis-angle from 3×3 rotation matrix |
exp3(omega) |
3×3 rotation matrix from axis-angle |
matrix_to_quaternion_wxyz(R) |
Matrix → [w,x,y,z] quaternion |
matrix_to_quaternion_xyzw(R) |
Matrix → [x,y,z,w] quaternion |
quaternion_wxyz_to_matrix(w,x,y,z) |
[w,x,y,z] → 3×3 matrix |
quaternion_xyzw_to_matrix(x,y,z,w) |
[x,y,z,w] → 3×3 matrix |
rotation_from_rpy(r,p,y) |
Roll-pitch-yaw → 3×3 matrix |