Autonomous BRAT project

Here is the temporary home for the Autonomous BRAT information while we work on the full tutorial. EDIT: I’m no longer updating this forum thread with updates. We are adding content directly to the tutorial.
lynxmotion.com/images/html/build130.htm

Here is the code I’m using to make the BRAT autonomous. It uses a GP2D12 attached pointing forward. There is also a timer going to tell the guy to take a rest every so often. It whistles a little tune when resting. The speaker is used to provide audible feedback between steps indicating if the GP2D12 has detected something. The higher the pitch, the closer an obstacle is. If an obstacle is detected the robot will take one step back and turn two steps to the left, then start walking forward again. The LEDs on the Bot Board II also light indication what behavior the bot is doing. This code is very easy to edit. There are no timing issues as HSERVO and some extra programming by Nathan at Basic Micro runs an SSC-32 emulation in the background. So any sensor can be added in the main control loop. There are 11 sequences already in the program (from the SEQ tutorial) Other sensors we will be adding are an accelerometer so the robot will be able to get up from laying on it’s front, or back automatically.

This is the link to the IDE you need. Pro 8.0.1.7
basicmicro.com/downloads/software/BasicAtomProSetup_8017.exe

File for finding servo offsets and displaying them in the terminal window.
lynxmotion.com/images/files/bratosf.bas

BRAT autonomous program, can be edited easily for different sensors and behaviors.
lynxmotion.com/images/files/irabrat3.bas

Here is a video of the BRAT avoiding an obstacle.
lynxmotion.com/images/video/avoid01.mpg

Taking a break…
lynxmotion.com/images/video/break01.mpg

Walking into the sunset. :slight_smile:
lynxmotion.com/images/video/walkaway.mpg

Check it out! 8)

I updated the code and added some videos. Enjoy…

Very Nice. Since the new Year I have been planning to build and program an autonmous BRAT over the summer. This should give me a good start.

:exclamation: *Jim’s at it for sure… *:!:

:smiley: 8) GREAT JOB !!! 8) :smiley:

I’m a little rusty, but it’s coming back.

James is adding some functionality. We added one port from a 2 axis accelerometer so if the guy is turned on when laying on its front or back it will get up. It will also get up if it falls over. Just adding a jumper to the VS line by the AX0 (Pro pin 16) will allow the bot to know when the battery is getting low and beep a tone. This is too much fun! 8)

Done 8)

If you’re lucky, I’ll get you guys a video of it working :wink:

Here is the beginnings of the tutorial. We will be adding much more content, but it’s a good start.
lynxmotion.com/images/html/build130.htm

Cool project. I’m glad to see you are using the Pro. There should be some useful code there even for people not building brats.

I built my BRAT a little different, but it should work with the existing code. I have the U channel with the opening facing outward instead of up, and I used the sensor mount to mount the Multi-Purpose Sensor Housing to mount the GP2D12 IR Sensor to the U channel. This allows easily switching to a PING if one wants to do that. This is also the build configuration needed for adding arms.

8-Dale

On the tutorial, figure 11 is the same as figure 9, which I don’t think is what you want.

8-Dale

I built my brat with the U-channel in the same direction as the tutorial. On the front of it I mounted a multi-purpose bracket and a servo and then mounted a multi-purpose sensor housing(or a special purpose bracket for an SRF10), that I had a SRF08 mounted on my brat. Currently it has been moved to the rover and I have an SRF10 that I will put on it…

So maybe I will play with Jim’s code and add some panning into the code.

Kurt

would love to see that kurte, I admire your work in this area.