PiBot-A

LOL

(L, M, R) - didn’t notice that yet :wink:

“I would expect the robot will continue straight to try to find corrupted line” - me too :wink: I tested different length of the dead end: when the straight piece of the track is a little bit longer it behaves as you (and me) would expect. Currently the robot still has a little left twist when reaching the dead end, and I thought it was a nice alternative to the “railway switches”.

Maze Follower

I added a video of the “maze follower”, which is just a pre-study for the maze solver.

The peculiarity of my solution could be that I use only 3 sensors (rather than 5 or more, which seems to be usual). Notice that the robot is swaying a little bit whenever it reaches a node of the maze. It then looks to the left and the right to see whether there is a black line forking, a crossing or a T-junction. That way it compensates the absence of the outer sensors that are typically used for that purpose.

The timing is very crucial: it makes a big difference to drive some hundredths of seconds when the battery voltage is going up and down. Hence the robot starts with a 180° turn to the left and right and back for a calibration (see video). The time needed for this is measured and is taken into account when calculating the time for some particular movement.

For now the software only implements the left-hand rule, and the maze is pretty simple. Once it is finished, I’ll publish it here.

Software of maze follower

The software for the maze follower is here: robot-mf.py.

The calibration is still experimental. It works pretty well with fully charged batteries, when the battery voltage is going down, failures tend to occur more often. The video above was made with this code and full batteries :wink:

Nice robot!

What was the total build coet for this robot?

By the way this robot is just 

AWESOME!

Costs

Thanks for the compliment! The costs were about 25 Euro (28 USD) for the acrylic and 84 Euro (95 USD) for the remainder (w/o the sensors).

gefällt mir

 

Toll is well thought out like me … :slight_smile:

Toll kann mir gefallen gut ausgedacht… :wink:

 

Gerhard

Maze Solver

The maze sover (with 3 sensors) is now working pretty well (see video and description above). Task for the next rainy weekends: a Braitenberg vehicle :slight_smile:

**Excellent maze solver!

Now**
Excellent maze solver!

Now you should find an algorith fir those mazes that can’t be solved by the left-hand rule. :slight_smile:

Looped maze?

Do you mean a looped maze?

Software
I now published the software of the maze solver (see above).

Adding magnetic encoder

Hi Mosmas,

Thank you for sharing this project!

I want to add a Pololu magnetic encoder (https://www.pololu.com/product/2598) and PID controller code. I has bought all the components and next week I going to start the project.

Other future changes could be:

- Design 3D frame.

- Adding an Arduino for controlling motors and sensors. Connect raspberry pi with Arduino.

 

Any advice and suggestions will be greatly appreciated :) 

Sounds good!

That sounds like a good idea. Please keep me postet!

Very Nice!

Very nice, compact and very clean-built robot! Any reason you chose the 3 sensor bar rather than the (more typical for line following) 5 sensor? The RPi has plenty of IO’s left for more sensors.  You certainly have shown that it CAN be done with 3 sensors, the little nod you make is a clever solution to the problem of determining the type of junction the bot is looking at.

Very nice clean build. Thanks for posting such a complete write-up here! Wish more here would write-up their projects this well. Certainly will be re-visiting your web site on this project (and your Pi-Bot-B) soon!

DB

Don’t give up on your Arduino!

Granted I am an RPi convert myself, but this project is well within the capabilities of an Arduino Uno. Sometimes you just can’t beat the simplicity that the Arduino offers! With the RPi you have to be careful of voltage levels on the I/O pins (need to keep them under 3.3v on the Pi) or you could easily fry your Pi - the Arduino is not so sensitive. The RPi has more computing power than an Arduino but for small robots with simple tasks like this you generally don’t need much. The I/O on the Arduino is generally easier to program and cleaner to build. The best of both worlds is to use the the RPi for the heavy lifting (video, behavior, navigation, AI) duties and link to an Arduino via I2C for the general I/O stuff…

-DB

 

3 vs 5 sensors

When I started tinkering with the maze solver, I only had the 3 sensor bar at hand and I was not willing to wait for getting a 5 sensor bar. When I saw that my workaround idea (the little nod) was expedient I felt some burning ambition to get it working with a limitation on only 3 sensors.

Thanks for your kind words regarding the write-up. I just added a description of the software. Hope my awful english is good enough.

RPi vs Arduino

I know that it is a common architecture to combine RPi (for high level tasks) and Arduino (for motor control). But (1) I love to exhaust the capabilities of RPi, (2) I’m pretty skilled in script languages, other than C, and (3) there are no realtime requirements (in my robot) and scripts are working fine under Linux.

Maybe I’ll try this one some time: Onion Omega – this cute little thingy also comes with Linux and Python …

Software

I now published the complete software.

Software download

New: all scripts in gzipped tarball.

I am going to use raspberry pi

the project is very helpful.i like the chassis design,very neat.

Designing the frame

I made a 3d design. And I made my first test with arduino and https://www.pololu.com/product/2511. It works well for me.

Next step raspberry b+. :slight_smile: I will publish my code when it works.

http://www.thingiverse.com/thing:820066

https://www.youtube.com/watch?v=vOJt9fkQors&feature=youtu.be