Obstacle Avoider

Show everyone what you've built! Don't forget pictures of your creations.

Obstacle Avoider

Postby TomatoWire » Fri Jun 11, 2010 6:32 pm

A simple robot I'm developing. Right now all it does is obstacle avoidance, but I would like to develop it into a self-made platform for any task I wish. The next step is probably to mount a servo in the center with a cross bar so I can swivel all the distance sensors with one servo and get better avoidance. I'll probably also probably need to add bump sensors to compensate for the dead zone of the sensors.

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

Materials:
24 channel Maestro
4 analogue distance sensors
2 springrc continuous rotation servos
4xAA battery pack with built in on/off switch
zip ties and lots of hot glue
jumper wires were added to everything so it can easily be debugged and upgraded

Code:
Code: Select all Expand


Feedback on the code and ideas for additions would be greatly appreciated. (this is my first real project so its far from perfect at this point)
TomatoWire
 
Posts: 5
Joined: Thu May 27, 2010 6:55 pm

Re: Obstacle Avoider

Postby jan » Fri Jun 11, 2010 7:52 pm

Awesome! I think this is the first complete robot we've seen where a Maestro is the only controller and that isn't based on our little walking bug example. Thanks for sharing. What other programming experience did you have going into this, and how has working with the Maestro been?

- Jan
User avatar
jan
Pololu Employee
 
Posts: 2176
Joined: Sun Dec 28, 2003 7:12 pm
Location: Las Vegas, NV

Re: Obstacle Avoider

Postby TomatoWire » Fri Jun 11, 2010 8:17 pm

Thanks! Eventually my Physics students will be doing this as their first robotics project next year. So I need to minimize cost and get as much as I can out of just the maestro. Ultimately though I would like my students to build their own ideas. This will hopefully just becoming a way for them to learn and have something they can take home as a starting point. I only took 2 semesters of Java while I was in college(you can probably see the remnants of that in my code lol). Working with the stack has been a fun challenge. Right now I'm working on developing structures to make future projects much easier to code. I have a basic for loop, a switch statement, and a sort of fuzzy way to store a variable.

In any case the Maestro is awesome.
TomatoWire
 
Posts: 5
Joined: Thu May 27, 2010 6:55 pm

Re: Obstacle Avoider

Postby paul » Sun Jun 13, 2010 10:57 am

That's really cool, and I am glad you are having so much fun with the Maestro! Have you been using PEEK and POKE to store variables?

One thing I wanted to mention is that you can get rid of some of the dead zone of your distance sensors by mounting them as far back as possible rather than right on the edge of the chassis.

Anyway, good luck with your class and please let us know how it goes!

-Paul
User avatar
paul
Pololu Employee
 
Posts: 1490
Joined: Sun Nov 30, 2003 12:06 am
Location: Las Vegas, NV

Re: Obstacle Avoider

Postby TomatoWire » Mon Jun 14, 2010 4:02 pm

I hadn't even though about moving the sensors. A silly oversight. I have modified the code a bit. I change a few of the conditions to be a little more aggressive and also reduced the delays. I found an old servo and will probably start working on making the sensors swivel now.
TomatoWire
 
Posts: 5
Joined: Thu May 27, 2010 6:55 pm

Re: Obstacle Avoider

Postby The Big B » Wed Jun 16, 2010 5:04 am

Thats a cool robot, I'm trying to do something similar using a PIC micro controller with the whole thing built on the frame of an rc car but I have yet to have any great success, still seeing stuff like your robot just makes me want to try even harder so that I can say this is my achievement. Well done, it looks great!
The Big B
 
Posts: 9
Joined: Sat Jun 12, 2010 4:05 am


Return to Share Your Projects

Who is online

Users browsing this forum: No registered users and 1 guest