Go to Post if you need a hammer you use a hammer and not an oscilloscope. - Andrew Schreiber [more]
Home
Go Back   Chief Delphi > FIRST > Robot Showcase
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 07-02-2007, 23:55
Andrew Schuetze's Avatar
Andrew Schuetze Andrew Schuetze is offline
499 Founder / Alamo FTC & FLL AP
no team
Team Role: Leadership
 
Join Date: Jan 2002
Rookie Year: 2001
Location: San Antonio, Texas
Posts: 689
Andrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond repute
Cool Toltechs success with camera

We achieved a major milestone for our veteran team in getting the camera code working with 1.5 weeks left to program Here is video from Tuesday night without the tilt function on the camera. On Wednesday night, we repeated the performance but this time with the tilt. The development 'bot is from '05.

Quote:
Posted by D. Sean Kelly on the toltech Wiki
It's not the best video in the world and it may not be the most dramatic display of autonomous robot behavior; but it is working well.
Description: The robot is set to face the general direction of the Rack; probably about 20-25 degrees off the light. When the auto mode starts the robot orients itself toward the light, then starts heading toward it. If it veers off course it will correct mid-way (this is visible in the 2nd half of the clip with the better lighting).
The first run was under optimal lighting (the rack was in a dark area of the shop). The second run we turned on the florescent lights above the rack and ran it again. The robot was able to track the target in both lighting conditions very well.
499 Toltechs Auto One
__________________
APS

Founder FRC 499
Parent alumni FRC 2745 & 4219
Co-Coach FTC 4549 & 6407
Alamo FTC Affiliate Partner
Alamo FLL Affiliate Partner
  #2   Spotlight this post!  
Unread 08-02-2007, 00:39
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,307
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: Toltechs success with camera

Looks good, glad to see another team getting the camera driving up and working.
__________________
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
  #3   Spotlight this post!  
Unread 08-02-2007, 01:16
Brad Voracek Brad Voracek is offline
.999~=1
FRC #0399 (Eagle Robotics)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Lancaster, CA (SoCal)
Posts: 328
Brad Voracek is a glorious beacon of lightBrad Voracek is a glorious beacon of lightBrad Voracek is a glorious beacon of lightBrad Voracek is a glorious beacon of lightBrad Voracek is a glorious beacon of light
Send a message via AIM to Brad Voracek
Re: Toltechs success with camera

Very cool, congrats... Hopefully ours looks the same in the near future. Although we were planning on just dead reckoning forward (obviously getting a little slower at the end) and using the light for horizontal adjustment... Although it sounds like you tried that, you like using the camera tilt to adjust speed based on how far you are also? Hm.
__________________
.999~ (Repeating) is equal to one (1).


Team 399 - Eagle Robotics
  #4   Spotlight this post!  
Unread 08-02-2007, 09:46
Brandon Holley's Avatar
Brandon Holley Brandon Holley is offline
Chase perfection. Catch excellence.
AKA: Let's bring CD back to the way it used to be
FRC #0125 (NU-TRONs, Team #11 Alumni (GO MORT))
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2001
Location: Boston, MA
Posts: 2,593
Brandon Holley has a reputation beyond reputeBrandon Holley has a reputation beyond reputeBrandon Holley has a reputation beyond reputeBrandon Holley has a reputation beyond reputeBrandon Holley has a reputation beyond reputeBrandon Holley has a reputation beyond reputeBrandon Holley has a reputation beyond reputeBrandon Holley has a reputation beyond reputeBrandon Holley has a reputation beyond reputeBrandon Holley has a reputation beyond reputeBrandon Holley has a reputation beyond repute
Send a message via AIM to Brandon Holley
Re: Toltechs success with camera

having the robot move towards the light............always a good thing
__________________
MORT (Team 11) '01-'05 :
-2005 New Jersey Regional Chairman's Award Winners
-2013 MORT Hall of Fame Inductee

NUTRONs (Team 125) '05-???
2007 Boston Regional Winners
2008 & 2009 Boston Regional Driving Tomorrow's Technology Award
2010 Boston Regional Creativity Award
2011 Bayou Regional Finalists, Innovation in Control Award, Boston Regional Finalists, Industrial Design Award
2012 New York City Regional Winners, Boston Regional Finalists, IRI Mentor of the Year
2013 Orlando Regional Finalists, Industrial Design Award, Boston Regional Winners, Pine Tree Regional Finalists
2014 Rhode Island District Winners, Excellence in Engineering Award, Northeastern University District Winners, Industrial Design Award, Pine Tree District Chairman's Award, Pine Tree District Winners
2015 South Florida Regional Chairman's Award, NU District Winners, NEDCMP Industrial Design Award, Hopper Division Finalists, Hopper/Newton Gracious Professionalism Award
  #5   Spotlight this post!  
Unread 08-02-2007, 10:32
Andrew Schuetze's Avatar
Andrew Schuetze Andrew Schuetze is offline
499 Founder / Alamo FTC & FLL AP
no team
Team Role: Leadership
 
Join Date: Jan 2002
Rookie Year: 2001
Location: San Antonio, Texas
Posts: 689
Andrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond repute
Re: Toltechs success with camera

Quote:
Originally Posted by Brad Voracek View Post
Very cool, congrats... Hopefully ours looks the same in the near future. Although we were planning on just dead reckoning forward (obviously getting a little slower at the end) and using the light for horizontal adjustment... Although it sounds like you tried that, you like using the camera tilt to adjust speed based on how far you are also? Hm.
We have been using Easy C this year and basically have a group of four students working with two mentors going through the tutorials on the camera. I think at this point the code is using the drive system to only making course corrections to keep the target in the middle of the frame. The plan is to use the tilt angle as feedback for our stopping point. I am not certian if they are slowing the robot down as the tilt angle increases or just stops when it reachs a set angle.

Good luck with your efforts and I hope to see lots of teams driving autonomously this year
__________________
APS

Founder FRC 499
Parent alumni FRC 2745 & 4219
Co-Coach FTC 4549 & 6407
Alamo FTC Affiliate Partner
Alamo FLL Affiliate Partner
  #6   Spotlight this post!  
Unread 16-02-2007, 22:24
Ianuser Ianuser is offline
Registered User
FRC #0570
 
Join Date: Feb 2007
Location: new york
Posts: 64
Ianuser is an unknown quantity at this point
Re: Toltechs success with camera

Please help me, I can't figure out how to use the camera to actually MOVE the robot. I have the camera code working along with the camera itself, but how do I move pwm01 (left drive wheel) and pwm02 (right drive wheel) individually according to the pan of the camera? I have no idea where to begin with this code. (I just got the code to work for the camera and I've been trying for weeks. Now I only have 2 days, Please help if you can)




Code:
	
int I_Want_To_Search = 1;
int pwm01_On_Off = 1;
int pwm02_On_Off = 1;
int pwm03_On_Off = 1; //these are all at the top of user_routines.c Everything else is in Processfrom master UP (except TARGETRANGE[] and FIND_DISTANCE())



                          if(I_Want_To_Search == 1)
	{
		Servo_Track();
	}


                          if((Get_Tracking_State() == CAMERA_ON_TARGET) || (Get_Tracking_State() == TARGET_IN_VIEW))
		{
			pwm01_On_Off = 0;
			pwm02_On_Off = 0;
			pwm01 = 230; //Desired Forward Velocity
			pwm02 = 230;
			Switch3_LED = 1;
			
			//printf("2"); //these statements are just to see if it worked
		}
		else
		{
			Switch3_LED = 0;
			pwm01_On_Off = 1;
			pwm02_On_Off = 1;
			//printf("4"); //these statements are just to see if it worked
		}
		/*
		if(Find_Distance() <= 50) //THIS DOESN"T WORK!! WHY NOT?
		{
			pwm01 = 127;
			pwm02 = 127;
			pwm01_On_Off = 1;
			pwm02_On_Off = 1;
			I_Want_To_Search = 0; //Stops calling Servo_Track(). THEN CALL ANOTHER THING
			Switch3_LED = 0;
			//printf("3"); //these statements are just to see if it worked
		}
		*/

		if(p1_y > 129 || p2_y > 129)
		{
			pwm01_On_Off = 1;
			pwm02_On_Off = 1;
		}
		else if(p1_y < 125 || p2_y < 125)
		{
			pwm01_On_Off = 1;
			pwm02_On_Off = 1;
		}
The Find_Distance() function is this:
Code:
unsigned int Find_Distance(void)
{	
	return(targetRange[pwm07-144]);
}and target range is this:
Code:
const rom unsigned int targetRange[] =
	{
3355,
1676,
1116,
835,
666,
553,
472,
411,
363,
325, //place 10
293,
267,
244,
225, 
208,
193,
179,
167,
156,
146, //place 20
137,
128,
121, 
113, 
107,
100,
94,
89,
83,
78, //place 30
73,
68, 
64,
60,
56,
51,
48,
44,
40,
36, //place 40
33, 
29, 
26,
23,
19,
16,
13,
10,
6,
3, //place 50
0, //place 51
};
So I would like to know why my distance thing isn't working (Max tilt is 194 and min is 94, center at 144. My degree per pwm step was 1.7647 (50/90? is that right?) Then I multiplied that by the pwm index up to 51 and found the radian value and plugged it into TAN(x) and then did 116-12.625(my height)/tan(the radian value from before)) Assuming that's correct, what's wrong with the rest of the code? It's not working properly. Camera looks away from the light when I comment in the Find_Distance code (less than 50 or whatever). ALSO, how do I program the robot to move forward???
  #7   Spotlight this post!  
Unread 17-02-2007, 22:17
Salik Syed Salik Syed is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Alumni
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Stanford CA.
Posts: 514
Salik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud of
Send a message via AIM to Salik Syed
Re: Toltechs success with camera

Ianuser:
why do you divide 50 by 90?
Degrees/per step = The amount of tilt angle in the camera/ number of PWM steps

The number of steps you have is 51 (194-144) inclusive...

okay never mind, 1.765 is the right number... you just wrote it wrong in the post.

Now are you sure that the camera has a 90 degree range when varying from level (pwm = 144) to fully raised( 194) ? I don't think that is right, but i'm an alumnus, and haven't played with the camera much.

You turn off I_want_to_search when range is <= 50, i'm assuming that sets the PWM values to neutral, that is why the camera looks away.

How to move? The fastest/simplest way is to scale your motor speed to your tilt angle (and thus your distance),
so do something like this:
PWMsout = (194-cameraTiltValue)*Scalar;
__________________
Team 701
  #8   Spotlight this post!  
Unread 17-02-2007, 22:23
Salik Syed Salik Syed is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Alumni
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Stanford CA.
Posts: 514
Salik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud of
Send a message via AIM to Salik Syed
Re: Toltechs success with camera

.999~(repeating) = x
9.999~ = 10x (Multiply both sides by ten)
9 = 9x (Subtract x, or .999~ from both sides)
Wait a sec... you are assuming x =1, 10 - 1 = 9, not 10 - .999~
That does not follow, you can't use your conclusion, to reach your conclusion!
x = 1 = .999~
__________________
Team 701
  #9   Spotlight this post!  
Unread 17-02-2007, 23:18
Ianuser Ianuser is offline
Registered User
FRC #0570
 
Join Date: Feb 2007
Location: new york
Posts: 64
Ianuser is an unknown quantity at this point
Re: Toltechs success with camera

OK, for the pwm steps, my MIN is 94, max is 194 and center is 144. its a 50º range, 25º from 94 to 144 and 25º from 144 to 194. So, shouldn't it then be 100/50? or what? Im still a bit confused.

ALSO, might this work for moving the robot toward the light?

Code:
if((Get_Tracking_State() == CAMERA_ON_TARGET) || (Get_Tracking_State() == TARGET_IN_VIEW))
		{
			pwm01_On_Off = 0;
			pwm02_On_Off = 0;
			Switch3_LED = 1;
                                       if(PAN_SERVO > PAN_CENTER_PWM_DEFAULT)
                                      {
                                           pwm01 = 180;

                                      }
                                      else if(PAN_SERVO < PAN_CENTER_PWM_DEFAULT)
                                      {
                                           pwm02 = 180;
                                      }
                                      else //see below for question
                                      {
                                           pwm01 = 180;
                                           pwm02 = 180;
                                      }                     
                          }
(pwm01_On_Off and pwm02_On_Off are just to map the joystick to the pwm. if 1, then joystick works, if its not 1 (usually 0), then joysticsk dont work and the motors can be set to specific speeds.)

How do I use error precent to manipulate how accurate ("//see below for question") this will be (when it is looking directly at the light)?
  #10   Spotlight this post!  
Unread 17-02-2007, 23:20
Ianuser Ianuser is offline
Registered User
FRC #0570
 
Join Date: Feb 2007
Location: new york
Posts: 64
Ianuser is an unknown quantity at this point
Re: Toltechs success with camera

ALSO, about the pwmstep thing...I can change the MAX and MIN and CENTER in tracking.h, right? (If I do that, do I have to mess around with the pwmvalue per large step which is right now 50...94 to 144 to 194 at 3 steps in total? And do I have to change anything in the CAMERA.C file?) Might that give me a better angle to work with if 94 to 194 is only -25º to 25º?
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
Camera Success?? Warren Boudreau Programming 3 16-03-2006 17:55
pic: Toltechs drive-train teaser Andrew Schuetze Robot Showcase 21 06-02-2006 13:27
Autonomous With Camera schenkin Programming 20 16-02-2005 23:52
any success with winches? Ben.V.293 Technical Discussion 15 28-01-2004 22:38
Success with Tank Treads Yan Wang Technical Discussion 17 23-01-2004 15:53


All times are GMT -5. The time now is 16:06.

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