OCCRA
Go to Post it doesn't matter so much why i joined [FIRST], but that i stayed :D - sure_smile [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-15-2018, 11:59 PM
jinggeorge jinggeorge is offline
Registered User
FRC #0128
 
Join Date: Jan 2016
Location: Columbus, OH
Posts: 30
jinggeorge is an unknown quantity at this point
gyro with TankDrive

I am considering using a gyro to make the robot drive straight during auto, and I'd like to keep using tank drive. Anyone know how to do this??
Reply With Quote
  #2   Spotlight this post!  
Unread 02-16-2018, 11:29 AM
jinggeorge jinggeorge is offline
Registered User
FRC #0128
 
Join Date: Jan 2016
Location: Columbus, OH
Posts: 30
jinggeorge is an unknown quantity at this point
Re: gyro with TankDrive

I think I've figured out how to do what I want to do, but if someone could tell me which direction (clockwise/counterclockwise from above) the gyro reads positive/negative it would be appreciated.

Also appreciated would be a line or two of code for initializing the gyro, just because I don't have a lot of time to test.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-16-2018, 11:30 AM
Oblarg Oblarg is offline
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,909
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Re: gyro with TankDrive

Quote:
Originally Posted by jinggeorge View Post
I think I've figured out how to do what I want to do, but if someone could tell me which direction (clockwise/counterclockwise from above) the gyro reads positive/negative it would be appreciated.
We can't do this without knowing the model of the gyro, and you should be able to figure out how to test this yourself.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016


FRC Drivetrain Characterization
Reply With Quote
  #4   Spotlight this post!  
Unread 02-16-2018, 12:38 PM
jinggeorge jinggeorge is offline
Registered User
FRC #0128
 
Join Date: Jan 2016
Location: Columbus, OH
Posts: 30
jinggeorge is an unknown quantity at this point
Re: gyro with TankDrive

Gyro is am3555, from KOP. Like I said, I don't have a lot of time to test (barely any, actually). If you could at least tell me which direction is positive that would be great.
Reply With Quote
  #5   Spotlight this post!  
Unread 02-16-2018, 12:50 PM
Oblarg Oblarg is offline
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,909
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Re: gyro with TankDrive

Quote:
Originally Posted by jinggeorge View Post
Gyro is am3555, from KOP. Like I said, I don't have a lot of time to test (barely any, actually). If you could at least tell me which direction is positive that would be great.
The documentation is linked from the AndyMark page. There is a diagram in it that likely answers your question.

I'm not trying to sound harsh here, but asking people on a forum technical questions whose answers can readily be found with a single google search and two clicks is generally poor form; you could have answered your own question faster than anyone here could have. If you're really pressed for time, Chief Delphi is (usually) not the answer.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016


FRC Drivetrain Characterization
Reply With Quote
  #6   Spotlight this post!  
Unread 02-16-2018, 01:00 PM
jinggeorge jinggeorge is offline
Registered User
FRC #0128
 
Join Date: Jan 2016
Location: Columbus, OH
Posts: 30
jinggeorge is an unknown quantity at this point
Re: gyro with TankDrive

I have already searched on google. I have already read through the andymark documentation, which is all for Labview, not C++, and it doesn't answer my questions. I have already read through the WPI info. I just want to know two things that are not as easily accessible as I would like them to be, so I am really just hoping that someone with experience with the sensor in C++ can resolve for me if it's not too much trouble. Thanks anyway.
Reply With Quote
  #7   Spotlight this post!  
Unread 02-16-2018, 01:05 PM
Oblarg Oblarg is offline
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,909
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Re: gyro with TankDrive

Quote:
Originally Posted by jinggeorge View Post
I have already read through the andymark documentation, which is all for Labview, not C++, and it doesn't answer my questions.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016


FRC Drivetrain Characterization
Reply With Quote
  #8   Spotlight this post!  
Unread 02-16-2018, 01:46 PM
jinggeorge jinggeorge is offline
Registered User
FRC #0128
 
Join Date: Jan 2016
Location: Columbus, OH
Posts: 30
jinggeorge is an unknown quantity at this point
Re: gyro with TankDrive

axis. doesn't say that that's necessarily the positive.
Reply With Quote
  #9   Spotlight this post!  
Unread 02-20-2018, 12:54 AM
bob.wolff68's Avatar
bob.wolff68 bob.wolff68 is offline
Da' Mentor Man
FRC #1967
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2007
Location: United States
Posts: 195
bob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nice
Re: gyro with TankDrive

My team did an experiment with a gyro + RobotDrive this year and didn't consider the subtleties you're considering here. The good news is that there's really no harm if you get it wrong. If the drivetrain and the gyro aren't a "match", the robot will simply physically turn the wrong direction which will make the error larger rather than smaller and the PID will continue to try to turn it the "correct" way which is actually incorrect. This results in a spinning robot. That's the sign that it's reversed...now reverse what you tell the gyro you're hunting for or reverse the drive by multiplying by negative one on the direction.

tankdrive->Drive(magnitude, output) ... I'm pretty certain this can be used by the same pointer (tankdrive) as your tankdrive today.
__________________
~~~~~~~~~~~~~~~~~~~
Bob Wolff - Software from the old-school
Mentor / C / C++ guy
Team 1967 - The Janksters - San Jose, CA
Reply With Quote
Reply


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


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

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


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi