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 / 1652
1651  |  1653
Subject: 
Re: Motor Speed value interpretation?
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Tue, 23 Jan 2001 15:46:26 GMT
Viewed: 
1334 times
  
On Tue, 23 Jan 2001, ross hennessy wrote:

  sorry if this question has been asked before but i was just wondering what
the speed values for the motors represent? i have a robot with two motor driven
wheels which i would like to be able to make drive in an arc. To do this i have
to set the motors at different speeds so that the angular velocities of the two
wheel shafts are at the right ratio for the arc. My problem is that the
relationship between the speed value eg 0 - 255, isn't in linear proportion to
the angular velocity of the motors drive shaft (which seems resonable since you
can only really specify a force for the motor since the angular velocity will
rely upon the weight of the robot). Does anyone know a formula for this
relationship so that i can work out the exact figures for the speeds of the
motors rather than put rotation sensors on the wheel shafts, since this is
providing to be quite difficult (not the actual watching of the rotation
sensors, but rather adjusting the speeds acording to what values you are
getting back, not difficult to do slowly, but difficult to get the robot to hit
the right arc quickly).

As far as I can tell, the speed value really affects power output. This
indirectly affects speed, but not in a very happy way. You end up with a
wide range of values that give you nearly the same speed, then a very
short range that decreases quickly to being stopped, and then a bunch of
speeds that aren't strong enough to move the robot at all. The small range
with a highly variable speed is very, very dependent on battery power,
motor strength, robot weight, gearing, etc. I would be fairly surprised if
you were able to get consistent results.

I have a routine in my code that forces the robot to drive in a straight
line by watching the rotation sensors, and it's very fast. What I do is, I
pick an arbitrary number (I use 5) and record the current sensor
positions. Then I wait for one or the other sensor to change by that much.
Then I shut off the motor that's ahead, and wait for the other one to
change by 5. Then I turn them both back on and add 5 to the positions. The
way my robot is geared, a change of 5 in the rotation sensors is maybe a
centimeter of movement. The last step, where I just add 5 to the current
positions, is key. Instead of updating from the real values, I just add my
arbitrary number, which compensates for any coasting it would do after the
motors are shut off. I think you could take a similar approach, but make
the arbitrary value twice as large (or something like that) for one motor.
If my explanation is confusing (and I'm thinking it is), I'd be happy to
send you the code, or post it here.

--
"The greatest obstacle to discovery is not ignorance -
it is the illusion of knowledge." - Daniel J. Boorstin

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



Message is in Reply To:
  Motor Speed value interpretation?
 
Hi all, sorry if this question has been asked before but i was just wondering what the speed values for the motors represent? i have a robot with two motor driven wheels which i would like to be able to make drive in an arc. To do this i have to set (...) (24 years ago, 23-Jan-01, 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