View unanswered posts | View active topics It is currently Wed May 23, 2018 9:10 am

 Page 1 of 1 [ 3 posts ]
 Print view Previous topic | Next topic
Simple Question: Rotations
Author Message
Rookie

Joined: Wed Oct 05, 2011 4:34 pm
Posts: 4
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!

Thu Oct 13, 2011 5:05 pm
Guru

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1523
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.

Thu Oct 13, 2011 6:44 pm
Rookie

Joined: Wed Oct 05, 2011 4:34 pm
Posts: 4
Re: Simple Question: Rotations
Thanks for the help! We figured it out after a little while.

Fri Oct 14, 2011 4:07 pm
Display posts from previous:  Sort by
 Page 1 of 1 [ 3 posts ]

#### Who is online

Users browsing this forum: No registered users and 2 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ ROBOTC Applications    ROBOTC for LEGO MINDSTORMS       Third-party sensors    ROBOTC for CORTEX & PIC    ROBOTC for VEX IQ    ROBOTC for Arduino    Robot Virtual Worlds    Multi-Robot Communications    Issues and Bugs Competitions & Partners    Mini Urban Challenge    CS2N Robot Virtual Worlds Competitions       VEX Skyrise Competition 2014-2015       VEX Toss Up 2013-2014       FTC Block Party! 2013-2014    Competitions using VEX - BEST, TSA, VEX, and RoboFest!    FTC Programming    RoboCup Junior and Other ROBOT Competitions Virtual Brick Robotics Discussions    General Discussions    Project Discussions Off-Topic ROBOTC Forum & ROBOTC.net Suggestions/Feedback    ROBOTC Forums Suggestions/Comments    ROBOTC.net Suggestions/Comments       NXT Programming: Tips for Beginning with ROBOTC       VEX Programming: Tips for Beginning with ROBOTC    2013 Robotics Summer Of Learning       VEX Toss Up Programming Challenge       FTC Ring It Up! Programming Challenge    International Forums       Spanish Forums          ROBOTC for MINDSTORMS          ROBOTC for VEX       French Forums          ROBOTC pour Mindstorms          ROBOTC pour IFI VEX       Japanese Forums （日本語のフォーラム）       German Forums    2015 Spring Carnival Event    PLTW (Project Lead The Way)    Robotics Merit Badge    2014 Robotics Academy Summer of Learning

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.