Coordinates
Pedro Pathing uses a right-hand coordinate system, which is nonstandard to the FTC SDK Standard.
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 radians (90 degrees), facing left is radians (180 degrees), and facing down is 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

