Transform2d

constructor(translation: Vector2d<DistanceUnit>, rotation: Rotation2d)(source)


constructor(translation: Vector2d<DistanceUnit>, rotation: Double)(source)

Constructs a Transform2d from a translation vector and rotation angle.

Parameters

translation

the translational component

rotation

the rotation angle in radians


constructor(x: Distance, y: Distance, rotation: Rotation2d)(source)

Constructs a Transform2d from x and y distance measurements and a rotation.

Parameters

x

the x-component of translation

y

the y-component of translation

rotation

the rotational component


constructor(x: Distance, y: Distance, rotation: Angle)(source)

Constructs a Transform2d from x and y distance measurements and a rotation angle.

Parameters

x

the x-component of translation

y

the y-component of translation

rotation

the rotation angle measurement


constructor(x: Double, y: Double, rotation: Rotation2d)(source)

Constructs a Transform2d from x and y coordinates (in inches) and a rotation.

Convenience constructor that assumes inch units for translation.

Parameters

x

the x-component of translation in inches

y

the y-component of translation in inches

rotation

the rotational component


constructor(x: Double, y: Double, rotation: Double)(source)

Constructs a Transform2d from x and y coordinates (in inches) and a rotation angle (in radians).

Convenience constructor that assumes inch units for translation and radians for rotation.

Parameters

x

the x-component of translation in inches

y

the y-component of translation in inches

rotation

the rotation angle in radians


constructor(initial: Pose2d, final: Pose2d)(source)

Constructs a Transform2d representing the transformation from one pose to another.

This computes the relative transformation: \(T = P_{initial}^{-1} \circ P_{final}\)

Parameters

initial

the starting pose

final

the ending pose