My friend needs help in programming the camera; if anyone knows how to program the camera then your help will be greatly appreciate:cool:
Could you tell exactly what do you need about the camera?
Our camera is not tracking the target so want do we do?
Please have your programmer friend ask for help directly. Going through an intermediary is likely to make for ineffective communication.
The TechnoKats are using LabVIEW. So far we’ve not had to do any camera programming, because the provided code works perfectly for tracking a well-lit target.
Can you see some image on the dashboard when the program is running???
! am a programmer for team 2051(beattie bulldogs) and we are not getting either an image on our dashboard or the camera to track the target. We are using the test code, but a new camera because our old one was broken. Might that have an effect on the program?
Our team had the same problem. Only using Java for our runtime environment. We switched over to C++, and everything worked fine. If anyone is still having this problem, try re-imaging your cRIO, switching to C++ or messing with WindRiver’s config. We did have trouble with WindRiver compiling, but finally got the problem to resolve itself. It is annoying, and believe me, if it breaks again, I will destroy the camera once and for all.
I know/hope you are joking about destroying the camera since giving it to another team would hopefully be more rewarding and more beneficial for everyone.
Also, I’m not sure why you are blaming the camera. The camera is running a web server, and no team or even WPI code runs on it. All of the code is running on the cRIO or in the dashboard.
Greg McKaskle
well, we can’t seem camera images on the Dashboard, but can see images without the Dashboard.
we can see the images from the camera but i don’t know how do i track the traget?
could anybody please help me. we use java and i am one of the programmers of Team 1777.
your help would be really appreciated.
thanks.
If you look through the CircleTracker demo (It’s one of the FRC examples), it gives you what you need.
You’ll need the UpdateVisionDashboard.java (I think, still figuring it all out) and the Target.java files copied into your project, then you’ll need to work out the code in the TeleOp section of the CircleTracker Demo to see what needs to go in the Autonomous section of your code, assuming you’re building autonomous.
Be sure to kill the If statement surrounding the thing and checking for the trigger, or it won’t work.
I also recommend reading through all of the files to figure out what they do - translating each line/set of lines into English helps.
If you’re programming on Java with the camera, there may not be examples in the documentation. At least in the version of the programming documentation that we have, there are no vision examples for Java in the docs. There may be an update, but our team does not have it. This forced us to switch to C++ from Java, which is a whole problem of its own. I imagine that the examples from C++ could be easily turned into Java, so you might want to give that a try. I haven’t tried it myself, so I can’t say whether it is easy or not.
Is there anyone who is having problem programming their camera?
I’m one of the programmers on Team 1086 and I don’t necessarily have a problem with the camera, but have a problem with the loop.
I put my drive code in the CircleTrackerDemo code, hoping it would combine them both and the camera and the drive code would work. But I ran it and it’s only staying in the try and catch loops.
Any ideas on where to put the drive code? Or how to resolve this problem a different way?
try this. its a simple camera code maybe it will help?
HSLImage image; // Create and set up a camera instance AxisCamera
&camera = AxisCamera::getInstance(); camera.writeResolution(k160x120);
camera.writeBrightness(0); Wait(3.0); // loop getting images from the
camera and finding targets while (IsOperatorControl())
{ // Get a camera
image camera.GetImage(image.image);
// do something with image here . . . }
(This is the same person that was on the account of JAZAD1)
Then the camera wouldn’t be able to find the target.
Did I mention that the camera works and just the drive code doesn’t work/run? Oh, and I’m programming in Java.