File tree Expand file tree Collapse file tree
src/main/deploy/pathplanner/paths Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ def mirror(inPath):
2424 if not waypoint ["nextControl" ] is None :
2525 waypoint ["nextControl" ]["y" ] = 8 - waypoint ["nextControl" ]["y" ]
2626
27+ for rotationTarget in doc ["rotationTargets" ]:
28+ rotationTarget ["rotationDegrees" ] = - rotationTarget ["rotationDegrees" ]
29+
2730 doc ["goalEndState" ]["rotation" ] *= - 1
2831
2932 doc ["idealStartingState" ]["rotation" ] *= - 1
Original file line number Diff line number Diff line change 1+ Python mirror-path.py " ../src/main/deploy/pathplanner/paths/Left Sweep & Scatter.path" " ../src/main/deploy/pathplanner/paths/Right Sweep & Scatter.path"
2+ Python mirror-path.py " ../src/main/deploy/pathplanner/paths/Left Sweep Reset.path" " ../src/main/deploy/pathplanner/paths/Right Sweep Reset.path"
3+ Python mirror-path.py " ../src/main/deploy/pathplanner/paths/Left Sweep Standard.path" " ../src/main/deploy/pathplanner/paths/Right Sweep Standard.path"
Original file line number Diff line number Diff line change 127127 "rotationTargets": [
128128 {
129129 "waypointRelativePos": 0.5,
130- "rotationDegrees": 0.0
130+ "rotationDegrees": - 0.0
131131 },
132132 {
133133 "waypointRelativePos": 1.5,
134- "rotationDegrees": - 90.0
134+ "rotationDegrees": 90.0
135135 },
136136 {
137137 "waypointRelativePos": 4.376058041112453,
138- "rotationDegrees": 91.0
138+ "rotationDegrees": - 91.0
139139 },
140140 {
141141 "waypointRelativePos": 5.0,
142- "rotationDegrees": 0.0
142+ "rotationDegrees": - 0.0
143143 }
144144 ],
145145 "constraintZones": [
Original file line number Diff line number Diff line change 127127 "rotationTargets": [
128128 {
129129 "waypointRelativePos": 0.5,
130- "rotationDegrees": 0.0
130+ "rotationDegrees": - 0.0
131131 },
132132 {
133133 "waypointRelativePos": 1.5,
134- "rotationDegrees": - 90.0
134+ "rotationDegrees": 90.0
135135 },
136136 {
137137 "waypointRelativePos": 3.0031987205117416,
138- "rotationDegrees": - 90.0
138+ "rotationDegrees": 90.0
139139 },
140140 {
141141 "waypointRelativePos": 4.376058041112453,
142- "rotationDegrees": 91.0
142+ "rotationDegrees": - 91.0
143143 },
144144 {
145145 "waypointRelativePos": 5.365453818472621,
146- "rotationDegrees": 0.0
146+ "rotationDegrees": - 0.0
147147 }
148148 ],
149149 "constraintZones": [
You can’t perform that action at this time.
0 commit comments