Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Cameras don't want to reconnect on Pi Reboot. #38

Closed
Daltz333 opened this issue Apr 12, 2018 · 7 comments
Closed

Cameras don't want to reconnect on Pi Reboot. #38

Daltz333 opened this issue Apr 12, 2018 · 7 comments
Labels

Comments

@Daltz333
Copy link

Info:
Raspberry Pi3 2 USB Camera Server using the example Script
RoboRIO is Java
Cameras are Logitech C270s

Issue:
CameraServer script starts up on bootup and runs normally, sending camera info. The issue is when the Pi rebooted via 'sudo reboot now' or by quickly turning the robot on and off, it refuses to initialize the second camera. It can be fixed by unplugging the second camera and plugging it back in. Or by turning the robot off, unplugging the battery, waiting a few seconds and turning it back on I an willing to send bug reports if told how to.

@virtuald
Copy link
Member

Are there error messages of any kind?

@Daltz333
Copy link
Author

I can't tell. It only does it on startup and I don't have any logging set up. When I return it manually to see console messages, everything works. I doubt it's my startup script.

@Daltz333
Copy link
Author

Correction: When I re-run it manually

@Daltz333
Copy link
Author

Issue is duplicated on a second Pi. Also it only does it to the second camera initialized. If camera 2 becomes camera 1, and the original cam 1 is can 2. Then the new cam 2 is the one not initial. Aka the second one initialized in the example usb script.

@virtuald
Copy link
Member

Take a look at the output of dmesg and see if there are any error messages.

It's also possible that the video subsystem just hasn't initialized by the time cscore starts. You could try adding in a 5 second sleep (not ideal), or see if there's a way to determine if video has been fully initialized before you start using the camera.

@virtuald virtuald transferred this issue from robotpy/robotpy-wpilib Dec 2, 2018
@virtuald
Copy link
Member

virtuald commented Dec 2, 2018

Did you ever find out more information about this? Otherwise I'm just going to close it.

@Daltz333
Copy link
Author

Daltz333 commented Dec 2, 2018

I was not able to find any information on it. Because it happened so sporadically and at the competition I was always in such a rush. I'll reopen if I get any more information.

@Daltz333 Daltz333 closed this as completed Dec 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants