What type of coordinate system is Jaci’s https://github.com/JacisNonsense/Pathfinder/wiki/PathfinderforFRCJava?
Also, how do I find the waypoints I want to use to generate the path?
Thanks in advance
What type of coordinate system is Jaci’s https://github.com/JacisNonsense/Pathfinder/wiki/PathfinderforFRCJava?
Also, how do I find the waypoints I want to use to generate the path?
Thanks in advance
The coordinate system is just standard x, y, and theta. Note that theta must be in radians. The units of x and y don’t matter as long as you are consistent. If you provide coordinates in feet, you must provide velocity and acceleration in ft/s and ft/s^2, and your output will be in feet and ft/s.
I found it useful to use a CAD model of the field to define my waypoints relative to the field.
It’s just a 2D Cartesian plane. Units and orientation are arbitrary (the program has no way of knowing how its coordinate system actually maps to reality  that depends on your use of it). Angles are measured counterclockwise from the +x axis (as is usual).
A quick search on CD also gives you this info:
And as other people have mentioned, use whatever units are most convenient. Just stay consistent.
Wait, X is vertical and Y is horizontal? Are there any examples?
You can orient the coordinate plane any way you want, as long as you are consistent. Since, as I mentioned above, angle is measured counterclockwise from the +x axis, a starting waypoint of (0,0,0) for (x,y,theta) will correspond to a robot at the origin facing in the +x direction.
If you do not like this, and would rather have the robot face in the +y direction, all you need to do is start with a waypoint of (0,0,pi/2) instead.
Where do I put the origin? Sorry I am kind of a noob.
A visual would help.
Wherever you choose to put the origin.
You need to understand that Pathfinder does not know, nor care, how you use its output, or how its parameters correspond to realworld positions.
All pathfinder knows about is its own internal coordinate system, which is as I’ve described  a 2D cartesian plane, with headings measured in radians counterclockwise from the +x axis. This is purely an abstraction. When applying this abstraction to a real robot and field, you can make any choice about the concrete location, orientation, and scaling of that coordinate plane. It cannot possibly make any difference to Pathfinder, which does not know and does not care which specific coordinate system it is calculating relative to. As long as you are consistent, it will work.
X is forward positive from where your robot starts, and Y is right positive from where your robot starts. Angle (theta) is your desired robot heading in radians, which you can convert to/from degrees with the r2d and d2r functions provided by Pathfinder.
You can set the origin point to whatever you like. If you want your origin to be the same as your robots initial position, set it as 0,0, else, set it to your robots position relative to the robots starting position
So which coordinate is right:
(1,0)


_____ +________
(1, 0) (0.0) (1,0)
Which is coordinate 1,0? I feel like I am missing the whole point, but I am really confused.
Assume 0, 0 is where my robot is and is point straight.
Thanks
That did not look Like I wanted it to.
Are you sure about this? I’m looking at our pathgen code (which calls pathfinder) right now and am seeing positive Y values (and angles) for leftwards movement (check the “blueRight” profile for an example), and I’m pretty sure we’re not switching robot sides in order to achieve that. Additionally, +x forward and +y right wouldn’t be a standard Cartesian plane  the yaxis would be inverted.
Starting orientation should be arbitrary, as well, because you can set the heading on the initial waypoint.
#####(1,0)######
##############
##############
_____ +________
(1, 0) (0.0) (1,0)
That is why I am so confused.
Assuming the quote I posted earlier is still valid, the correct one is bolded. Since the robot is facing upwards +X axis is also upward. The points along the bottom are therefore (0,1), (0,0) and (0,1) respectively since right is +Y and left is Y. The quote I posted is straight from the person who wrote pathfinder.
It depends on how your differential drive is set up. Inverting your turn variable will make right positive, but overall it doesn’t matter
We send the profiles from the tank drive modifier directly to each side of the drive (we’re following profiles using the TalonSRX MP mode). I’m almost positive, from looking at our code, that going from (0,0,0) to, say, (1,1,pi/2) would result in the “right profile” going further than the “left profile” (thus, a left turn).