Go to Post Snow Blower Motor? Forget the water game, how about a snow game? - Gary Dillard [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 14-02-2006, 06:31
capenga's Avatar
capenga capenga is offline
Penga boy
AKA: Giovane
#1156 (Under Control)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Pio XII High School - Brazil
Posts: 33
capenga is an unknown quantity at this point
Send a message via ICQ to capenga Send a message via MSN to capenga
Problem with gyro...

I don't know what's happening to my gyro... i think it works by it's own will...

Sometimes it works, or sometimes it gives me values that are always growing

If someone knows what's this, please tell me =D
__________________


Ignore alien orders.
  #2   Spotlight this post!  
Unread 14-02-2006, 09:09
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Problem with gyro...

Did you compute the bias?
  #3   Spotlight this post!  
Unread 14-02-2006, 09:23
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Problem with gyro...

Quote:
Originally Posted by capenga
I don't know what's happening to my gyro... i think it works by it's own will...
This is either (a) a bad connection to the ADC port, or (b) incorrect gyro bias. The bias being off even a little will cause this, especially if you have a small deadband on the gyro. For sort time periods while testing, you can just use Set_Gyro_Bias(), but for competition[1] and periodic checking you'll want to use the calibration routine.

[1] In competition, you turn on the bot and let it sit there for minutes motionless before they start autonomous, so the gyro will have plenty of time to calibrate.
  #4   Spotlight this post!  
Unread 14-02-2006, 09:51
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Problem with gyro...

this happened to someone else on the forum last week.

the wire colors called out on the gyro board are mislabeled. If you hooked up the cable to match the markings on the board it will do exactly what you are seeing.

Check the gyro documentation for the correct pinout.
  #5   Spotlight this post!  
Unread 14-02-2006, 16:19
paulcd2000's Avatar
paulcd2000 paulcd2000 is offline
Accidentally speaks in C
AKA: Paul Dagnelie
FRC #1719 (The Umbrella Corp.)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Baltimore
Posts: 368
paulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the rough
Send a message via AIM to paulcd2000
Re: Problem with gyro...

this is the exact reason we stopped using the qyro and started using geartooth. Think about it
__________________
"People don't say 'It's just a game' when their team is winning!" -- Scott Adams

5.5 students (on average)* $7/h *210 hours/student= $8085 of labor, all volunteered (not counting mentors', who are each that much)

We have blades on our robot?! ***sweeeeeet***

There are 11 types of people in the world. Those who can read binary, those who can't, and those who say this joke is supposed to be, "There are 10 types of people in the world. Those who can read binary and those who have a life."
  #6   Spotlight this post!  
Unread 14-02-2006, 16:35
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Problem with gyro...

Quote:
Originally Posted by paulcd2000
this is the exact reason we stopped using the qyro and started using geartooth. Think about it
Gear teeth sensors can't detect wheel slippage, but a gyro can. Think about it.
  #7   Spotlight this post!  
Unread 15-02-2006, 16:13
xolnian's Avatar
xolnian xolnian is offline
Registered User
FRC #1719 (Umbrella corp.)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland (from d.c.)
Posts: 34
xolnian is an unknown quantity at this point
Re: Problem with gyro...

Wheel slippage (unless you have wheels with no traction(which you shouldn't)) will not be a problem with a robot over 90 pounds, as long as you account for acceleration. Though this might sound iffy (or ifi ), the calculation is easier than writing code for the gyro.
__________________

Last edited by xolnian : 15-02-2006 at 16:18.
  #8   Spotlight this post!  
Unread 15-02-2006, 16:25
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Problem with gyro...

Quote:
Originally Posted by xolnian
Wheel slippage (unless you have wheels with no traction(which you shouldn't)) will not be a problem with a robot over 90 pounds, as long as you account for acceleration. Though this might sound iffy (or ifi ), the calculation is easier than writing code for the gyro.
What's so hard about writing gyro code? Simple P-style feedback loop with the current heading and desired heading.

From an early version of my team's code, assuming you have Kevin's code in place already:

Code:
error=phi-theta;  // in milliradians
	
//Make sure you go the right way around the circle
if (error>3141L) {error-=6283;}
if (error<-3141L) {error+=6238;}
	
Kp=360;  

omega=(long)Kp*(long)error/2000L;

// Set limit bands
if(omega>64){omega=64;}
if(omega<-64){omega=-64;}

left_pwm-=omega; 
light_pwm-=omega;
  #9   Spotlight this post!  
Unread 15-02-2006, 16:26
paulcd2000's Avatar
paulcd2000 paulcd2000 is offline
Accidentally speaks in C
AKA: Paul Dagnelie
FRC #1719 (The Umbrella Corp.)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Baltimore
Posts: 368
paulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the rough
Send a message via AIM to paulcd2000
Re: Problem with gyro...

also, geartooth can tell distance, gyro can't. The geartooth can also tell you direction, think about it.
__________________
"People don't say 'It's just a game' when their team is winning!" -- Scott Adams

5.5 students (on average)* $7/h *210 hours/student= $8085 of labor, all volunteered (not counting mentors', who are each that much)

We have blades on our robot?! ***sweeeeeet***

There are 11 types of people in the world. Those who can read binary, those who can't, and those who say this joke is supposed to be, "There are 10 types of people in the world. Those who can read binary and those who have a life."
  #10   Spotlight this post!  
Unread 15-02-2006, 16:28
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,187
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Problem with gyro...

Quote:
Originally Posted by kaszeta
What's so hard about writing gyro code? Simple P-style feedback loop with the current heading and desired heading.

From an early version of my team's code, assuming you have Kevin's code in place already:

Code:
error=phi-theta;  // in milliradians
	
//Make sure you go the right way around the circle
if (error>3141L) {error-=6283;}
if (error<-3141L) {error+=6238;}
	
Kp=360;  

omega=(long)Kp*(long)error/2000L;

// Set limit bands
if(omega>64){omega=64;}
if(omega<-64){omega=-64;}

left_pwm-=omega; 
light_pwm-=omega;
Phi being wanted angle to stick to and theta being the measured angle?
  #11   Spotlight this post!  
Unread 15-02-2006, 16:34
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,187
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Problem with gyro...

Quote:
Originally Posted by paulcd2000
also, geartooth can tell distance, gyro can't. The geartooth can also tell you direction, think about it.
It's ALOT easier to keep track of yourself on the field and know where you want to go with 2 different types of feedback.

What's easier:
  1. Keeping track of how far each side has travelled, their rates of motion, and calculating that out to find where you are, which would absolutely require a double feedback loop to acount for motor bias..
  2. Combining both and having not only a magnitude of travel, but also a direction to go along with it. This makes field position as easy as SohCahToa (how I hate basic algerba acronyms...) and vector addition.



I guess it's up to you though... Think about it.
  #12   Spotlight this post!  
Unread 15-02-2006, 16:47
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Problem with gyro...

Quote:
Originally Posted by Tom Bottiglieri
Phi being wanted angle to stick to and theta being the measured angle?
Other way around, actually. Although that only changes the sign on the result.
  #13   Spotlight this post!  
Unread 15-02-2006, 17:28
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Problem with gyro...

Quote:
Originally Posted by xolnian
Wheel slippage (unless you have wheels with no traction(which you shouldn't)) will not be a problem with a robot over 90 pounds, as long as you account for acceleration. Though this might sound iffy (or ifi ), the calculation is easier than writing code for the gyro.
So you are saying there is NO possibility that another robot will push you backwards or sideways, while your wheels happily keep spinning in the forward direction?

and there is no way your robot will ever hit the wall or sides, and sit there spinning its wheels, thinking its still moving forwards?

Experience is a cruel teacher. First you are tested, then you learn the lesson.
  #14   Spotlight this post!  
Unread 15-02-2006, 17:57
ida_noeman's Avatar
ida_noeman ida_noeman is offline
Registered User
AKA: phobbs
FRC #1719 (Umbrella Corp.)
Team Role: Mechanical
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Baltimore, MD
Posts: 129
ida_noeman is on a distinguished road
Re: Problem with gyro...

And your saying that you could recover during autonomous with your gyro? No, you couldn't. Also, if you are going for the side goals, and if you go for the nearest goal, then you'll get there before anyone could bump you (as long as your robot is decently fast.) If you get bumped while shooting, you shouldn't be worried about recovering with the gyro because you'll use the cam. And most likely you won't be using either gyro or gear tooth during non-autonomous mode.
__________________
--
"Weeks of coding can save you hours of planning"
"If the code was hard to write, I'm dam well going to make it hard to read!"
  #15   Spotlight this post!  
Unread 15-02-2006, 18:21
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Problem with gyro...

Quote:
Originally Posted by ida_noeman
And your saying that you could recover during autonomous with your gyro? No, you couldn't....
One of the worst mistakes to make in a competition: Underestimating your opponents abilities! :^)
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
Gyroscope Code Kevin Watson Programming 65 01-03-2008 23:46
Gyro not accurate - Problem naor52 Programming 15 27-01-2006 16:50
Gyro code problem AMIRAM Programming 10 23-01-2006 04:26
Updated: Example Gyro Interface Code Kevin Watson Programming 2 28-03-2005 04:36
Example gyro code released. Kevin Watson Programming 60 17-03-2005 18:32


All times are GMT -5. The time now is 03:39.

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