Answers.Body: <p>The math you're suggesting may work for going straight forward or backward where slipping is limited.  For a turn, it will not come close.  Even getting the center of rotation of the turning robot will be difficult.  The tracks will have to slip.  A tracked robot can not turn without those tracks slipping.  Differences in friction will alter the turn. More weight on the left or right, front or back of the robot will alter the turn.</p>
  
  <p>Even abandoning the tracks for wheels is not guarantee that the math of how much the robot should turn will match reality.  This is not to say abandon the math, just a hint that it will only give an approximation.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-25T01:02:46.280Z
Answers.Text: I haven't noticed any slippage (yet, I've been testing on hard surfaces with lots of traction), but what I did notice is that the bearing value in beacon mode for the infrared sensor isn't a value I can base my calculations on. It's not degrees. I'm not sure what type of measurement it is.
Answers.UserDisplayName: Christopher Perry
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-25T08:58:11.127Z
Answers.Text: As dfrevert said, tracks MUST slip to turn, it's impossible otherwise. The IR sensor returns an indication of the difference of illumination received by the two internal receivers, this is by no way an angle. Same of thing when used as a distance sensor, it gives an indication based on strength of IR echoed to the sensor, so it is not linear and repends on reflectivity of target.
Answers.UserDisplayName: Philo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-25T00:32:41.393Z
Answers.LastActivityDate: 2014-03-25T00:32:41.393Z
Answers.UserDisplayName: dfrevert
Answers.Body: <p>A 360 degree turn takes: (width of robot/circumference of wheel) turns, neglecting track thickness, assuming the tracks are at sides if the robot. </p>
  
  <p>The length of track doesn't matter. Your robots non-slipping part of the track is traversing a circle of diameter=width of robot. The other parts of the track are sliding across the surface.  A longer robot / track only affects the efficiency of turning not the rate. </p>
  
  <p>If the surface is rough, there may be jumping and movement of the center of rotation. Calculations are good but don't be afraid to calibrate to the surface after testing. </p>
  
  <p>Not sure why you are using IR sensors for turning. the ev3 motors have encoders and can be told to turn fractional rotations or by degrees. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-28T10:06:42.850Z
Answers.Text: One possible reason for using something other than the motor encoder is to account for the slippage - if you don't know how much your tracks are slipping, telling the motor to turn 20 degrees isn't going to result in a 20 degree output.
Answers.UserDisplayName: Zhaph - Ben Duguid
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-04-01T02:07:12.537Z
Answers.Text: agreed, but the constraint on the question was encoders only. and since tank drive is a inherently a skid drive, accounting for the slippage correctly is not really possible without something like a gyro or external reference.  In any case in practice, slippage of the pivot points on smooth regular surfaces is not an issue unless pushing something.
Answers.UserDisplayName: mostlyWright
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-03-27T22:22:14.380Z
Answers.LastActivityDate: 2014-03-28T10:04:34.550Z
Answers.LastEditDate: 2014-03-28T10:04:34.550Z
Answers.UserDisplayName: mostlyWright
Body: <p>I don't have a gyro sensor so that's not a possible solution (until I purchase one). I figured I'd just do the math on this one. What I'd really like to know are:</p>
  
  <ol>
  <li>The circumference of the <a href="http://brickset.com/parts/4502834" rel="nofollow">caterpillar track</a> that comes in the Ev3 set. (I was hoping it would be etched into it, but I didn't see anything besides 1-01 in the rubber on the inner part of the belt).</li>
  <li>The circumference of the rims that come in the Ev3 set.</li>
  <li>The driving "gear" for this is the rim attached to the large motor(s), there are two followers that support the belt. Correct me if I'm wrong, but the only two things I should be factoring into the math are the rim driving the belt and the belt itself correct?</li>
  </ol>
  
  <p>EDIT (answered parts):</p>
  
  <ol>
  <li>If <a href="http://www.brickowl.com/catalog/lego-caterpillar-track-with-thirty-six-ridges-13972-53992" rel="nofollow">this</a> is correct the length is 14cm.</li>
  <li>If <a href="http://brickset.com/parts/4299389" rel="nofollow">this</a> is correct, the circumference is 3cm.</li>
  </ol>
  
Tags: <ev3><size><wheel>
Title: Turn a tank a specific number of degrees
UserDisplayName: Christopher Perry
ThreadText: # Turn a tank a specific number of degrees
  
  (Asked by: username_0 on 2014-03-23)
  
  I don't have a gyro sensor so that's not a possible solution (until I purchase one). I figured I'd just do the math on this one. What I'd really like to know are:
  
  1. The circumference of the [caterpillar track](http://brickset.com/parts/4502834) that comes in the Ev3 set. (I was hoping it would be etched into it, but I didn't see anything besides 1-01 in the rubber on the inner part of the belt).
  2. The circumference of the rims that come in the Ev3 set.
  3. The driving "gear" for this is the rim attached to the large motor(s), there are two followers that support the belt. Correct me if I'm wrong, but the only two things I should be factoring into the math are the rim driving the belt and the belt itself correct?
  
  EDIT (answered parts):
  
  1. If [this](http://www.brickowl.com/catalog/lego-caterpillar-track-with-thirty-six-ridges-13972-53992) is correct the length is 14cm.
  2. If [this](http://brickset.com/parts/4299389) is correct, the circumference is 3cm.
  
  **Tags:** ev3, size, wheel
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2014-03-25. Score: 4
  
  The math you're suggesting may work for going straight forward or backward where slipping is limited. For a turn, it will not come close. Even getting the center of rotation of the turning robot will be difficult. The tracks will have to slip. A tracked robot can not turn without those tracks slipping. Differences in friction will alter the turn. More weight on the left or right, front or back of the robot will alter the turn.
  
  Even abandoning the tracks for wheels is not guarantee that the math of how much the robot should turn will match reality. This is not to say abandon the math, just a hint that it will only give an approximation.
  
  > **Comments:**
  > **username_0**: I haven't noticed any slippage (yet, I've been testing on hard surfaces with lots of traction), but what I did notice is that the bearing value in beacon mode for the infrared sensor isn't a value I can base my calculations on. It's not degrees. I'm not sure what type of measurement it is.  
  > **username_2**: As dfrevert said, tracks MUST slip to turn, it's impossible otherwise. The IR sensor returns an indication of the difference of illumination received by the two internal receivers, this is by no way an angle. Same of thing when used as a distance sensor, it gives an indication based on strength of IR echoed to the sensor, so it is not linear and repends on reflectivity of target.  
  
  ---
  
  ### Answer by username_3 on 2014-03-27. Score: 2
  
  A 360 degree turn takes: (width of robot/circumference of wheel) turns, neglecting track thickness, assuming the tracks are at sides if the robot.
  
  The length of track doesn't matter. Your robots non-slipping part of the track is traversing a circle of diameter=width of robot. The other parts of the track are sliding across the surface. A longer robot / track only affects the efficiency of turning not the rate.
  
  If the surface is rough, there may be jumping and movement of the center of rotation. Calculations are good but don't be afraid to calibrate to the surface after testing.
  
  Not sure why you are using IR sensors for turning. the ev3 motors have encoders and can be told to turn fractional rotations or by degrees.
  
  > **Comments:**
  > **username_4**: One possible reason for using something other than the motor encoder is to account for the slippage - if you don't know how much your tracks are slipping, telling the motor to turn 20 degrees isn't going to result in a 20 degree output.  
  > **username_3**: agreed, but the constraint on the question was encoders only. and since tank drive is a inherently a skid drive, accounting for the slippage correctly is not really possible without something like a gyro or external reference.  In any case in practice, slippage of the pivot points on smooth regular surfaces is not an issue unless pushing something.  
  
  ---
  
  