Shortcuts

pypose.vec2skew

pypose.vec2skew(input)[source]

Convert batched vectors to skew matrices.

Parameters

input (Tensor) – the tensor \(\mathbf{x}\) to convert.

Returns

the skew matrices \(\mathbf{y}\).

Return type

Tensor

Shape:

Input: (*, 3)

Output: (*, 3, 3)

\[{\displaystyle \mathbf{y}_i={\begin{bmatrix}\,\, 0&\!-x_{i,3}&\,\,\,x_{i,2}\\\,\,\,x_{i,3}&0&\!-x_{i,1} \\\!-x_{i,2}&\,\,x_{i,1}&\,\,0\end{bmatrix}}} \]

Note

The last dimension of the input tensor has to be 3.

Example

>>> pp.vec2skew(torch.randn(1,3))
tensor([[[ 0.0000, -2.2059, -1.2761],
        [ 2.2059,  0.0000,  0.2929],
        [ 1.2761, -0.2929,  0.0000]]])

Docs

Access documentation for PyPose

View Docs

Tutorials

Get started with tutorials and examples

View Tutorials

Get Started

Find resources and how to start using pypose

View Resources