2010 Camera and vision problems.

Can you post the relevant parts of your code? The includes and the camera code should be good.

Also, I don’t know if the camera /works/ after starting it up, only that it starts up. I’m going to put some tracking code on today at some point and try to see if the camera is working.

Also, has anyone heard of a team actually getting the camera working/sending to the dashboard? Because I think its possible that this is a first problem. Actually, has anyone gotten “2010ImageDemo” to compile?

I really wish I could tell what is FIRSTs fault, and what is mine. :stuck_out_tongue:

we got the code to compile but it didn’t seem to be working, held the target in front of it and it just said no valid targets, no video was sent to the dashboard. we are really confused and since this task is pretty important to us and we didn’t write the code, its safe to say that we are a little frustrated

Okay, I’m taking this to mean that first has the problem not us. Although, did you ever plug the camera into the computer just to make sure its focused?

Other than that it looks like we just have to wait for first to to fix it.

i did hook it up to a computer to check to see if its focused, it was a little bit out but not all that much

So I get into the lab today and the camera decides to initialize itself without a problem. Still getting no image on the dashboard though. I’m not getting any other data on the dashboard either though…is anyone else?


Annnnnnd now it’s decided to go back to not working. Can I throw this thing out of a window?

I’ll test the Java Camera Code tonight and see if it works correctly using the v19 image and the sample code.

I tested the sample code for Java and it seems ok, but it also has some gyro code in it so I stripped that out to show the bare minimum. Here you go…

It uses the Driver Station to Output Cam X and Y values.

CircleTrackerDemoStripped.zip (486 KB)

CircleTrackerDemoStripped.zip (486 KB)

So I guess this means that in C++ either the example is wrong or the WPILib is wrong…

Have you gotten the camera to at least instantiate? I can ping the camera ( with 0% packet loss from the cRio, and the user/pass combo is set up correctly but my code still hangs on AxisCamera::GetInstance().

Seeing Java and C++ use pretty much the same code base, I’d think it would work in one if it works in the other, I can test the C++ code tomorrow night.

If the C++ code does work, is there any way you can put together a list of what we might be doing wrong? I’m getting nowhere fast as of now.

With Java, it pretty much went.
Download: http://joule.ni.com/nidu/cds/view/p/lang/en/id/1534 and install it
Update cRio Image to v19 (Tick Format Controller)
Plug Camera into Laptop and Run Config Utility
Plug the camera into the robot using Port 2 and a Crossover Cable
Pull down the Netbeans plug-ins
Run the source code I posted on the last page

I’d assume it would be the same for Wind River, except you would need to download the update from http://first.wpi.edu/Images/CMS/First/WorkbenchUpdate20100107.exe for Workbench.

Hmm, only difference between your list and mine is that I manually edited the username and password rather than use the Config Utility. Does the Config Utility change anything else on the camera? I’ll give running that a shot once I get into the lab and post results.

Something else you may want to try, if you used Wind River last year is to uninstall it and delete all traces of it. Then reinstall, I think the location of WPILib.a moved down a directory and Wind River could be pointing to the wrong file.

You may also try searching for WPILib.a under C:\Windriver and deleting it, after that reinstall the Workbench update. If it can’t find WPILib.a then that’s your issue and you need to point to the current location. If you were using WPILIb source code to compile you WPILib.a file that can cause the issue as well. I haven’t seen the new version of WPILib source yet.

Yep, I have gotten past that point in the code. Duno if tracking works though because the lens was out of focus and is now dead, so I’m heading over to Fry’s to get another one.

The dashboard on the Driver Station doesn’t work though. :frowning:

Still absolutely no dashboard data with the 2010ImageDemo. I’m getting the code to run, however there’s an output line on the VxWorks console that worries me.

task 0x1df9a60 <FRC_cameraTask> deleted: errno=0 <0> status=0 <0>

No idea what it means, but it doesn’t look promising to me. Any help?

That means something deleted the camera Task. Usually by going out of scope. Make sure you don’t accidentally dispose the camera

I’m working on LabVIEW trying to solve the same problem. I’ve gotten the image to show up on the LabVIEW instrument, but not on the dashboard. I am getting the image from the cRio.

Hey does anyone know were the demo code is located I can’t find it anywhere.

Some people seem to be having a similar problem to what I had …
in my case the DSupdate did not update the dashboard (only the driver station). I only noticed because I installed the update on a second laptop and it looked different. I went back and checked the file date and it was not the same on the classmate. I had to run the DSupdate program, but tell it to uninstall, then run it again and install. Now it works.

  • Kevin