Go to Post Doesn't matter what you use if you can't drive it. - efoote868 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
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 04-02-2017, 15:07
WTFogland WTFogland is offline
Registered User
FRC #5505
Team Role: Alumni
 
Join Date: Feb 2016
Rookie Year: 2015
Location: Michigan
Posts: 10
WTFogland is an unknown quantity at this point
Gyro and Tank Drive

Hey all, I am currently trying to get the gyro to work with our robot and our robot currently drives in tank drive and we'd like to keep it that way, but still be able to use the gyro. I am unsure how to go about programming the gyro with tank drive as I can only find resources about using the gyro with only one joystick controlling the forward and back movements of the robot.

Any help would be great, thank you in advance
Reply With Quote
  #2   Spotlight this post!  
Unread 04-02-2017, 15:36
Caleb Sykes's Avatar
Caleb Sykes Caleb Sykes is offline
Registered User
FRC #4536 (MinuteBots)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2009
Location: St. Paul, Minnesota
Posts: 1,076
Caleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond repute
Re: Gyro and Tank Drive

Quote:
Originally Posted by WTFogland View Post
Hey all, I am currently trying to get the gyro to work with our robot and our robot currently drives in tank drive and we'd like to keep it that way, but still be able to use the gyro. I am unsure how to go about programming the gyro with tank drive as I can only find resources about using the gyro with only one joystick controlling the forward and back movements of the robot.

Any help would be great, thank you in advance
What are you hoping to improve about your drive control by using a gyro?
Reply With Quote
  #3   Spotlight this post!  
Unread 04-02-2017, 16:30
DIyer5465 DIyer5465 is offline
Registered User
FRC #5465
 
Join Date: Feb 2017
Location: Chandler
Posts: 4
DIyer5465 is on a distinguished road
Re: Gyro and Tank Drive

We are using tank drive with two joysticks, one controls forward/back and the other controls left/right

We are using an ADXRS450 to keep the robot going straight while we drive. We use a P-controller that "takes over" the role of the turning joystick when driving straight.

Our code is on our repository here: https://github.com/dhruviyer/5465-20...bot/Robot.java

Is this what you are looking for?
Reply With Quote
  #4   Spotlight this post!  
Unread 05-02-2017, 23:03
WTFogland WTFogland is offline
Registered User
FRC #5505
Team Role: Alumni
 
Join Date: Feb 2016
Rookie Year: 2015
Location: Michigan
Posts: 10
WTFogland is an unknown quantity at this point
Re: Gyro and Tank Drive

Quote:
Originally Posted by DIyer5465 View Post
We are using tank drive with two joysticks, one controls forward/back and the other controls left/right

We are using an ADXRS450 to keep the robot going straight while we drive. We use a P-controller that "takes over" the role of the turning joystick when driving straight.

Our code is on our repository here: https://github.com/dhruviyer/5465-20...bot/Robot.java

Is this what you are looking for?
Yes exactly. I am wanting to use it basically for keeping the robot on a straight drive. Thanks
Reply With Quote
  #5   Spotlight this post!  
Unread 05-02-2017, 23:18
Caleb Sykes's Avatar
Caleb Sykes Caleb Sykes is offline
Registered User
FRC #4536 (MinuteBots)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2009
Location: St. Paul, Minnesota
Posts: 1,076
Caleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond reputeCaleb Sykes has a reputation beyond repute
Re: Gyro and Tank Drive

Quote:
Originally Posted by DIyer5465 View Post
We are using tank drive with two joysticks, one controls forward/back and the other controls left/right

We are using an ADXRS450 to keep the robot going straight while we drive. We use a P-controller that "takes over" the role of the turning joystick when driving straight.

Our code is on our repository here: https://github.com/dhruviyer/5465-20...bot/Robot.java

Is this what you are looking for?
Your threshold for when to use the straight-driving code seems very small at only 1% of the joystick range during normal driving. When I have made similar code in the past I recall making the threshold much higher, like between 5% and 15%.
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 09:44.

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