unitPose

open fun unitPose(pose: Pose2d, distanceUnit: Distance, angleUnit: Angle): Pose2d

Convert a Pose2d of specified units to inches and radians. Convenient for having unit-defined poses that need to be of the same unit of default RoadRunner poses, such as adding vectors for relative movement.

Return

The converted pose

Parameters

pose

The pose to convert

distanceUnit

The unit of the pose's distance

angleUnit

The unit of the pose's angle


open fun unitPose(pose: Pose2d, distanceUnit: Distance, angleUnit: Angle, scalarDistMult: Double): Pose2d

Convert a Pose2d of specified units to inches and radians. Convenient for having unit-defined poses that need to be of the same unit of default RoadRunner poses, such as adding vectors for relative movement.

Return

The converted pose

Parameters

pose

The pose to convert

distanceUnit

The unit of the pose's distance

angleUnit

The unit of the pose's angle

scalarDistMult

The vector scalar, in the unit of distanceUnit.