Autonomous Roaming

February 13, 2009 – 6:46 pm

Been a while since I posted, as I’ve been busy with my studies… but I continue to tinker with the robot when I can find the time! We did a telepresence test with the robot being navigated around the flat by an operator in the Netherlands, which was a success although quite laggy!

That reminded me of a goal I’d had for a while, of the robot wandering through the flat without an operator- or more importantly, not crashing or getting stuck along the way. I spent some of last weekend putting code together for that, and here’s one of the runs that resulted:

There’s no programmed destination, only a guiding principle of going in the direction that has the most empty space, but with a couple of boxes in place to nudge it left instead of right out of my room it’ll make a reasonable stab at travelling through the hallway to the living room. In the video you can see how an unfortunate collision with a wall throws it off task for a while, but it does eventually make it through.

The next video (making part of the return trip) shows similar problems with that corner; I don’t know if the sensor angle chosen just misses the fact there’s a wall there, or if all the mirrors in the hallway cause havoc with the IR. I have managed to get collision-free runs, but the failures demonstrate that’s more due to helpful initial positioning than a properly robust algorithm. So I’ve quite a way to go with this task!

A couple of notes on what it’s actually doing. The code is set up to perform different actions based on which of four states the bot is currently in.

State 1 (Initial State) Drive forward, and collect sensor readings for far left, near left, centre, near right and far right. If all sensor readings are higher than a panic threshold, move to state 0; if the centre sensor reading is above another threshold, move to state 3; if the centre reading is not the smallest, move to state 2. Otherwise, remain in state 1.

State 2 (direction correction) Stop the robot, then turn by 45 or 90 degrees left or right based on the smallest sensor reading obtained in last scan. Set state to 1.

State 3 (collision extraction) Stop the robot, then reverse for a couple of seconds before performing a 180 turn. Set state to 1.

State 0 (panic) Stop the robot, and wait for rescue ;-)

I’m using the LEDs to indicate some of the state transitions: states 1 and 2 get a green light, 0 and 3 a red light, as you can see in the videos. As currently implemented, any direction change requires a dead-stop; an earlier version was even more hesitant, with each scan being performed whilst stationary, leading to very slow forward progress even when the path ahead is clear. A couple of things I’d like to experiment with are adjusting course without those pauses (setting each motor speed based on the vector of scans), and increasing velocity for longer stretches of forward travel (at the moment it’s a fixed 1/10th of maximum speed). The trouble is, the faster you go, the more trouble you can get into between scans! Maybe some more sensors…

  1. 3 Responses to “Autonomous Roaming”

  2. I love it! I am working on a bit of vision-based autonomous navigation using a CMUCam1 and an Arduino. It is nice to see someone else who is happy to slowly plod along, only updating their blog when they do something worth a post :D Nice work. Bob

    By Robert Wallhead on Feb 16, 2009

  3. Hi Robert, checked out your project, impressed that you seem to be achieving with a camera what I’m trying to do with rangefinders.

    and yeah, my update schedule is casual at best- it’s not like my actual research has any fixed deadlines, so it’s unlikely my hobbies would proceed to a schedule!

    By Graeme on Feb 17, 2009

  4. Hi Graeme, I have been lucky with the environment that I am in. Looking for bright purple bean-bags, black shoes and grey cats is easy on a white floor ;) I am definitely going to stick to my intermittent updates though, it would be ruin creativity if I had an actual research schedule – unless someone was paying me to do it, of course!

    By Robert Wallhead on Mar 20, 2009

Post a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word