distanceTo

fun Pose2d.distanceTo(targetLocation: Translation2d): Distance

Calculates the distance from a robot pose to an arbitrary field location.

Receiver

Pose2d The robot's current pose.

Return

Distance The distance to the target location.

Parameters

targetLocation

The target location on the field.


fun Pose2d.distanceTo(targetPose: Pose2d): Distance

Calculates the distance from a robot pose to another pose on the field.

Receiver

Pose2d The robot's current pose.

Return

Distance The distance to the target pose.

Parameters

targetPose

The target pose on the field.