Team3256 / FRC_Programming_2022

Team 3256's 2022 FRC Code.
Other
7 stars 0 forks source link

No Tuning File for Limelight Exception #48

Closed StarDylan closed 2 years ago

StarDylan commented 2 years ago
Illegal format in tzmappings file: illegal non-newline character found at line 1, offset 46.
Feb 20, 2022 2:11:55 PM frc.robot.subsystems.SwerveDrive <init>
INFO: Swerve Drive Modules Initialized
Feb 20, 2022 2:11:55 PM frc.robot.subsystems.IntakeSubsystem <init>
INFO: Intake Initialized
Feb 20, 2022 2:11:55 PM frc.robot.helper.Limelight init
WARNING: Limelight Not Responding
Error at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182): Unhandled exception: java.nio.file.InvalidPathException: Illegal char <:> at index 70: C:\Users\dylan\Documents\Github\FRC_Programming_2022\src\main\deploy\C:\Users\dylan\Documents\Github\FRC_Programming_2022\src\main\deploy\Polynomial.txt
    at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
    at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
    at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
    at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
    at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229)
    at java.base/java.nio.file.Path.of(Path.java:147)
    at java.base/java.nio.file.Paths.get(Paths.java:69)
    at frc.robot.helper.FileUtil.getFilePath(FileUtil.java:51)
    at frc.robot.helper.FileUtil.createFileIfDoesNotExist(FileUtil.java:40)
    at frc.robot.helper.FileUtil.readObjectFromFile(FileUtil.java:28)
    at frc.robot.helper.Limelight.readCorrectorFromFile(Limelight.java:104)
    at frc.robot.helper.Limelight.init(Limelight.java:34)
    at frc.robot.RobotContainer.configureButtonBindings(RobotContainer.java:91)
Limelight Not Responding

    at frc.robot.RobotContainer.<init>(RobotContainer.java:78)
    at frc.robot.Robot.robotInit(Robot.java:31)
    at edu.wpi.first.wpilibj.TimedRobot.startCompetition(TimedRobot.java:107)
    at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:373)
    at edu.wpi.first.wpilibj.RobotBase.lambda$startRobot$0(RobotBase.java:443)
    at java.base/java.lang.Thread.run(Thread.java:830)

Warning at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:388): The robot program quit unexpectedly. This is usually due to a code error.
  The above stacktrace can help determine where the error occurred.
  See https://wpilib.org/stacktrace for more information.
Error at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:395): The startCompetition() method (or methods called by it) should have handled the exception above.
[phoenix-diagnostics] Server could NOT be disposed properly. (State:0, dur:2691|201)

[phoenix] Library could NOT shutdown cleanly

[phoenix-diagnostics] Server could NOT be disposed properly. (State:0, dur:2691|0)

If it can't find a file it should just send a warning and not throw an exception.

3LucasZ commented 2 years ago

Finished. Please check pull request when available :).

StarDylan commented 2 years ago

Could you open the pull request @3LucasZ

3LucasZ commented 2 years ago

Is the problem not fixed yet @StarDylan ? Branch "limelight_tuning_file_exception_fix" was merged yesterday.

StarDylan commented 2 years ago

Yeah it still throws the error @3LucasZ, I'll get another stack trace today

StarDylan commented 2 years ago

New Stack Trace

2.00] Feb 23, 2022 1:55:27 PM frc.robot.subsystems.SwerveDrive <init>
[2.00] INFO: Swerve Drive Modules Initialized
[2.07] Feb 23, 2022 1:55:27 PM frc.robot.helper.FileUtil createFileIfDoesNotExist
[2.07] WARNING: No such file or directory
[2.08] java.io.IOException: No such file or directory
[2.08]  at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method)
[2.08]  at java.base/java.io.File.createNewFile(Unknown Source)
[2.08]  at frc.robot.helper.FileUtil.createFileIfDoesNotExist(FileUtil.java:44)
[2.08]  at frc.robot.helper.FileUtil.readObjectFromFile(FileUtil.java:28)
[2.08]  at frc.robot.helper.Limelight.readCorrectorFromFile(Limelight.java:104)
[2.08]  at frc.robot.helper.Limelight.init(Limelight.java:34)
[2.08]  at frc.robot.RobotContainer.<init>(RobotContainer.java:60)
[2.08]  at frc.robot.Robot.robotInit(Robot.java:28)
[2.08]  at edu.wpi.first.wpilibj.TimedRobot.startCompetition(TimedRobot.java:107)
[2.08]  at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:373)
[2.08]  at edu.wpi.first.wpilibj.RobotBase.startRobot(RobotBase.java:463)
[2.08]  at frc.robot.Main.main(Main.java:27)
[2.09]
[2.26] Feb 23, 2022 1:55:27 PM frc.robot.helper.FileUtil readObjectFromFile
[2.26] WARNING: frc.robot.helper.Polynomial; local class incompatible: stream classdesc serialVersionUID = 1130994487598520223, local class serialVersionUID = -6149684540517266987
[2.26] java.io.InvalidClassException: frc.robot.helper.Polynomial; local class incompatible: stream classdesc serialVersionUID = 1130994487598520223, local class serialVersionUID = -6149684540517266987
[2.26]  at java.base/java.io.ObjectStreamClass.initNonProxy(Unknown Source)
[2.26]  at java.base/java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
[2.26]  at java.base/java.io.ObjectInputStream.readClassDesc(Unknown Source)
[2.26]  at java.base/java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
[2.26]  at java.base/java.io.ObjectInputStream.readObject0(Unknown Source)
[2.26]  at java.base/java.io.ObjectInputStream.readObject(Unknown Source)
[2.26]  at java.base/java.io.ObjectInputStream.readObject(Unknown Source)
[2.26]  at frc.robot.helper.FileUtil.readObjectFromFile(FileUtil.java:32)
[2.26]  at frc.robot.helper.Limelight.readCorrectorFromFile(Limelight.java:104)
[2.26]  at frc.robot.helper.Limelight.init(Limelight.java:34)
[2.26]  at frc.robot.RobotContainer.<init>(RobotContainer.java:60)
[2.26]  at frc.robot.Robot.robotInit(Robot.java:28)
[2.26]  at edu.wpi.first.wpilibj.TimedRobot.startCompetition(TimedRobot.java:107)
[2.26]  at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:373)
[2.26]  at edu.wpi.first.wpilibj.RobotBase.startRobot(RobotBase.java:463)
[2.27]  at frc.robot.Main.main(Main.java:27)
3LucasZ commented 2 years ago

Wow, I remember when we had the test class for the limelight autocorrection function everything worked well. I will try to fix this again tomorrow or Friday.

3LucasZ commented 2 years ago

Is it throwing the error because of the existence of the classes I created or is somebody trying to call LimelightAutocorrectCommand and this happens?

3LucasZ commented 2 years ago

I ran a unit test: robot.helper.PolynomialTest > checkPolynomialIO PASSED

StarDylan commented 2 years ago

Weird, when you come in, you can check out the files on the robot, worst case we just hard-code the polynomial.

3LucasZ commented 2 years ago

Hm okay