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 / 1407
1406  |  1408
Subject: 
Using the rotation sensor as velocity sensor
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Fri, 8 Sep 2000 07:54:12 GMT
Viewed: 
1114 times
  
Hello,

For my own project I need to measure the velocity at which my robot is
moving.  I finally patched the legOS kernel to get accurate values.  I
think that others may profit from a good velocity sensor.  The
velocity is given in rotation ticks (1/16 rotation) per second.  My
patch is available at

http://www.informatik.uni-oldenburg.de/~delwi/legOS/

My first approach was to poll the rotation sensor in 100 ms intervals,
but it turned out that it was inaccurate (since there are only very
few ticks in 100 ms) and making the interval longer would make the
reaction time very bad.

I came to the conclusion that it would be best to measure the interval
between two rotation ticks and use that to calculate the velocity.  To
get it as accurate as possible I put that code into the legOS routine
that increments the rotation counter.

The code is a bit more complicated, since the velocity must quickly
decrease if no more rotation ticks are read.

  Jochen



Message has 2 Replies:
  Re: Using the rotation sensor as velocity sensor
 
Looks solid to me, and I appreciate the effort to isolate all the code with #defines- hopefully, most future feature additions will be similarly controlled. If no one objects, I'm going to check this into CVS this afternoon. Thanks a lot, Jochen... (...) (24 years ago, 8-Sep-00, to lugnet.robotics.rcx.legos)
  Re: Using the rotation sensor as velocity sensor
 
Checked in to CVS. Thank you again, Jochen. By the way, for those of you who may want to check it out, I've disabled it by default in boot/config.h (as we probably should with rotation sensors) so you'll have to go in there and uncomment it (...) (24 years ago, 8-Sep-00, to lugnet.robotics.rcx.legos)

3 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