Log in

View Full Version : Camera never finds target, stays at "Searching..."


Mike
19-01-2006, 19:23
We finally got our robot/camera all set up tonight. I managed to calibrate the camera using LabVIEW, and it tracks consistently through that. However, when I load Kevin's code onto the RC it stays in the "Searching..." mode. I edited all the options in tracking.h, DEBUG goes through all 18 states and then into searching.

Any idea on whats wrong?

Thanks,
Mike

EDIT: I would try the serial port diagnostics program, but our school doesn't give us wireless access, so I can't get it on my programming laptop :(

Tom Bottiglieri
19-01-2006, 19:34
We got the same error.

Solution: give up.

Cuog
19-01-2006, 19:45
try using camera_s or whatever (the simplified version) we had the same problem but the no bells and wistles version solved our problem

devicenull
19-01-2006, 19:55
I had that problem.. the solution was to roll back to the default values that came with the code. From there, once it works, you can slowly start tweaking things one at a time to make it work a little better.

Go try the default code with no changes.

Greg Marra
19-01-2006, 20:19
I wonder if the camera would work better if they made it track an infrared light source and the put a visible light filter over the lens...

An offseason project, I guess.

Mike
19-01-2006, 20:37
Thanks for the help...

We are using the simplified version.

Sadly, I have to work tomorrow night (boo!) so I won't be able to go into robotics and try out the rolling back idea. I might get access on Saturday, so I'll post then if/when I have a problem.

Thats probably a good idea in theory Greg, but I couldn't imagine how much IR interference there would be. I wasn't around in ye olden days (04) to program with the IR beacons, but from what I've heard such small things as the auto-focus on a camera (which uses IR to sense the distance) can cause interference.

Kevin Watson
19-01-2006, 20:38
We finally got our robot/camera all set up tonight. I managed to calibrate the camera using LabVIEW, and it tracks consistently through that. However, when I load Kevin's code onto the RC it stays in the "Searching..." mode. I edited all the options in tracking.h, DEBUG goes through all 18 states and then into searching.

Any idea on whats wrong?

Thanks,
Mike

EDIT: I would try the serial port diagnostics program, but our school doesn't give us wireless access, so I can't get it on my programming laptop :(The solution it to just use the default values included in the code. You should literally be able to load the copy of camera.hex from the zip file and have it work out of the box.

-Kevin

Kevin Watson
19-01-2006, 20:44
We got the same error.

Solution: give up.Couldn't you be a bit more constructive?

-Kevin

EricH
19-01-2006, 20:48
Thats probably a good idea in theory Greg, but I couldn't imagine how much IR interference there would be. I wasn't around in ye olden days (04) to program with the IR beacons, but from what I've heard such small things as the auto-focus on a camera (which uses IR to sense the distance) can cause interference.
Well, if we're talking FLL, we had to set all the cameras in the room to manual focus when we were using the robot. If we didn't, the robot would do whatever it felt like. So, it is true that a camera's auto focus can cause interference quite easily; I'm just not sure of the extent in FIRST.

Mike
19-01-2006, 21:12
The solution it to just use the default values included in the code. You should literally be able to load the copy of camera.hex from the zip file and have it work out of the box.

-Kevin
Ahh, I'll try that first thing when I get bot access. I thought we had to use the LabVIEW program to get the values for the code.

So what's the point of the LabVIEW program?

devicenull
19-01-2006, 21:41
Ahh, I'll try that first thing when I get bot access. I thought we had to use the LabVIEW program to get the values for the code.

So what's the point of the LabVIEW program?

It lets you fine tune your tracking stuff. I found I needed to enable the noise filter a little, and change some color values.

If you change the config to everything that labview works, stuff stops working.

I think I changed the stuff for Track_Color a little, and increased NF_DEFAULT to 3. Past that, not much I need to do

bombadier337
19-01-2006, 22:43
The solution it to just use the default values included in the code. You should literally be able to load the copy of camera.hex from the zip file and have it work out of the box.

-Kevin

And that it did Mr. Watson. This year Team 1541 will definately be using the camera!

esquared
22-01-2006, 12:47
Ahh, I'll try that first thing when I get bot access. I thought we had to use the LabVIEW program to get the values for the code.

So what's the point of the LabVIEW program?

Mike,
Our team used LabVIEW to come up with the correct calibration values just like you did. Similarly, when we went to use the bells and whistles code on the robot (the EduRC actually) it seemed to lose track of what we had told it. The key is that the camera code by default puts the camera BACK into RGB even if you did your calibration values. This isn't a simple switch in camera.h, turns out it's actually a bit in the COMA register (the bit ID escapes me at the moment but it is documented).
Once we figured that out, we had our EduRC bot with the bells and whistles code following our GLOD* with no more issues, based on the 'highly calibrated' Labview values.
-Eric

*GLOD=Green Light Of Doom