![]() |
Distance to travel once targetted?
Okay, so we have the camera tracking the green light and centering the robot onto it. But can anyone drop some hints on figuring out how far forward to go?
I have read that some people go forward depending on the size of the bounds box returned by the t-data, but what other options are there? How are you implementing this? |
Re: Distance to travel once targetted?
See this document drawn up by Kevin Watson... it may be very helpful.
http://www.kevin.org/frc/2007_frc_range_calc.pdf |
Re: Distance to travel once targetted?
As you move towards the target the tilt on the camera mount will go up.
You could always drive the robot to where you intend to score from, see what the tilt is, then set up your autonomous to drive forward until the camera mount gets to that tilt angle. |
Re: Distance to travel once targetted?
Quote:
|
Re: Distance to travel once targetted?
Is there anyone nice enough to tell me the blob size from the edge of the home zone to the target, while the camera is about 1 meter above the ground(or any other hight given)?
|
Re: Distance to travel once targetted?
You can calculate the distance using Kevin's formula. Then using encoders or gear tooth sensors you can create functions to go the wanted distance.
|
Re: Distance to travel once targetted?
Not, that's fine, I know how to do that, but I was wondering if anyone can tell me the light's "box" size from that distance.
|
Re: Distance to travel once targetted?
Quote:
The easiest answer is to put a camera where you want and see what it tells you the blob size is. You'll notice that the size changes based on exactly where the rack is and in which direction it is facing. |
Re: Distance to travel once targetted?
As I persumed(spelled correctly?), we'll have to hang the light at the hight and distance from where we position the robot.
Thanks! |
Re: Distance to travel once targetted?
is the range in meters? or something else?
and is the angel in degrees? or rdians? i remember that in the TANGENS function in MATH.H it is in radians... so we have to convert from degrees to radians |
Re: Distance to travel once targetted?
Wasn't there a certain sensor that worked with radii degrees too?
|
Re: Distance to travel once targetted?
Yes, the tan() function in <math.h> takes the degrees argument in radians, so be sure to perform the conversion as Kevin's software calculates the tilt angle in degrees.
The units for distance will be whatever units you specified the light height and camera height with. In the .pdf document above, the 116 is inches, so be sure you calculate h (the height of your camera off the floor) in inches, and then the result will be in inches. Good luck, Robinson |
Re: Distance to travel once targetted?
Could anyone give me the (equation/parameter) to convert degrees to radii?
|
Re: Distance to travel once targetted?
radians == (degrees*PI)/180
(multiply by 3.1415926... and then divide by 180) |
Re: Distance to travel once targetted?
Thank you! :D
|
Re: Distance to travel once targetted?
For one reason or another the distance we were getting using tangent was close (within a couple feet) but not nearly accurate enough. This could be due to significant figures in many different variables (we tried multiple times to make it as accurate as possible).
Does anyone have any say on this? For now we are using the tilt angle as the indicator at how close we are to the actual light. |
Re: Distance to travel once targetted?
Quote:
-Kevin |
Re: Distance to travel once targetted?
Thanks Kevin. This looks great. I'd like to try and make similar adjustments to our camera. However, I'm not sure about the terms that you are using and how they apply to control the pwm outputs. Is there a document that describes the function of pwm outputs (ie. gain, pulse width, etc.) and how servo motors respond to them? I'd like to get a better picture of how the gain of 70 and calculated pulse width of 2.389 combine to control the camera tilt to reach 90 degrees. Thanks again.
|
Re: Distance to travel once targetted?
Quote:
-Kevin |
| All times are GMT -5. The time now is 23:52. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi