Go to Post Wait, crap... totally forgot that I needed to build an intake. :eek: - Andrew Schreiber [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-01-2007, 09:18
Lablabla Lablabla is offline
Registered User
AKA: Carmel Barak
FRC #1957 (LighTeam)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Israel
Posts: 25
Lablabla is an unknown quantity at this point
CMU2Cam Degrees & more

Hi,
I'm Using the streamlined version downloaded for kevin.org/frc
Is there a way to find out the degrees the pan and tilt are in relation to the horizontal and vertical zeros? (i.e camera looking straight forward)

Plus, the zip file downloaded contains everything, the user_routines.c and all that. should i use this as the default code for 2007 and add my autonomous mode and joy controls and all that to that files? or is there a way to add the camera thingies to the 2007 Default code?

Thanks,
Carmel
__________________
LighTeam #1957
2006 GM/Technion Israel Regional Finalist (Robot: W.Bob)

Attending: Israel GM\Technion Regional (Robot: Laika)
  #2   Spotlight this post!  
Unread 12-01-2007, 09:24
itsme itsme is offline
Registered User
FRC #2217 (FOMH)
Team Role: Programmer
 
Join Date: Dec 2006
Rookie Year: 2007
Location: Israel
Posts: 86
itsme is an unknown quantity at this point
Re: CMU2Cam Degrees & more

Well, I can answer only your first question because I am programing in easyC and I don't know MPlabs as well.
for calculating the degrees you need to do the following:
1 degree=Tilt_range/Number_of_PWM

same thing for the pan.

The tilt range is the range of degrees the tilt/pan server can turn.
Number of PWM is 256 (0...255).

Last edited by itsme : 12-01-2007 at 09:57. Reason: changed ratio to range, ratio- wrong word
  #3   Spotlight this post!  
Unread 12-01-2007, 09:29
Lablabla Lablabla is offline
Registered User
AKA: Carmel Barak
FRC #1957 (LighTeam)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Israel
Posts: 25
Lablabla is an unknown quantity at this point
Re: CMU2Cam Degrees & more

Thanks alot for that,
How can I find out the Tilt/Pan Ratio?
__________________
LighTeam #1957
2006 GM/Technion Israel Regional Finalist (Robot: W.Bob)

Attending: Israel GM\Technion Regional (Robot: Laika)
  #4   Spotlight this post!  
Unread 12-01-2007, 09:33
itsme itsme is offline
Registered User
FRC #2217 (FOMH)
Team Role: Programmer
 
Join Date: Dec 2006
Rookie Year: 2007
Location: Israel
Posts: 86
itsme is an unknown quantity at this point
Re: CMU2Cam Degrees & more

you need to see the the documentation about your servo, see how much it can turn in degrees.
Oh, and remember when calculating this way: the starting position (the middle of the range) is half of the ratio. For example: if the ratio is 180, then 1 degree equals about 0.7 PWM, and the starting position is in the middle, witch is 90 degrees, witch is about 127 PWM

Last edited by itsme : 12-01-2007 at 09:38.
  #5   Spotlight this post!  
Unread 12-01-2007, 09:36
Lablabla Lablabla is offline
Registered User
AKA: Carmel Barak
FRC #1957 (LighTeam)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Israel
Posts: 25
Lablabla is an unknown quantity at this point
Re: CMU2Cam Degrees & more

It's the servos we recieved from FIRST, we didn't get any docs with it
__________________
LighTeam #1957
2006 GM/Technion Israel Regional Finalist (Robot: W.Bob)

Attending: Israel GM\Technion Regional (Robot: Laika)
  #6   Spotlight this post!  
Unread 12-01-2007, 09:52
itsme itsme is offline
Registered User
FRC #2217 (FOMH)
Team Role: Programmer
 
Join Date: Dec 2006
Rookie Year: 2007
Location: Israel
Posts: 86
itsme is an unknown quantity at this point
Re: CMU2Cam Degrees & more

To tell you the truth I'm not sure either. I can't find any documentations for this, no place writes how much degrees it has. So please someone answer our common question: how much degrees does it turn?
  #7   Spotlight this post!  
Unread 12-01-2007, 12:54
JSonntag JSonntag is offline
Registered User
FRC #0486 (Positronic Panthers)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: United States
Posts: 16
JSonntag is on a distinguished road
Send a message via AIM to JSonntag
Re: CMU2Cam Degrees & more

It has a rotation of approximately 90 degrees

http://www.servocity.com/html/hs-322...rd_deluxe.html
  #8   Spotlight this post!  
Unread 12-01-2007, 18:19
itsme itsme is offline
Registered User
FRC #2217 (FOMH)
Team Role: Programmer
 
Join Date: Dec 2006
Rookie Year: 2007
Location: Israel
Posts: 86
itsme is an unknown quantity at this point
Re: CMU2Cam Degrees & more

Quote:
Originally Posted by JSonntag View Post
It has a rotation of approximately 90 degrees

http://www.servocity.com/html/hs-322...rd_deluxe.html
So this means that each PWM is 256/90=2.8444... degrees.
And each degree is 90/256=0.3515625 degrees.

:::EDIT:::
It's not 90 degrees for sure, you can buy one with 180 degrees and one with 360 degrees.
So can anybody tell how much degrees it is in the FIRST kit of parts?

Last edited by itsme : 12-01-2007 at 18:26.
  #9   Spotlight this post!  
Unread 12-01-2007, 18:20
Unsung FIRST Hero
Greg Marra Greg Marra is offline
[automate(a) for a in tasks_to_do]
FRC #5507 (Robotic Eagles)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2005
Location: San Francisco, CA
Posts: 2,030
Greg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond repute
Re: CMU2Cam Degrees & more

Or, you can always drive the servo to 0, mark its position, drive it 255, mark its position, and then bust out a protractor.

We did a lot of testing to find the camera field of view and servo ranges in 2005. If I find them later, I will post them, although they may not be exactly the same.
  #10   Spotlight this post!  
Unread 13-01-2007, 05:02
TEAM1949 TEAM1949 is offline
Registered User
FRC #1949
 
Join Date: Jan 2006
Location: IsRaEl
Posts: 24
TEAM1949 is an unknown quantity at this point
Re: CMU2Cam Degrees & more

http://www.acroname.com/robotics/inf.../mod322hd.html

look at 'step 4', first two lines


more than 180:
http://www.phidgetsusa.com/forums/ar...php?t-553.html

Last edited by TEAM1949 : 13-01-2007 at 07:18.
  #11   Spotlight this post!  
Unread 29-01-2007, 12:02
jdejoannis jdejoannis is offline
Registered User
FRC #1845
 
Join Date: Feb 2006
Location: Atlanta,GA
Posts: 48
jdejoannis will become famous soon enoughjdejoannis will become famous soon enough
Re: CMU2Cam Degrees & more

Quote:
Originally Posted by Greg Marra View Post
Or, you can always drive the servo to 0, mark its position, drive it 255, mark its position, and then bust out a protractor.

We did a lot of testing to find the camera field of view and servo ranges in 2005. If I find them later, I will post them, although they may not be exactly the same.
How do you drive the servos? This would be very useful for us to debug something.

Jason
  #12   Spotlight this post!  
Unread 29-01-2007, 13:47
Donut Donut is offline
The Arizona Mentor
AKA: Andrew
FRC #2662 (RoboKrew)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Goodyear, AZ
Posts: 1,287
Donut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond repute
Re: CMU2Cam Degrees & more

Quote:
Originally Posted by Lablabla View Post
Hi,
I'm Using the streamlined version downloaded for kevin.org/frc
Is there a way to find out the degrees the pan and tilt are in relation to the horizontal and vertical zeros? (i.e camera looking straight forward)
In Kevin's code he lists the degrees for each range if using the pan/tilt mechanism for FIRST in tracking.h (for example, the pan servo goes from 0 to 248, and has a total range of 130 degrees). To determine the value your 0's are at, you will have to manually control the camera until it is in the position you want to be considered "center".

Quote:
Originally Posted by jdejoannis View Post
How do you drive the servos? This would be very useful for us to debug something.
The servos are driven with standard pwms, so instead of having the camera code create the pan & tilt pwms, have a joystick control the value of the pwm. Comment out servo_track() so the camera has no control of the servos, then do pwm01 = p1_y (with whatever pwms and joystick you want to use inserted there).
__________________
FRC Team 498 (Peoria, AZ), Student: 2004 - 2007
FRC Team 498 (Peoria, AZ), Mentor: 2008 - 2011
FRC Team 167 (Iowa City, IA), Mentor: 2012 - 2014
FRC Team 2662 (Tolleson, AZ), Mentor: 2014 - Present
  #13   Spotlight this post!  
Unread 29-01-2007, 19:50
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: CMU2Cam Degrees & more

Quote:
Originally Posted by jdejoannis View Post
How do you drive the servos? This would be very useful for us to debug something.

Jason
If you're using the "bells & whistles" camera code, you can step the servos to any value using the interactive PWM sub-menu found in the main tracking menu.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #14   Spotlight this post!  
Unread 30-01-2007, 15:40
jdejoannis jdejoannis is offline
Registered User
FRC #1845
 
Join Date: Feb 2006
Location: Atlanta,GA
Posts: 48
jdejoannis will become famous soon enoughjdejoannis will become famous soon enough
Re: CMU2Cam Degrees & more

Great, thanks!
  #15   Spotlight this post!  
Unread 01-02-2007, 09:11
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
Re: CMU2Cam Degrees & more

So in order to find the range from, for example, the rack, I need to calculate the # of degrees to the target from the servos and then calculate Tan(the angel)and devide the hight of the target from the camera by the Tan(angel)?
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Servo Values to Degrees... How? mogunus Programming 16 11-04-2007 02:03
engineering degrees sciguy125 Career 18 17-03-2006 23:44
Turn 90 Degrees Mike Math and Science 16 05-12-2004 22:22
More Pictures & Movies of Team 121 Kyle Fenton Robot Showcase 9 18-02-2003 23:51
TRADE ITEMS--EXCLUSIVE--MOE'S SIGNED SOCKS & MORE archiver 1999 2 23-06-2002 22:37


All times are GMT -5. The time now is 09:57.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi