wpilibsuite / PathWeaver

Desktop application for generating motion paths
Other
64 stars 68 forks source link

Buttons to flip paths based on the field rather than the initial point. #93

Open ajcorey opened 6 years ago

ajcorey commented 6 years ago

Two new buttons or replacements for flip-H and flip-V for flipping the paths based on the field rather than the initial point of the path.

Besides being useful for creating autos for different alliance sides, it would also eliminate the problem of paths not being able to flip should they be placed outside the field. Flipping or mirroring based on the field would keep everything that was in the field pre-flip, in the field.

gftabor commented 6 years ago

So the current way to achieve this is to flip the path and then drag the entire path into the new position. The reason we didn't immediately make the flip-H and flip-V version you propose is that the field isn't necessary symmetrical about those axis. The Power Up field for instance isn't symmetric about the X or Y axis and is only symmetric rotationally. So in just about every case you would be dragging the path anyway.

We will revisit this design decision.

jasondaming commented 3 years ago

@ajcorey I think this is an acceptable answer or do you disagree?

17acres commented 1 year ago

This option would make sense to have for this season, I think? Especially since it looks like you can't mirror a Trajectory in wpilibj, only rotate or translate. I guess you could do the math to figure out how to achieve a mirror using transform2d, but it would be a pain.