![]() |
Re: Two Color Tracking Demo
Also.... Don't forget to ADD the Servo power jumpers next to the two servos plugs you are using on the Digital Sidecar.
|
Re: Two Color Tracking Demo
Quote:
|
Re: Two Color Tracking Demo
Thank you PhilBot....the jumper cable was the problem. (As for now...)
|
Re: Two Color Tracking Demo
To the people that have this working in WindRiver...
We've been having some problems trying to get this as a workable project. How do you set this up to work? Do you just drag the extracted folder into the workspace? I've tried creating a New project from a workspace in an external location and linking it but I seem to get problems with finding "AxisCamera.h". When that's removed or moved somewhere else, the next header file in the #include statements seem to suffer the same problem... Can anyone give step-by-step instructions for getting this to work? Any help would be much appreciated. |
Re: Two Color Tracking Demo
Hey all,
We have the camera tracking both tilt and pan, and we re-engineered it to be functional in our Robot Main vi, what I would like to do is convert the % Area output to a distance measurement. Has anyone successfully done this or have any ideas on how... Thanks Much, |
Re: Two Color Tracking Demo
Quote:
Alternatively, since you know exactly how high off the ground the targets will be, and you presumably know the position of the camera on your robot, you could try measuring the tilt angle and using trigonometry to find the distance as follows: tan(tilt) = height of target above camera / horizontal distance from camera to object, where tilt is the angle above or below the horizontal plane. This would require finding another kind of data, namely the relationship between servo outputs and degree or radian values. |
Re: Two Color Tracking Demo
thanks for the quick response,
Ive been working on a distance formula and I must be a bit rusty on this seemingly simple math. I sampled a number of data points and fitted a line to it that should be close enough for any practical purposes I measured feet vs % Area and when graphed and fitted with the line the equation was roughly: y being pixels and x being feet y=80,000x^-2.0, assuming that with a resolution of 320x240 there are 76,800 pixels and the percent area is the amount of pixels that the mask is tracking as the object. I get 2 equations as follows... they work independently but not when set equal to each other. pixels=76800(.01(%Area)) pixels=80,000(feet^-2.0) so 76800(.01(%Area))=80,000(feet^-2.0) right? simplifying to feet^-2=.0096(% Area) when solved for x I end up with a messy feet=e^((ln(.0096(% Area)))/-2)) ??? idk maybe it does work, id still like a check and some input pls. Thanks Again |
Re: Two Color Tracking Demo
well in physics we have this range forumla that splits basically a 3rd year university problem into 2 parts that a grade 12 physics student can do. It essentially is using orthogonal components...
Maybe that would also work? also guys if i take the code and transplant it into my existing robot code... What is required to be modified so that the camera will start tracking while its driving? |
Re: Two Color Tracking Demo
Ok...I feel really dumb. Especially after reading how you all have the code working...
I can't get it to compile. I've reinstalled all the WindRiver updates, but when I compile WPI's sample code, I get 100+ errors in nivision.h. Do I have to grab the latest WPILib source code and compile that to make this work, or am I missing something uber-obvious? Thanks so much =] |
Re: Two Color Tracking Demo
@Obscurity
That is exactly what I have been trying to do for the past 3 hours. I'm a rookie programmer and labview has a nice steep learning curve. I have our test robot's camera gimble tracking a board with the colors, but I cant figure out how to get outputs and change them into something that can drive our two jaguar motors. Also that trig idea is amazing I can't wait to try that out if things get working! :yikes: |
Re: Two Color Tracking Demo
We had an issue with the lab view 2 color tracking demo from usfirst.org giving us the incorrect servo values in the y axis. When the target would move vertically the tracking would move in the opposite direction...
if this happens to anyone else here the solution |170-Y|= out put use that forumal, you really don't need the absolute value, but that should fix the problem |
Re: Two Color Tracking Demo
Quote:
:\ |
Re: Two Color Tracking Demo
Quote:
or (72-Camera height) cot (y) = distance in a horizontal line from you to trailer. Our distance is accurate to about an inch currently using pretty inaccurate numbers for camera height and trailer divide height since the trailer isn't mounted onto the robot, it kind of leans on the hitch on the ground... y is what the angle of vertical servo is called in the tracking program released by FIRST |
Re: Two Color Tracking Demo
Quote:
Quote:
|
| All times are GMT -5. The time now is 18:32. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi