Transform

June 1, 2023 ยท View on GitHub

from tdw.object_data.transform import Transform

Positional data for an object, robot body part, etc.


Fields

  • position The position vector of the object as a numpy array: [x, y, z] The position of each object is the bottom-center point of the object. The position of each Magnebot body part is in the exact center of the body part. y is the up direction.

  • rotation The rotation quaternion of the object as a numpy array: [x, y, z, w] See: tdw.quaternion_utils.QuaternionUtils.

  • forward The forward directional vector of the object as a numpy array: [x, y, z]


Functions

__init__

Transform(position, rotation, forward)

ParameterTypeDefaultDescription
positionnp.ndarrayThe position vector of the object as a numpy array.
rotationnp.ndarrayThe rotation quaternion of the object as a numpy array.
forwardnp.ndarrayThe forward directional vector of the object as a numpy array.