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:
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|