+ Post New Thread
Results 1 to 3 of 3
  1. #1
    Newbie level 4
    Points: 544, Level: 4

    Join Date
    Aug 2013
    Posts
    5
    Helped
    0 / 0
    Points
    544
    Level
    4

    Algorithm for automated Vacuum Cleaner

    I am trying to make a fully autonomous robotic vacuum cleaner.
    I am having a tough time, trying to figure out the best possible algorithm to do this.
    The current algorithm that i have in mind , involves the bot going in spiral squares, until it sees an obstacle , and thereafter traversing the obstacle and then continuing the spiral routine.

    I find this a bit too troublesome to code, and i am not sure if it would traverse the room fully.
    Before i started coding , i wanted to know if there was any better , efficient way to navigate fully through a room and do the cleaning ??

    My bot is rectangle shaped, with IR sensors on all sides, and an ultrasonic sensor on the top fitted on top of a servo motor.

    What would be the best algorithm to do this ?

    •   AltAdvertisment

        
       

  2. #2
    Advanced Member level 5
    Points: 22,515, Level: 36
    barry's Avatar
    Join Date
    Mar 2005
    Location
    California, USA
    Posts
    4,303
    Helped
    954 / 954
    Points
    22,515
    Level
    36

    Re: Algorithm for automated Vacuum Cleaner

    Unless you have a round room, I don't know why you would have the bot run in a spiral; do YOU vacuum the floor in spirals? Why not run it like a Zamboni or a lawn mower? Have it first find a corner and then just go back and forth in rows.



    •   AltAdvertisment

        
       

  3. #3
    Advanced Member level 5
    Points: 25,337, Level: 38

    Join Date
    Dec 2010
    Location
    Southampton and holiday cottage in Wensleydale (UK)
    Posts
    4,863
    Helped
    1313 / 1313
    Points
    25,337
    Level
    38

    Re: Algorithm for automated Vacuum Cleaner

    One advantage of a square spiral is only 90 degree + some off set* turns rather then 180 degrees + some off set as in a lawn mower.
    My first stab :- ( imagine a room with 4 walls, North, East South, West. ), So start off in the SW corner - proc advance. When front is blocked, turn E until front is blocked (corner of room)- proc. NW corner OR Lh side is clear - proc. advance. I think this will get you so far, but when you get to the first corner, you will have to get you off set in, so you track the first wall BUT the width of the machine away from it - can you do this?
    Frank
    * off set :- if you do 180 or 90 degree turns you will just go over the path for ever, so you have to use a side step or a different angle to cover the whole area.



--[[ ]]--