I have PhotonVision running on a raspberry pi connected to the robot with a network switch. When I deploy the code, I immediately get the following error. Also, in the driver station, the robot code indicator shows up as red even though the code successfully deployed. Here’s the error:
Unhandled exception instantiating robot org.photonvision.PhotonCamera java.lang.NoSuchMethodError: 'edu.wpi.first.networktables.RawTopic edu.wpi.first.networktables.NetworkTable.getRawTopic(java.lang.String)'
Error at org.photonvision.PhotonCamera.<init>(PhotonCamera.java:121): Unhandled exception instantiating robot org.photonvision.PhotonCamera java.lang.NoSuchMethodError: 'edu.wpi.first.networktables.RawTopic edu.wpi.first.networktables.NetworkTable.getRawTopic(java.lang.String)'
at org.photonvision.PhotonCamera.<init>(PhotonCamera.java:121)
at org.photonvision.PhotonCamera.<init>(PhotonCamera.java:145)
at frc.robot.Robot.<init>(Robot.java:71)
at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:322)
at edu.wpi.first.wpilibj.RobotBase.startRobot(RobotBase.java:463)
at frc.robot.Main.main(Main.java:23)
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:336): 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.
Could not instantiate robot org.photonvision.PhotonCamera!
Error at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:342): Could not instantiate robot org.photonvision.PhotonCamera!
and here’s the line of code that’s apparently causing the problem (Java):
PhotonCamera camera = new PhotonCamera("photonvision");
If it helps, I’m also getting an error in the PV UI that says networktables/the robot isn’t connected, which may or may not be relayed
anyone know the problem?
(I’m sure it’s some dumb thing I missed lol)