Skip to content

Commit d730cec

Browse files
committed
fix six ball waypoints and stopped instant shooting in shoot-move
1 parent 5430037 commit d730cec

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

autonomous/autonomous.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,11 @@ def move(self, tm: float) -> None:
172172
self.next_state("move_shoot")
173173

174174
@state
175-
def move_shoot(self, tm: float) -> None:
175+
def move_shoot(self, tm: float, state_tm: float) -> None:
176176
self.do_move(tm)
177177
self.shooter_control.lead_shots = True
178-
self.shooter_control.fire()
178+
if state_tm > 0.2:
179+
self.shooter_control.fire()
179180

180181
traj_time = tm - self.trajectory_start_time
181182
if traj_time > self.current_trajectory.totalTime() and (
@@ -461,22 +462,22 @@ def setup(self) -> None:
461462
Movement(
462463
WaypointType.MOVE_SHOOT,
463464
TrajectoryGenerator.generateTrajectory(
464-
start=Pose2d(-6.95, -2.8, Rotation2d.fromDegrees(45)),
465-
end=Pose2d(-4.23, 0.8, Rotation2d.fromDegrees(45)),
465+
start=Pose2d(-6.95, -2.8, Rotation2d.fromDegrees(53)),
466+
end=Pose2d(-4.23, 0.8, Rotation2d.fromDegrees(53)),
466467
interiorWaypoints=[],
467468
config=self.shoot_trajectory_config,
468469
),
469-
Rotation2d.fromDegrees(45),
470+
Rotation2d.fromDegrees(-120),
470471
),
471472
Movement(
472473
WaypointType.SHOOT,
473474
TrajectoryGenerator.generateTrajectory(
474-
start=Pose2d(-4.23, 0.8, Rotation2d.fromDegrees(45)),
475-
end=Pose2d(-3.45, 1.85, Rotation2d.fromDegrees(45)),
475+
start=Pose2d(-4.23, 0.8, Rotation2d.fromDegrees(53)),
476+
end=Pose2d(-3.45, 1.85, Rotation2d.fromDegrees(53)),
476477
interiorWaypoints=[],
477478
config=self.trajectory_config,
478479
),
479-
Rotation2d.fromDegrees(45),
480+
Rotation2d.fromDegrees(60),
480481
),
481482
]
482483

0 commit comments

Comments
 (0)