ROBOTC.net forumshttp://www.robotc.net/forums/ Simple Question: Rotationshttp://www.robotc.net/forums/viewtopic.php?f=52&t=3593 Page 1 of 1

 Author: JaguarsTeam5009 [ Thu Oct 13, 2011 5:05 pm ] Post subject: Simple Question: Rotations Hello, I'm a member from the Jaguars Team. I have a simple n00by question, for the default TETRIX robot (built from the manual), how many rotations (or "clicks") would it take to make a simple 90 degree (I do know 1440 ticks = 1 rotation but don't know how many to make a complete right or left turn). I believe the NXT is 2 roations for 90 degrees with 1 motor running (with both it's probably less).Thanks for the help, I wish I knew the answer to this simple question!

Author:  MHTS [ Thu Oct 13, 2011 6:44 pm ]
Post subject:  Re: Simple Question: Rotations

It depends on what kind of turn you are making. For example, are you turning the left and right wheels with equal power but in opposite direction (turn in place)? Or are you turning with one wheel stopped and other wheel forward (swing turn)? This affects the pivot point. Assuming you are turning the wheels in opposite directions (turn in place), your pivot point will be the centroid between the four wheels (or however many wheels). Then you can use the following. It will give you a good initial value but you may still need to fine tune it for compensating inaccurate measurement and real world factors.
 Code:#define GEAR_RATIO              (24.0/16.0)     //motor:wheel=24:16#define WHEEL_CIRCUMFERENCE     13.00           //in inches#define CLICKS_PER_REVOLUTION   1440.0          //in clicks#define WHEELBASE_DISTANCE      60.00           //in inches//// Assuming the encoder is mounted on the motor shaft.//#define DISTANCE_PER_CLICK      (WHEEL_CIRCUMFERENCE*GEAR_RATIO/CLICKS_PER_REVOLUTION)#define DEGREES_PER_CLICK       (360.0/(PI*WHEELBASE_DISTANCE/DISTANCE_PER_CLICK))

Basically, if you turn in place, you are drawing a circle on the ground with the center of the circle being the centroid of the wheel base with the diameter approximately equal to the distance between diagonal wheels. Therefore, you first translate the number of encoder ticks to the distance travelled on one of the wheels. Then assume the wheel is travelling along the circumference of the circle, you can calculate the relationship between the distance travelled and the degrees turned.

 Author: JaguarsTeam5009 [ Fri Oct 14, 2011 4:07 pm ] Post subject: Re: Simple Question: Rotations Thanks for the help! We figured it out after a little while.

 Page 1 of 1 All times are UTC - 5 hours [ DST ] Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Grouphttp://www.phpbb.com/