gym_ignition.rbd

gym_ignition.rbd.conversions

class gym_ignition.rbd.conversions.Quaternion

Bases: abc.ABC

static from_matrix(matrix)
Return type

ndarray

static to_rotation(quaternion)
Return type

ndarray

static to_wxyz(xyzw)
Return type

ndarray

static to_xyzw(wxyz)
Return type

ndarray

class gym_ignition.rbd.conversions.Transform

Bases: abc.ABC

static from_position_and_quaternion(position, quaternion)
Return type

ndarray

static from_position_and_rotation(position, rotation)
Return type

ndarray

static to_position_and_quaternion(transform)
Return type

Tuple[ndarray, ndarray]

static to_position_and_rotation(transform)
Return type

Tuple[ndarray, ndarray]

gym_ignition.rbd.utils

gym_ignition.rbd.utils.extract_skew(matrix)

Extract the skew-symmetric part of a square matrix.

Parameters

matrix (ndarray) – A square matrix.

Return type

ndarray

Returns

The skew-symmetric part of the input matrix.

gym_ignition.rbd.utils.extract_symm(matrix)

Extract the symmetric part of a square matrix.

Parameters

matrix (ndarray) – A square matrix.

Return type

ndarray

Returns

The symmetric part of the input matrix.

gym_ignition.rbd.utils.vee(matrix3x3)

Convert a 3x3 matrix to a 3D vector with the components of its skew-symmetric part.

Parameters

matrix3x3 (ndarray) – The input 3x3 matrix. If present, its symmetric part is removed.

Return type

ndarray

Returns

The 3D vector defining the skew-symmetric matrix.

Note

This is the inverse operator of wedge().

gym_ignition.rbd.utils.wedge(vector3)

Convert a 3D vector to a skew-symmetric matrix.

Parameters

vector3 (ndarray) – The 3D vector defining the matrix coefficients.

Return type

ndarray

Returns

The skew-symmetric matrix whose elements are created from the input vector.

Note

The wedge operator can be useful to compute the cross product of 3D vectors: \(v_1 \times v_2 = v_1^\wedge v_2\).