To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 2200
2199  |  2201
Subject: 
Re: Measuring robot turn angle
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Thu, 10 Jan 2002 09:47:12 GMT
Viewed: 
1571 times
  
On Wed, 9 Jan 2002, Robert Templeton wrote:

The drive system in my robot is an adder-subtractor (see
http://carol.wins.uva.nl/~leo/lego/diff.html) which uses two differentials
in order to get equalized forward/reverse drive while allowing turning and
pivoting (turning in place).  For navigational purposes, the robot should be
able to turn or pivot a certain number of degrees relative to its current
heading, maybe with the assistance of a rotation sensor.  But, I am at a
loss as how to accomplish this in a non-interfering way considering that the
right and left wheel axles are independent of each other (the rotation
measurement would surely need to consider the rotation of each axle to
determine an accurate angle of rotation of the robot).  Any help
appreciated!! :)

I have done this, although not with a differential. My solution used a
rotation sensor on each axel, and good navigation can be done with that.
Since you can guarantee that both axels turn the same amount, a single
rotation sensor should be enough.

Place the rotation sensor somewhere in your drive train. The faster the
axel it's on turns, the better, because that will give you more precise
data. Compute the ratio between a turn of the rotation sensor and a turn
of the wheel. Multiply by pi times the diameter of your wheels, and divide
by sixteen since you get sixteen increments from the sensor for each turn.
This number is how far each wheel moves forwards or backwards for each
increment of the sensor. Let's call it x, just so we have a name for it.

To compute the amount of a turn, save the current sensor value before the
turn starts. Then during the turn, take the difference between the current
value and the saved value, multiply by x to get the distance the wheels
moved. Now, your wheels are turning about a circle with a known radius
(measure the distance between your wheels and divide by two). The distance
around the circumference they've moved is 2*x*dif, where dif is the
difference in sensor values. The change in angle is then 2*x*dif/r radians
(r being half the distance between your wheels). If you want degrees,
multiply by 180/pi.

Note that the units you use for measurement don't matter, as long as
you're consistent. If you don't want to deal with floating-point or
fixed-point math, you'll want to use something small, like millimeters.

I hope this explanation is at least somewhat comprehensible. Let me know
if you have any further questions.

--
"From now on, we live in a world where man has walked on the moon.
And it's not a miracle, we just decided to go." -- Jim Lovell

Mike Ash - <http://www.mikeash.com/>, <mailto:mail@mikeash.com>



Message is in Reply To:
  Measuring robot turn angle
 
The drive system in my robot is an adder-subtractor (see (URL) which uses two differentials in order to get equalized forward/reverse drive while allowing turning and pivoting (turning in place). For navigational purposes, the robot should be able (...) (23 years ago, 9-Jan-02, to lugnet.robotics.rcx.legos)

5 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR