PDA

View Full Version : [Contest Entry] Xr-B3 - My latest robot



lnxfergy
05-10-2008, 11:52 AM
Thought I would post some pictures of my latest robot, Xr-B3. He is powered by an AVR ATMEGA324P micro controller on a custom board that I made. He is using an XBEE module to communicate with my PC (and eventually with other robots). Onboard sensory includes: 3 Sharp IR sensors (for wall following and obstacle detection), an SRF-05 sonar sensor and AVRcam. The sonar and camera are mounted in a 2-axis head. He also has quadrature encoders on each wheel, I currently have code implemented for closed loop turns and rolling forward a set distance, but have yet to do continuous speed control.

http://forums.trossenrobotics.com/gallery/files/1/7/6/8/xrb3-small.jpg

UPDATE: I've now gotten most of the mapping code working. He can make metric maps of small areas - or topological maps of larger areas. And in theory he can make topological maps from metric maps... but I've pretty near run out of memory to handle that - 2K of RAM only goes so far. I've added a pic below of the Map-Builder GUI (written in Python) which displays his map:

http://forums.trossenrobotics.com/gallery/files/1/7/6/8/screenshot-map_builder.png

http://home.nycap.rr.com/ferginfo/Robots/pictures/xrb3elec.jpg

Here is B3 running through the Maze. This video doesn't show any backtracking (I'm still having issues with the transitions):

http://www.youtube.com/watch?v=32YPyz2EzLc


And, a quick video of B3 using his AVRcam to follow an object:

http://www.youtube.com/watch?v=l58nPRBXob8

-Fergs

Adrenalynn
05-10-2008, 12:02 PM
It aint easy being green, as Kermit would have it, but it sure looks sexy!

Awesome bots!

Did you do the image processing code on that little processor for video object following?

Welcome to the forum, btw!

lnxfergy
05-10-2008, 06:45 PM
Did you do the image processing code on that little processor for video object following?

I did not write the image processing code - it is built into the open-source AVRcam (www.jrobot.net (http://www.jrobot.net)). It's a blob tracker, up to 8 blobs at 30FPS. However, it does run on a little processor - actually an ATMEGA8 (and uses only 4k of the available flash). My mega324 then connects to the mega8 on the AVRcam using the serial port (which is the reason I am using a mega324, it has dual hardware serial ports - 1 for the xbee/pc connection and 1 for the camera)

Although I didn't write the code on the AVRcam currently, I am working on making my own frame manager that would return proper data for road following. Using the AVRcam means I don't have to do hardware and systems design for the interaction with the camera, I can just plug in a different frame manager which gives out different processed data.

-Fergs

DresnerRobotics
05-10-2008, 07:39 PM
Very nice man, I love the color scheme.

Now you are making me want to pickup one of those AVRcams too lol

You planning on posting on the other two bots?

lnxfergy
05-10-2008, 07:46 PM
Very nice man, I love the color scheme.

Now you are making me want to pickup one of those AVRcams too lol

You planning on posting on the other two bots?

Yeah, the AVRcam is quite awesome - the only caveat is the documentation (rather, the lack thereof). Still for a $100, its quite good (especially the open-source aspect). I'm still having some crashes with the interaction between the two micros, but once I figure that out I will post the code....

The other two bots - I'll start another thread on the other big one shortly.

The smaller bot in the picture is really just a stripped down version of B3, made to be really cheap. I'm working on that for another upcoming project - all I will say right now is that I intend to have 12-16 of those small ones working in unison on a task.......

-Fergs

Adrenalynn
05-10-2008, 09:20 PM
Thanks for the pointer! Pretty cool!

Sienna
05-11-2008, 09:03 AM
If you call that inside messy, I want to see what you think is clean! The bots look very nice!

LinuxGuy
05-11-2008, 01:09 PM
Now you are making me want to pickup one of those AVRcams too lol
You might want to check out the CMUCam3 (http://www.cmucam.org/) or the Blackfin Camera Board (http://www.surveyor.com/blackfin/). More processing power for video stuff. :happy:

8-Dale

LinuxGuy
05-11-2008, 01:15 PM
Thought I would post some pictures of my latest robot, Xr-B3. He is powered by an AVR ATMEGA324P micro controller on a custom board that I made. He is using an XBEE module to communicate with my PC (and eventually with other robots). Onboard sensory includes: 2 Sharp IR sensors (for wall following and obstacle detection), an SRF-05 sonar sensor and AVRcam. The sonar and camera are mounted in a 2-axis head. He also has quadrature encoders on each wheel, I currently have code implemented for closed loop turns and rolling forward a set distance, but have yet to do continuous speed control.
Very nicely put together! You have me wondering what I might be able to do with a few AVRs now... I've been tinkering using PICs/dsPICs, and there are some PICs with Ethernet or USB, but I have not actually applied any of these to robotics (yet).

8-Dale

lnxfergy
05-11-2008, 03:08 PM
You might want to check out the CMUCam3 (http://www.cmucam.org/) or the Blackfin Camera Board (http://www.surveyor.com/blackfin/). More processing power for video stuff. :happy:

8-Dale

They are, however, quite a bit more expensive. Still, I am looking at getting a blackfin some day.

The default AVRcam is actually only using 4k of it's 8K of ROM, and about 700bytes of the 1k of RAM. The newer mega168 is pin-for-pin compatible with the mega8, and doubles the RAM and ROM. Processing time wise, it is pretty busy when tracking at 30FPS, but you could still squeak a little more out of it. Further, 30FPS is really overkill for small robots (my servos can't really update to more than about 3 positions per second and the extra bandwidth eats up processing time and serial port usage).

I'm currently working to port the code to the 168, and reduce the FPS to about 10-15, which will allow more on-board processing to take place.

-Fergs

lnxfergy
05-11-2008, 03:12 PM
Very nicely put together! You have me wondering what I might be able to do with a few AVRs now... I've been tinkering using PICs/dsPICs, and there are some PICs with Ethernet or USB, but I have not actually applied any of these to robotics (yet).

8-Dale

In case you have noticed: I love AVRs. The free AVR-GCC (and winAVR, the windows distribution of AVR-GCC) is a great package. The hardware is really reliable and cheap. And the hardware is also so similar: code I have on an ATMEGA8 can be run on a MEGA644 (which has about 8x the hardware) with only a few register changes.

But the biggest bonus: so many people (especially hobbyists) who are using AVRs post full details and code examples.

-Fergs

Alex
05-15-2008, 09:01 AM
Nice bot Fergs! I got ya entered in this round;)

If you get around to it, I'd love to see some vids of this guy showing off it's sonar and IR sensors.

lnxfergy
06-24-2008, 02:07 PM
Nice bot Fergs! I got ya entered in this round;)

If you get around to it, I'd love to see some vids of this guy showing off it's sonar and IR sensors.

I finally got around to getting a video of his navigation and mapping capabilities. Here is B3 running through the Maze. This video doesn't show any backtracking or loop closure yet (I'm still having issues with the transitions):

http://www.youtube.com/watch?v=32YPyz2EzLc

-Fergs

Adrenalynn
06-24-2008, 08:06 PM
That's really fascinating, Fergs! Thanks for sharing!

Any pointers you can provide for sample code and/or documentation on the method of mapping you're using?

lnxfergy
06-24-2008, 08:56 PM
That's really fascinating, Fergs! Thanks for sharing!

Any pointers you can provide for sample code and/or documentation on the method of mapping you're using?

The software under the hood is actually pretty simple. B3's control software is built around the hybrid behavior-based paradigm. Behaviors are built up from an arbitration loop and a high-level planner. I can dynamically switch between behaviors over the Xbee wireless, using the console on my computer. For the mapping behavior, the arbitration loop basically runs several quick checks at about 30hz. It checks in front with the sonar and to the sides with the IR, if walls appear/disappear, the planner gets called. If no issues arise, it will then run the follow wall correction. The planner is a separate function, when called, it's action depends on what mode we are in: backtrack or explore. In explore mode, the planner surveys the surroundings with the sonar (thats the head moving around), and then creates new nodes in the map. It then chooses where to go. If we are backtracking, a wave planner finds the route to goal, then we follow the path.

This is the second generation of the mapping software. The first generation was used on my fire fighting bot - it had an a priori topological map, and then used the map+environment to navigate through the maze.

This version can actually build the map while traversing an unknown environment. It is also supposed to be able to return to a previous point and explore from there. I currently can backtrack to previous points, but the transition from backtrack to wander isn't reliable yet. (I can also bootstrap it with a map, tell it to backtrack, and basically do what the previous version did). So far, B3 has only run small mazes, and the highlight of his demoing was a run at UAlbany (using a known map).

Things I still plan to implement include getting the backtracking to work reliably. I also need to implement loop closure (knowing when two nodes are actually the same place) - I plan to add some metrics to the system to achieve this. I have a link to a great paper from RPI on loop closure in topo maps - somewhere, when I find it I will post. Other than that, one of the best resources on topological mapping is "An Introduction To A.I. Robotics" by Robin Murphy.

Eventually I will have real documentation and release the code, but B3 is still very much a work in progress - and I haven't ruled out using this system for the Expert Division at Trinity next year.

-Fergs

lnxfergy
06-24-2008, 09:03 PM
After reading my own post, maybe "simple" wasn't the word I was looking for.....

-Fergs

lnxfergy
01-22-2009, 01:43 AM
Note: I've fixed the missing pics in the original post: and added a picture of the Map Builder GUI - I hope to have a nice video at some point....

-Fergs