simulation.utils.geometry.transform module

Transformation.

Summary

Classes:

Transform

Transformation class consisting of a translation and a rotation.

Reference

class Transform(*args, frame=None)[source]

Bases: object

Transformation class consisting of a translation and a rotation.

A Transform object can be used to easily interchange between multiple coordinate systems (which can be transformed in one another via a rotation and a translation.

Initialization can be done in one of the following ways:

Parameters
  • 1 (geometry_msgs/Transformation) – initialize from geometry_msgs.

  • 2 (Vector, float) – Second argument is the transformation’s rotation angle in radian.

  • 3 (Vector, pyquaternion.Quaternion) – Vector and quaternion.

tranlation
Type

Vector

rotation
Type

pyquaternion.Quaternion

property inverse
get_angle(axis=Vector(0.0, 0.0, 1.0)) → float[source]

Angle of rotation.

Parameters

axis – Axis the rotation is projected onto.

Returns

The angle that a vector is rotated, when this transformation is applied.

to_geometry_msg() → geometry_msgs.msg._Transform.Transform[source]

Convert transform to ROS geometry_msg.

Returns

This transformation as a geometry_msgs/Transform.

to_affine_matrix() → numpy.ndarray[source]

Get transformation as an affine matrix.