Pedro Pathing 2.0.0 has released! If you haven't already, migrate now.
Pedro Pathing LogoPedro Pathing

Coordinates

Pedro Pathing uses a right-hand coordinate system, which is nonstandard to the FTC SDK Standard.

Pedro Pathing Decode FTC Coordinate System

As shown, as a robot moves to the right in the image below, x increases. As a robot moves up on the field image, y increases.

A robot facing towards the right side of the image is at a heading of 0 radians (0 degrees), facing up is π2\frac{\pi}{2} radians (90 degrees), facing left is π\pi radians (180 degrees), and facing down is 3π2\frac{3\pi}{2} radians (270 degrees). Thus, counterclockwise rotation is positive rotation, similar to a unit circle.

To convert FTC Coordinates for the Decode game into Pedro's coordinates, first declare a Pose in FTC coordinates (inverted for decode). Let's say you have Pose2D (a class in the FTC SDK) ftcPose2d with your coordinates from a camera. You can use Pose ftcStandard = PoseConverter.pose2DToPose(ftcPose2d, InvertedFTCCoordinates.INSTANCE); to convert this to Pedro's Pose class. Then, you need to convert to Pedro coordinates using ftcStandard.getAsCoordinateSystem(PedroCoordinates.INSTANCE);

Last updated on