Shortcuts

pypose.cart2homo

pypose.cart2homo(coordinates)[source]

Converts batched Cartesian coordinates to Homogeneous coordinates by adding ones to last dimension.

Parameters:

coordinates (torch.Tensor) – the Cartesian coordinates to be converted.

Returns:

the coordinates in Homogeneous space.

Return type:

torch.Tensor

Note

The last dimension of the input coordinates can be any dimension.

Example

>>> points = torch.randn(2, 2)
>>> cart2homo(points)
tensor([[ 2.0598,  1.5351,  1.0000],
        [-0.8484,  1.2390,  1.0000]])
>>> points = torch.randn(2, 3)
>>> cart2homo(points)
tensor([[ 1.7946,  0.3548, -0.4446,  1.0000],
        [ 0.3010, -2.2748, -0.4708,  1.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