Personal tools
You are here: Home sirblog What is the SirBot Project ?
About the SirBot Project
The SirBot Project is a framework on which you can easily build robots. Have a look at the SirBot Labs to see what can be done with it !
Here's the Tamabot DayCare, the bot that takes care of your tamagotchi !!!

And the SirBot Ranger is able to measure distances, and detect obstacles such as fruits...
« February 2010 »
Su Mo Tu We Th Fr Sa
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28            
 
Document Actions

What is the SirBot Project ?

by Sébastien Lelong posted at 2007-01-25 13:33 last modified 2007-01-25 13:33


BTW, what is the SirBot Project ? What it is for ? Good question, I've often wondered what it was. As of today, I'm quite clear about what it is, what it does, and what it should be and do... And the easiest way to understand what it is and what is does is to consider how you'd do things without it.

So... How does it look like without SirBot ?

OK. You like doing electronic stuff. All those resistors, those capacitors, those leds are just great. Once, you discover microcontrollers, these chips you can (almost) easily program to do amazing things, such as... blinking a led ! Yes, blinking a led is great. A lot a time was needed to blink a led, but you're proud, because you now see all the opportunities which appears now you can blink a led. You decide to build you own home-made Aibo robot. It rulez :)

From blinking a led to your next Aibo generation, that's a long way. So you start, for instance, to get distance measures, thanks to this GP2D02 IR ranger from Sharp. This will be usefull when your Aibo needs to move and detect objects. But here it becomes more complicated... You'd like to order to take distance whenever you want. You need to communicate with your microcontroller and remember there's an old protocol which could help: serial communication aka RS232 com (or the like). So you decide to code this communication protocol and now you're able to trigger your favorite serial communication program (cu ?) and send orders to your microcontroller. Yes, you order it to take a distance measure, and it returns the result: a char. Far from a distance in cm... Just one char. Sometimes you can't even see the char because it's not printable... You need to convert this char into a human readable distance. Coding the translation within the PIC would require several hours (days ?) whereas it just takes 10 minutes to do it in python. Too bad. More, it would take too much memory (2K for the PIC 16F628). Way too much. And you need memory. And you think it's just a waste of time and memory to have this translation done within the PIC. More, what about reacting when the distance becomes too short ? How to easily detect this event ? Give up...

Because your Aibo will also need to move, you decide to start learning how to move servos. Again, you need to communicate with your bot to send the positions for all your servos. Doing this through the serial communication becomes annoying. It's unreadable. And you'd like to send order such as "move servo A so it describes a circle. Twice. Please" instead of "move servo A to position 1, move servo A to position 2, move servo A to position 3, move servo... Twice ? Kidding !". This example is illustrated as followed: an IR ranger attached to a servo is moved, incrementally. On each step, the ranger takes a distance measure. Here's what it looks like:


ranging_without_sirbot.jpg


You need to aggregate orders into simpler one. And again, you don't want to code them in the PIC (memory). You want to code them from your friendly PC. Doing so, you'll also be able to dynamically program your bot: you just code the primitive actions within the PIC, and keep the other actions programmed from your PC. The code will be cleaner, easier to maintain, your future Aibo will be more powerfull...

Several days, even months, have passed. You look at your PIC microcontroller and wonder what it is: "WTF is this chip done for ?". you look at the assembler code and... well... it's just unreadable. Even with all these comments (because days have passed). After one hour, you finally remember you can get distance measures with it. Another hour and you remember how to convert those weird returned chars into a human readable distance, thanks to these graphs and sheets and this "man ascii". You then remember you can move servo but another hour is required to understand why moving your servo to position 13 by sending "SA13" just does not work. (position is coded with 3 digits using the MIC800 chip).

You need a way to easily build your bot, access your bot, communicate with it, understand what it says, and react according to different events it produces. You need a framework, easy to use.

You need SirBot, because:

  • building a bot is easy: just look at the available modules, and assemble them. More modules will be soon available so you'll be able to build quite complex bots
  • communicate with your bot is easy, thanks to protocol declaration syntax (next post will explain this).
  • SirBot is python-powered, so you can access your bot with python CLI, such as ipython, and interactively control and program your bot
  • when you talk to your bot, returned response can be converted into events, thanks to the event declaration syntax (more on this later). Events can be created from other events (cascading events). Events can also be conditionnaly triggered under specific conditions (pre-condition), and activate user-defined actions (post-conditions) according to a particular event state.

Compared to the previous results, here's what it looks like when you want to range a scene with SirBot:


ranging_with_sirbot.jpg


Next time, this will be the TamaBot DayCare howto...

 

Category(s)
SirBot Project
Add comment

You can add a comment by filling out the form below. Plain text formatting.

(Required)
(Required)
(Required)
(Required)

(Required)

Powered by Plone Powered by Gentoo