I've been busier than a hog farmer at feedin' time. - Andy Baker [more]
 Chief Delphi Theoretical Method For Tank Rotation
 portal register members calendar search Today's Posts Mark Forums Read FAQ rules

#1
02-13-2018, 10:23 AM
 TLHPoE Registered User AKA: Kavin Phan FRC #6750 (Pack Attack) Team Role: Programmer Join Date: Feb 2017 Rookie Year: 2017 Location: Stockbridge, Georgia Posts: 19
Theoretical Method For Tank Rotation

Our robot's chassis has 3 wheels on each side in a basic tank configuration (minus the treads). I'm trying to find the number of rotations the wheels would have to move to rotate the entire robot a certain angle, assuming both sides spin opposite of each other to do so. I know I could just count the rotations using an encoder by starting the counter and then rotate the robot manually, but I'm asking if there is a way to look for the number using math instead of trials.

I'm sure there's a simple method to my problem, but I'm having trouble wrapping my head around it.
#2
02-13-2018, 10:29 AM
 JamesCH95 Hardcore Dork AKA: JCH FRC #0095 (The Grasshoppers) Team Role: Engineer Join Date: Dec 2004 Rookie Year: 2001 Location: Enfield, NH Posts: 2,596
Re: Theoretical Method For Tank Rotation

Quote:
 Originally Posted by TLHPoE Our robot's chassis has 3 wheels on each side in a basic tank configuration (minus the treads). I'm trying to find the number of rotations the wheels would have to move to rotate the entire robot a certain angle, assuming both sides spin opposite of each other to do so. I know I could just count the rotations using an encoder by starting the counter and then rotate the robot manually, but I'm asking if there is a way to look for the number using math instead of trials. I'm sure there's a simple method to my problem, but I'm having trouble wrapping my head around it.
Each wheel is moving in an arc centered along your chassis rotational axis (affected by wheel type, weight distribution, and wheel location). You just need to calculate the arc length each wheel will move.

My guess is:
r=1/2*track
Θ=90°

__________________
Theory is a nice place, I'd like to go there one day, I hear everything works there.

Maturity is knowing you were an idiot, common sense is trying to not be an idiot, wisdom is knowing that you will still be an idiot.
#3
02-13-2018, 10:51 AM
 TLHPoE Registered User AKA: Kavin Phan FRC #6750 (Pack Attack) Team Role: Programmer Join Date: Feb 2017 Rookie Year: 2017 Location: Stockbridge, Georgia Posts: 19
Re: Theoretical Method For Tank Rotation

Quote:
 Originally Posted by JamesCH95 Each wheel is moving in an arc centered along your chassis rotational axis (affected by wheel type, weight distribution, and wheel location). You just need to calculate the arc length each wheel will move. My guess is: r=1/2*track Θ=90° assuming your turning center is located midway between your center wheels.
Ah, yeah I get it now. It's just the wheel circumference into the length of the arc, with the degrees desired equal to the arc length over the circumference of the circle between the two center wheels.

As for the gyros, that probably would have been a better idea.
#4
02-13-2018, 10:29 AM
 Yossarian "Anything can happen" -2708, 2018 AKA: Jordan FRC #2708 (Lake Effect Robotics) Team Role: Alumni Join Date: Oct 2017 Rookie Year: 2015 Location: Syracuse, NY Posts: 42
Re: Theoretical Method For Tank Rotation

My team uses almost the exact same configuration.
However
We use a Gyroscope for the Rio to measure this sort of thing. There are many different kinds of gyros to buy for the Rio, with varying degrees of difficulty.
#5
02-13-2018, 10:51 AM
 BenBernard Programming and Controls Mentor FRC #5687 (The Outliers) Team Role: Mentor Join Date: Jan 2016 Rookie Year: 2015 Location: Portland, ME Posts: 129
Re: Theoretical Method For Tank Rotation

I strongly recommend using a gyro (eg, navX) for this. You'll get MUCH better results with a gyro, and they're not terribly hard to integrate.

If you really can't switch to a gyro at this point, you can get the values empirically by logging the encoder counts to smartdashboard and turning your robot as described. If you do the logging in periodic() you can turn manually without even enabling the robot.

Last edited by BenBernard : 02-13-2018 at 10:53 AM.
#6
02-13-2018, 11:52 AM
 gerthworm Making the 1's and 0's FRC #1736 (Robot Casserole) Team Role: Mentor Join Date: Jan 2015 Rookie Year: 2015 Location: Peoria, IL Posts: 711
Re: Theoretical Method For Tank Rotation

Quote:
 Originally Posted by TLHPoE I know I could just count the rotations using an encoder by starting the counter and then rotate the robot manually, but I'm asking if there is a way to look for the number using math instead of trials.
The theory presented here presumes no wheel slip while rotating. It's good to use this to get a ballpark initial estimate, but in real-life would probably produce somewhat poor quality results (varies depending on robot).

Gyro would seem to be the way to go, in my mind. Directly measure the thing you care about.

I would say your solution would yield an intermediate-quality result. I can't recall where I saw it, but some teams did use this method to determine the feed-forward portion of rotation calculations.
#7
02-13-2018, 11:56 AM
 Oblarg 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,908
Re: Theoretical Method For Tank Rotation

Run a motion profile that spins the robot in place by turning the wheels a known distance. Do some division to calculate the robot's "effective trackwidth" from the resulting angular displacement (which you should measure, either with a gyro or otherwise).

The "effective trackwidth" stays pretty reliably constant, in our experience.
__________________
"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
#8
02-13-2018, 12:00 PM
 MaGiC_PiKaChU Drive Coach AKA: Antoine L. FRC #3360 (Hyperion) Team Role: Mentor Join Date: Mar 2014 Rookie Year: 2012 Location: Sherbrooke Posts: 673
Re: Theoretical Method For Tank Rotation

we use encoders with a PID. We convert encoders ticks to degrees with a variable that you have to find. Basically, we ask to robot to turn 360 degrees, then calculate the offset. If there was too much rotation, we tune it down a bit, and vice versa. We don't like the arc method, because it does not consider wheels spinning.
__________________
2012 - 3360 - Junior member
2013-2014 - 3360 - Lead Programmer, Human player
2015 - 3360 - Lead Programmer, Driver
2016-2018 - 3360 - Mentor, Drive coach

#9
02-13-2018, 12:03 PM
 Ether systems engineer (retired) no team Join Date: Nov 2009 Rookie Year: 1969 Location: US Posts: 9,126
Re: Theoretical Method For Tank Rotation

Quote:
 Originally Posted by TLHPoE Our robot's chassis has 3 wheels on each side in a basic tank configuration (minus the treads).

Are all three wheels on each side chained/belted together? Or are some of them not driven (or independently driven)?

Are all wheels traction or are some omni?

How much drop do you have on the center wheels?

 Thread Tools Display Modes Rate This Thread Hybrid Mode Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 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 User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     User Announcements FIRST     General Forum     Rumor Mill     Career     Robot Showcase Technical     Technical Discussion     Robotics Education and Curriculum     Motors     Electrical         CAN     Programming         NI LabVIEW         C/C++         Java         Python     Sensors     Control System     Pneumatics     Kit & Additional Hardware     CAD         Inventor         SolidWorks         Creo     IT / Communications         3D Animation and Competition         Website Design/Showcase         Videography and Photography         Computer Graphics Competition     Awards         Chairman's Award     Rules/Strategy         Scouting     Team Organization         Fundraising         Starting New Teams         Finding A Team         College Teams     Championship Event     Regional Competitions     District Events     Off-Season Events     Thanks and/or Congrats     FRC Game Design     OCCRA         OCCRA Q&A Other     Chit-Chat         Games/Trivia         Fantasy FIRST     Car Nack's Corner     College & University Education     Dean Kamen's Inventions     FIRST-related Organizations         The Blue Alliance     FIRST In the News...     FIRST Lego League     FIRST Tech Challenge     VEX     Televised Robotics     Math and Science     NASA Discussion ChiefDelphi.com Website     CD Forum Support     Extra Discussion

All times are GMT -5. The time now is 08:28 AM.

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

 -- English (12 hour) -- English (24 hour) Contact Us - Chief Delphi - Rules - Archive - Top