Cartesian
Rotational utilities from Cartesian to Robot space.
The Cartesian Coordinate System is a 2D coordinate system where the x-axis goes to the right (pos X) and the y-axis goes up/forward (pos Y). Angles on the Cartesian Coordinate System are measured clockwise from the positive y-axis.
The Robot Coordinate System is a 2D coordinate system where the x-axis goes up/forward (pos X) and the y-axis goes left (pos Y), and the angles are measured anti-clockwise from the positive x-axis. This is the coordinate system used by the RoadRunner library, and perfectly models a Unit Circle.
In general, using a simplified rotation matrix, converting to Robot space involves rotating the Cartesian coordinates by 90 degrees clockwise (x,y,r) -> (y,-x,-r). Conversion back to Cartesian space involves rotating the Robot coordinates by 90 degrees anti-clockwise (x,y,r) -> (-y,x,-r).
Author
Lucas Bubner, 2023
Since
1.0.0-pre