|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Broken cameras...Anyone?
Patrick, First, we already have all the camera code in a try-catch and an if statement checking if (null!=image) where image is the new image.
--Second, we may not have to reimage, I wasn't at the practice and that's what everyone who was there said. --Third, I don't know, that's part of our problem. Garrett, the code isn't outputting any error messages when this happens, we put in a check for camera.freshImage() which seems to return false once or twice, and then return true the rest of the time, bypassing the rest of the camera code. As for the zip-tie and tape, we have alreadey tried holding the power cord in with a rubberband around the entire camera, but that doesn't seem to be the problem because we are getting live feed the the SmartDashboard the whole time except for extreme cases. The camera is getting jostled around a bit, and is attached to the top of the shooter mechanism so the image goes blurry when we shoot, could that have loosend some of internal parts? Ruffles, thanks for the idea, I'll suggest that to the team. |
|
#2
|
||||
|
||||
|
Re: Broken cameras...Anyone?
Quote:
Some electronics are vibration sensitive. IE, out of the box, they will freak out if they are submitted to intense vibrations. The KOP camera is rugged and therefor resistant to vibrations, though most webcams that I have messed with can freak out if they are shaken up a little too much. If this is your problem, then all data from the camera would be useless while there is major vibration (aka, camera code doesn't work and the dashboard doesn't work). From what you have said, this is not the case. Even when your code quits working, your live feed continues to function. Check to make sure that your camera is compatible with everything that you are using. I don't know much about coding for cameras, so dismiss this if it is not possible. Would two different programs (dashboard and image processing) have a conflict if they both tried to read the same piece of data at the same time? Theoretically, the dashboard program is really robust and therefor isn't severely affected by this hiccup, but your code might just crash because of it. A way to test for this is to figure out how to ensure that there are dedicated "image processing" frames, and dedicated "live feed" frames. Disclaimer: I have never coded for a FIRST robot, what I wrote above is based on experience with Arduino and various other java base languages. It may or may not be applicable to this application. Check with someone who knows more about these things. ![]() |
|
#3
|
||||
|
||||
|
Re: Broken cameras...Anyone?
Thanks for the idea, we tried turning off the camera widget on the Dashboard, but it didn't help. We did another test and discovered that the problem is caused by the jostling of the robot. We managed to get 8 pictures in a row by driving no faster than 1/4 full speed, but the camera stopped working when we went faster.
Oh, and we are using the KOP camera |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|