Go to Post It's definitely possible to get very near to 100% prediction accuracy with machine learning. All you have to do is use a network at least as large as your data set and neglect to keep your training and testing data separate. - Caleb Sykes [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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 02-13-2018, 10:23 AM
TLHPoE TLHPoE is offline
Registered User
AKA: Kavin Phan
FRC #6750 (Pack Attack)
Team Role: Programmer
 
Join Date: Feb 2017
Rookie Year: 2017
Location: Stockbridge, Georgia
Posts: 8
TLHPoE is an unknown quantity at this point
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.
Reply With Quote
  #2   Spotlight this post!  
Unread 02-13-2018, 10:29 AM
JamesCH95's Avatar
JamesCH95 JamesCH95 is offline
Hardcore Dork
AKA: JCH
FRC #0095 (The Grasshoppers)
Team Role: Engineer
 
Join Date: Dec 2004
Rookie Year: 2001
Location: Enfield, NH
Posts: 2,378
JamesCH95 has a reputation beyond reputeJamesCH95 has a reputation beyond reputeJamesCH95 has a reputation beyond reputeJamesCH95 has a reputation beyond reputeJamesCH95 has a reputation beyond reputeJamesCH95 has a reputation beyond reputeJamesCH95 has a reputation beyond reputeJamesCH95 has a reputation beyond reputeJamesCH95 has a reputation beyond reputeJamesCH95 has a reputation beyond reputeJamesCH95 has a reputation beyond repute
Re: Theoretical Method For Tank Rotation

Quote:
Originally Posted by TLHPoE View Post
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

assuming your turning center is located midway between your center wheels.
__________________
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-13-2018, 10:29 AM
Yossarian's Avatar
Yossarian Yossarian is offline
Registered User
AKA: Jordan
FRC #2708 (Lake Effect Robotics)
Team Role: Operator
 
Join Date: Oct 2017
Rookie Year: 2015
Location: Kingston, ON
Posts: 11
Yossarian is an unknown quantity at this point
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.
Reply With Quote
  #4   Spotlight this post!  
Unread 02-13-2018, 10:51 AM
BenBernard's Avatar
BenBernard BenBernard is offline
Programming and Controls Mentor
FRC #5687 (The Outliers)
Team Role: Mentor
 
Join Date: Jan 2016
Rookie Year: 2015
Location: Portland, ME
Posts: 98
BenBernard will become famous soon enoughBenBernard will become famous soon enough
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.
Reply With Quote
  #5   Spotlight this post!  
Unread 02-13-2018, 10:51 AM
TLHPoE TLHPoE is offline
Registered User
AKA: Kavin Phan
FRC #6750 (Pack Attack)
Team Role: Programmer
 
Join Date: Feb 2017
Rookie Year: 2017
Location: Stockbridge, Georgia
Posts: 8
TLHPoE is an unknown quantity at this point
Re: Theoretical Method For Tank Rotation

Quote:
Originally Posted by JamesCH95 View Post
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.
Reply With Quote
  #6   Spotlight this post!  
Unread 02-13-2018, 11:52 AM
gerthworm's Avatar
gerthworm gerthworm is offline
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: 325
gerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond repute
Re: Theoretical Method For Tank Rotation

Quote:
Originally Posted by TLHPoE View Post
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.
Reply With Quote
  #7   Spotlight this post!  
Unread 02-13-2018, 11:56 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,792
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: 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
Reply With Quote
  #8   Spotlight this post!  
Unread 02-13-2018, 12:00 PM
MaGiC_PiKaChU's Avatar
MaGiC_PiKaChU MaGiC_PiKaChU is offline
Drive Coach
AKA: Antoine L.
FRC #3360 (Hyperion)
Team Role: Mentor
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Sherbrooke
Posts: 635
MaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond repute
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



Reply With Quote
  #9   Spotlight this post!  
Unread 02-13-2018, 12:03 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,849
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Theoretical Method For Tank Rotation

Quote:
Originally Posted by TLHPoE View Post
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?

Where's your center of mass?




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 01:59 AM.

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


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