Author Topic: Movement tracking or mapping  (Read 3636 times)

0 Members and 1 Guest are viewing this topic.

Offline MarkBrownTopic starter

  • Full Member
  • ***
  • Posts: 77
  • Helpful? 0
    • Mark's Projects
Movement tracking or mapping
« on: August 25, 2008, 06:02:02 PM »
I am working on designing my next robot.  I have just about everything figured out, sonar for collision detection, Axon for the controller, compass module for orientation tracking, but I can't seem to figure a good way to track movement.

I want my bot to travel the area of a room in a pattern, back and forth like mowing a lawn.  That part is simple.  What I am having difficulty with though is adding collision detection into the mix.  If my robot is traveling along its line and the sonar detect an object, I want the robot to turn and follow the object until the bot makes it around the object.  I then want the robot to return to its path just after the object.

What I am trying to figure out though is how to track how far off course the bot had to go to avoid the object in order to get it back on track.  The only thing I can think of right now is either using an accelerometer, or stepper motors.  Unfortunately I do not know allot about either.

What I have is two questions really.  One, does anyone have any suggestions on how to track how far off my bot goes off course, either by using sensors or algorithms, and two, if using an accelerometer or stepper motors is a viable option, where is a good place to get information on these?

Thank you,

Mark Brown
It is human nature to confuse genious with insanity

http://marksproject.blogspot.com/

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,704
  • Helpful? 173
    • Society of Robots
Re: Movement tracking or mapping
« Reply #1 on: August 27, 2008, 03:52:31 PM »
Quote
Movement tracking or mapping
Quote
If my robot is traveling along its line and the sonar detect an object, I want the robot to turn and follow the object until the bot makes it around the object.  I then want the robot to return to its path just after the object.
I don't quite understand . . . is the object moving or is it stationary? What type of objects? I mean, a chair leg is very hard to detect compared to a wall . . .

Quote
What I am trying to figure out though is how to track how far off course the bot had to go to avoid the object in order to get it back on track.
The simplest way would be using a wavefront algorithm:
http://www.societyofrobots.com/programming_wavefront.shtml
With encoders as your distance sensor:
http://www.societyofrobots.com/sensors_encoder.shtml

Using the Axon RAM, you can probably get a ~42x42 grid size. If you use the EEPROM (sorry, I haven't written code yet), you can get a grid size of about ~950x950. I haven't tried the Axon for mapping yet, so I'm basing it off of my experience with the $50 Robot ATmega168.

Offline MarkBrownTopic starter

  • Full Member
  • ***
  • Posts: 77
  • Helpful? 0
    • Mark's Projects
Re: Movement tracking or mapping
« Reply #2 on: August 27, 2008, 05:05:39 PM »
Quote
Movement tracking or mapping
Quote
If my robot is traveling along its line and the sonar detect an object, I want the robot to turn and follow the object until the bot makes it around the object.  I then want the robot to return to its path just after the object.
I don't quite understand . . . is the object moving or is it stationary? What type of objects? I mean, a chair leg is very hard to detect compared to a wall . . .

Sorry about that, let me be more clear.  The objects are going to be stationary.  I plan to have the both stay within 3 centimeters from the object, or other crap I am too lazy to pick up.  I want the robot to go around the object, so when I say follow, I mean follow along the object's edge.  The object can be anything from a 12v car battery, to a rake, to a wall, to a chair.

Quote
Quote
What I am trying to figure out though is how to track how far off course the bot had to go to avoid the object in order to get it back on track.
The simplest way would be using a wavefront algorithm:
http://www.societyofrobots.com/programming_wavefront.shtml
With encoders as your distance sensor:
http://www.societyofrobots.com/sensors_encoder.shtml

I have already looked into encoders, and I thank you for your great tutorial on them.  It have been leaning towards using that method.  As far as the wavefront algorithm, I will look into this as I haven't heard of it before now.

Quote
Using the Axon RAM, you can probably get a ~42x42 grid size. If you use the EEPROM (sorry, I haven't written code yet), you can get a grid size of about ~950x950. I haven't tried the Axon for mapping yet, so I'm basing it off of my experience with the $50 Robot ATmega168.

I received my Axon today and am very excited to start putting it to use.  I am not sure what you are talking about with the grid sizes.  I was planning on combining the black jack card counting method with the mathematical graphing coordinate system to keep track of where I am at.  I also plan to write up something on it when I have it implemented to give more detailed information.  If you can direct me to where I can find out more about what you are referring to with the grid sizes, and how I would use EEPROM, I would appreciate it.

Mark
It is human nature to confuse genious with insanity

http://marksproject.blogspot.com/

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,704
  • Helpful? 173
    • Society of Robots
Re: Movement tracking or mapping
« Reply #3 on: August 27, 2008, 05:49:57 PM »
Quote
I am not sure what you are talking about with the grid sizes.  I was planning on combining the black jack card counting method with the mathematical graphing coordinate system to keep track of where I am at.
So basically a map is a matrix of X and Y, where inside each position (grid point, square, etc) contains data on that position (object in the way, robot here, goal location, etc). When your robot maps, it will discretize 'the world' into little squares of a certain size.

Lets say your square is 1 foot by 1 foot. That means if your robot detects a 2 foot long object, it will take up two squares. But what if the object was 1 inch, it would still take up an entire square. So then you'd use smaller squares, but smaller squares take up more memory and more processing power (because you have more of them). So basically, the grid size I gave you was the maximum matrix size you are allowed given memory limits on the Axon.

(hoping that made sense)

Quote
how I would use EEPROM
Try this:
http://www.nongnu.org/avr-libc/user-manual/globals.html#index_e
http://www.google.com/search?q=eeprom+AVR+source+code

It will probably be several months before I write simple well documented code to use eeprom on the Axon.

Offline MarkBrownTopic starter

  • Full Member
  • ***
  • Posts: 77
  • Helpful? 0
    • Mark's Projects
Re: Movement tracking or mapping
« Reply #4 on: August 27, 2008, 06:26:25 PM »
Thanks, it made sense.  Just after making my last post, I read your tutorial on Wavefront mapping.  Right away I knew what you where talking about with the grids.

Thank you,

Mark
It is human nature to confuse genious with insanity

http://marksproject.blogspot.com/

 

SMF spam blocked by CleanTalk