View Full Version : Programming the axis camera......
programmr
07-01-2009, 13:00
hello, Let's just say i would like the axis camera to drive two motors connected to the digital side car pwm 1 and 2. I want the camera to follow the color. How do i do this using WindRiver? Which template should i open and how do i program this to happen? Please help me! Any help would be greatly appreciated!
kyungjin
07-01-2009, 15:39
I'm not quite sure if there is a set template that already has precompiled code like that... But I could be wrong...
If you do come across code like that (we might try something similar or would like to mess with a copy of the code...) a PM or email would be much appreciated.
I'll keep you posted with any information I get regarding this...
P.S. Just a side note... But did you even get the camera correctly configured when its connected to the cRIO?
programmr
07-01-2009, 18:14
Yes, i did get the camera configured correctly, but im having some issues understanding how the program works.. or if i can write a more simple program for it.
gr8dragon
07-01-2009, 21:40
The update for windriver that was launched after kickoff comes with a template in it. Open the "new" drop down menu and click example and you should find it there.
kyungjin
07-01-2009, 23:54
How did you configure the camera and how do you know it's getting recognized by the cRIO? I guess that's the problem we need to work out first cause the VisionDemo and the VisionServo programs didn't work.
Leon Canidae
08-01-2009, 10:59
We, team 1742, are having trouble getting a feed from the camera via the cRIO. we have been able to get the camera to give us a feed while it is connected to the computer, but when we connect it to the cRIO...nothing. please help.
Is anyone else having problems with the new camera code released Jan 1? It will not find any colour particles at all for me. I ended up reverting VisionAPI.cpp, VisionAPI.h and TrackAPI.cpp, TrackAPI.h to the old versions and it is now working again.
In answer to the question about camera servo tracking, there is an example called "FRC Vision-Servo Demonstration Program" that supposedly does this, although again, it did not work with the new VisionAPI and TrackAPI classes. I have not tried it with them reverted. There is also an example that drives towards the green, and one other example (can't remember what it does).
kyungjin
10-01-2009, 06:06
After much tinkering, we finally got the camera doing what we wanted it to do.
The best camera output you're going to get will be to have your camera track the colors and output the data to a console (i.e. center of gravity, etc.)
Other than that, I'm not quite sure how you're going to stream live video from the cRIO...
After much tinkering, we finally got the camera doing what we wanted it to do.
The best camera output you're going to get will be to have your camera track the colors and output the data to a console (i.e. center of gravity, etc.)
Other than that, I'm not quite sure how you're going to stream live video from pehin...
Did you get it working using the updated (Jan 1.) TrackAPI and VisionAPI? without modification?
Our code is working great with the older versions of those classes (using 2 servos to scan, find pink and green targets and track them if they are the right way round.). However, I couldn't get the updated classes to work.
kyungjin
11-01-2009, 04:02
I'm pretty sure we're using the updated versions... But I'm not quite sure... If anything, I heard that they're updating the camera classes on the FIRST website sometime this week or next week... You could hold off on working on the camera till then...
But yeah... I'm not sure why the old program shouldn't be incompatible with the new updated classes...
Did you get it working using the updated (Jan 1.) TrackAPI and VisionAPI? without modification?
Our code is working great with the older versions of those classes (using 2 servos to scan, find pink and green targets and track them if they are the right way round.). However, I couldn't get the updated classes to work.
How did you revert the TrackAPI and VisionAPI files? I have the old files, and I think i might have managed to fix the new files, but I don't know how to get WindRiver to build using my files as opposed to the one in the update.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.