[choreolib] Add trajectory mirroring for x and y#1452
[choreolib] Add trajectory mirroring for x and y#1452RohanBhattacharyya wants to merge 19 commits intoSleipnirGroup:mainfrom
Conversation
…ohanBhattacharyya/1452
…ohanBhattacharyya/1452
|
Looks good, but I would recommend adding mirrorX() and mirrorY() instance methods to AutoTrajectory, so you could just do
|
Alright, I added that. |
| return ChoreoAllianceFlipUtil.getFlipper().flip(this); | ||
| } | ||
|
|
||
| @Override |
There was a problem hiding this comment.
Added new public methods:
DifferentialSample::mirrorYandDifferentialSample::mirrorXSwerveSample::mirrorYandSwerveSample::mirrorX
| public class ChoreoAllianceFlipUtil { | ||
| /** The flipper to use for flipping coordinates. */ | ||
| public static enum Flipper { | ||
| public abstract static class Flipper { |
There was a problem hiding this comment.
Flipper is no longer an enum with MIRRORED and ROTATE_AROUND, it is an abstract class with factories and instance utility methods.
calcmogul
left a comment
There was a problem hiding this comment.
The Copilot output wasn't great.
choreolib/src/main/native/include/choreo/trajectory/DifferentialSample.h
Outdated
Show resolved
Hide resolved
choreolib/src/main/native/include/choreo/trajectory/DifferentialSample.h
Outdated
Show resolved
Hide resolved
choreolib/src/main/native/include/choreo/trajectory/DifferentialSample.h
Outdated
Show resolved
Hide resolved
choreolib/src/main/native/include/choreo/trajectory/SwerveSample.h
Outdated
Show resolved
Hide resolved
choreolib/src/main/native/include/choreo/trajectory/SwerveSample.h
Outdated
Show resolved
Hide resolved
choreolib/src/main/native/include/choreo/trajectory/DifferentialSample.h
Outdated
Show resolved
Hide resolved
|
I updated the port to C++ and Python with codex. |
|
Please don't use an LLM to address review comments like this. It generated a lot of bad code, and I don't want to spend the time annotating everything it messed up. |
Alright, I undid the LLM-based commits. Please add the help: needs C++ and help: needs Python tags. This is reverted to before the Python and C++ ports. |
Allows the user to create a mirrored trajectory over the length or width.
Example usage would be if an auto was made for one side of the trench, but the user wants to run it for the other side in 2026 REBUILT.
Example usage: