Skip to content

Commit

Permalink
reduce simulated azmth noise
Browse files Browse the repository at this point in the history
  • Loading branch information
gerth2 committed Jan 23, 2024
1 parent 2b06b90 commit daa7276
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivetrain/swerveModuleControl.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def update(self):
if wpilib.TimedRobot.isSimulation():
# Simulation - assume module is almost perfect but with some noise
self.actualState.angle = self.optimizedDesiredState.angle + \
Rotation2d.fromDegrees(random.uniform(-2,2))
Rotation2d.fromDegrees(random.uniform(-1,1))
self.actualState.speed = self.optimizedDesiredState.speed + \
random.uniform(-0.1, 0.1)
self.actualPosition.distance += self.actualState.speed * 0.02
Expand Down

0 comments on commit daa7276

Please sign in to comment.