PhotonVision / photonvision

PhotonVision is the free, fast, and easy-to-use computer vision solution for the FIRST Robotics Competition.
https://photonvision.org
GNU General Public License v3.0
277 stars 194 forks source link

CameraServer is lost on code deploy to roborio #427

Open bruingineer opened 2 years ago

bruingineer commented 2 years ago

Everytime we deploy code to the roboRIO, the CameraServer does not show up in network tables. After a power cycle of the robot, the camera server shows up again.

Has anyone seen this behavior before?

in robotInit():

var cameraName = "mmal_service_16.1";
camera = new PhotonCamera(cameraName);
bruingineer commented 2 years ago

I solved this by adding

var cameraName = "mmal_service_16.1";
if (camera == null)
        camera = new PhotonCamera(cameraName);

to robotPeriodic() or similar

bruingineer commented 2 years ago

We are still getting

PhotonVision coprocessor at path /photonvision/mmal_service_16.1 not found on NetworkTable!

in our robot log when we deploy code to the robot.

It resolves itself on a robot power cycle.

legoguy1000 commented 2 years ago

We have also experienced this issue as well. It appears to be very inconsistent on when it appears.

trevnels commented 2 years ago

We're seeing this as well. Restarting photon or unplugging/replugging our coprocessor seems to be a working temporary fix.

srimanachanta commented 11 months ago

Is this issue still happening?

var cameraName = "mmal_service_16.1";
if (camera == null)
        camera = new PhotonCamera(cameraName);

to robotPeriodic() or similar

I would need to see more of your code implementation to trace an issue here. It could be in your robot code or the backend not publishing data to NT