To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 4704
4703  |  4705
Subject: 
A robot who knows his position
Newsgroups: 
lugnet.robotics
Date: 
Tue, 27 Apr 1999 22:12:25 GMT
Viewed: 
934 times
  
I had some success in my first experiment with odometry. My goal was to build
and program a bot that at every moment knows where he is.

My creature uses a very simple and standard differential-drive: two large
independent driving wheels on the left and right side, and two smaller free
swivelling caster wheels in centre of front and rear side. Two rotation sensors
are coupled to the main wheels to keep track of their rotations. No photos
published on my web site yet, but  you may have a look at Robert Ashford's
differential drive robot (http://www.apc.net/rashfor/differen.htm) which is
very similar to mine.
I'm sure the program may be adapted to any other kind of sensor arrangement
suitable to measure rotations.

The equations to deduce the bot position from wheel movements are pretty easy
to use and understand, but I had to face the problem that they require floating
point computations and trigonometry. Floating-point math is out of the reach of
any present software solution on the RCX, so I decided to use fixed-point math
with 4 decimal digits emulated using integers.

I soon discovered that this project was out of the possibilities of NQC or any
other interface to the standard Lego firmware (I'd be glad to be proven wrong
on this…). The integer variables allowed are simply too small and not enough,
and I needed arrays too to implement fixed-point trig (I choose to use
interpolation over a table of values instead of convergent series).

To keep the story short, I ended up using legOS. I took more than a few minutes
to get it set up on my Windows based PC, but now I feel very comfortable with
it. The precision of its 32 bits long integers was enough for my goals.

I intend this program as a starting point for some further more advanced
project. It simply provides a method to know where the bot is and to drive it
to any specified point. If you have, just to say, to gather cans and bring them
to your starting point this might be useful…:-)

The representation of the space inside the bot is a simple Cartesian plane,
where the origin is the starting point. Distances are expressed in 10000th of
millimetre and angles in 10000th of radian. The bot is obviously not precise up
to this point, but just to keep computation approximations as low as possible.

The program is not yet published in my website, but I want to make it public
domain and would be glad to send it to anyone who ask for it (send me an
e-mail). The only condition is: if you find any bug or make any improvement,
please let me know and possibly send a copy of your modifications... :-)
I'm pretty sure it can be made better.

The fixed-point math routines (sin, cos, arcsin, sqrt) contained in the program
may be useful for other projects too.

Glad to share this result with all you guys. Lugnet is a great place.

Mario

---------------------------------------------------
http://www.geocities.com/CapeCanaveral/Galaxy/9449/



Message has 1 Reply:
  Re: A robot who knows his position
 
(...) Actually, software floating point is quite doable on the H8. In fact, at least egcs 1.1.[1,2] includes FP emulation (config/fp-bit.c), which gets put into libgcc2.a, which get merged into libgcc.a. You don't have to do anything special to use (...) (25 years ago, 27-Apr-99, to lugnet.robotics)

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