Let's Make Robots!

Robot Wall Racers

fritsl's picture
Finds the hidden racing track in every room.. and races it!
Time to build: 
5 hours

 

Your browser is not able to display this multimedia content.


UPDATE: Nothing new, just a small edit.


 

A video in better quality than YouTube & Google is here

How to make Robot Wall Racers yourself, see here

The car-chase was made by holding a camera on a stick, chasing the cars around. Some clips where made by placing the camera on a record-player. All editing was done in the standard "free" program that comes with a Mac, called iMovie. It is a nice program for light editing.. but phew, it was pushed to make this

The second video shows some work with the skid-turning. It also shows improved handling in general.

Notice how it sometimes mis-judges when the wall is not 90 degrees, but has bumps. But also how it handles getting out again :D (Me proud, love this, think it is cool, it drives so much better than what I can do with remote myself)

Of course I could just give it some more space to turn in the code, to drive more "safe", but I kind of like it to be tight :) And notice hw it never bumps into anything else - the polystyrene-blocks would fly right off if it hit them.

I have added an extra battery for more power.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Your home is a racing track, you just do not know it.

Look at your floor where it meets a wall.

Between 30 and 70 cm from that goes an imaginary path, following along the wall.

That is the racing track!

Where the wall meets another wall, or there is an obstacle, the track follows in a smooth path, always 30-70 cm away, on the floor.

The track returns to where you started, you see! :)

It is a full racing track:

You can time how long time it takes for a little robo-car to take one round. You can then try to improve the code, and time it again.

 

If you make the car like this:

IMG_3962.JPG?imgmax=720

One sensor (Could also be infra-red or whatever) looks ahead, another looks to the right. Then code could be something like this:

main:

If something in front, turn left, go to main.

If something closer than 30 cm to the right, turn left, go to main.

if nothing in front and something closer than 70 cm to the right, drive ahead, go to main.

If nothing to the right closer than 70 cm, turn right, go to main.

 

A car is racing your home!

It can be timed how long before passing by the same line again and again.

But a single car is just test-labs, no?

 

Now take 2 cars with the excact same setup as above, let's say a red car & a blue car. Now it get's interesting!

If red car is behind blue car, what does it do?

Well.. Something (blue car) is in front, so we turn left to take over.. until nothing is on the right, so we pull back.. That is trying to take over!

At a point the blue car is turning left because there is something in front.

Then the red car will have the inner track..

 

What is actually going on, is that one car is behind, but is "strugeling" to take over.. when it is in front, the other will fight to get ahead.. and we have a full race :D

You can take Red & Blue and place them next to each other, next to the wall; They will both drive full speed ahead, until a turn, where the inner car will have advantage. But then..

IMG_3887.JPGIMG_3895.JPGIMG_3937.JPGIMG_3910.JPGIMG_3913.JPG

IMG_3921.JPG?imgmax=800

Wall Racers are born, ladies and gentlemen.. I had these 2 cheap RC cars with crap maneuvering abilities, and thought of what I could do with them. Crap - but still; They sort of drive like cars - not like differential steered robots.

It has ben quite simple, have experimented with AZ8222's instead of motor drivers. And just a Picaxe on a standard board, simple and fast.

Of course, when turning angle is not enough to avoid obstacles, maneuvers with reverse and 3-point turns must be done. But this is why we have a microcontroller, and it is not spoiling the fun - on the contrary :)

wallracer_brown.jpg

pir-march07.jpg

 

TheOther1's picture

Good idea!  Maybe an IR

Good idea!  Maybe an IR receiver in the front of each and an IR LED in the back of each would help with overtaking.
TigPT's picture

thats what i was thinking

thats what i was thinking about while was reading.. =D

 go on.. i wanna see the race =P

(can't w8 for my ultrasounds arrive.. i don't have any distance sensor.. only can make it with bumpers switchs or IR reflection.. that bouth sucks..)

fritsl's picture

No guys - you don't get the

No guys - you don't get the beauty in the math :)

If any extra, all we need is a bumper at the back to ensure it knows if it is reversing into something when doing a 3-point turn.

So far it is just theory - I had the idea late last night. But I might get the time to build them later today if all goes well - so we will see if it works as I hope :) 

/ Fritsl

Ole's picture

Sounds like fun!

Sounds like fun!
Nebster's picture

hey frits you know what! you

hey frits you know what! you just entered the toy car challenge. =) i think
fritsl's picture

Not only that - I am going

Not only that - I am going to win it! =) I think!

:D 

/ Fritsl

BaseOverApex's picture

"Toy" That's exactly what it is

Hehehe. What do you think you're going to win with that tiny little thing? THIS will (eventually) do the same thing, but outside in the big bad world!

MinesBiggerThanYours.jpg

God created the integers; all else is the work of man - Leopold Kronecker

fritsl's picture

"The same thing"? My "Wall

"The same thing"? My "Wall Racing-concept"?..  or "just drive around and avoid obstacles"? 

/ Fritsl

BaseOverApex's picture

Haha!

No. I was having a laugh. I've not considered an entry for this competition, although I probably should. I could use those tracks. 

God created the integers; all else is the work of man - Leopold Kronecker

You think thats impresive!

Im working on making my nitro gas poered buggy autonomous.  It goes 50 mph and im definately going to put a remote overide on it.  I may put it up on here!♦

fritsl's picture

Wicked!What sensors? Let me

Wicked!

What sensors? Let me warn you, even at the low speeds mine are driving by, I was getting close to the limit of the SRF05's - You will be suprised at how much distance is needed to react.

And since the SRF05's in reality do not do more than 1.5 meters, 50 mph will need some good grip from the tyres :)

I know

First of all Thats what the remote overide is for!  Im thinking of using a program that uses 2 webcams to see distance It says it can see up to 4 meters.  it has wiked steering and can stop on a dime.  Its experimental but its gonna be cool!
myblack60impala's picture

RE:

(baseoverapex's picture)This is a Tamiya Blackfoot chassis, which was also used on a few other spin-off RC vehicles. Watchout for the "dog bones" also called half shafts that power the rear wheels. These are famous for wearing out on these chassis's. They sell high quality replacements online using CV joint technology. I know off topic, but I've owned 10 of these and had these problems over and over....
jklug80's picture

Looks like fun. Too bad

Looks like fun. Too bad those SRF05 are so expensive! I chopped some of my old RC toys that didn't work apart and harvested some high RPM motors. I never realized RC toys could be so fun! I may try to take the board out of it and integrate the radio control with a PIC board... Backwards of what you have done, but still similar ;)
fritsl's picture

CrisTheCarpenter did a

CrisTheCarpenter did a similar project, I remember :) 

/ Fritsl

BaseOverApex's picture

R/C

I've had a R/C remote send an input to a PIC. It's dead easy. The waveform output by the R/C receiver is IDENTICAL (surprise, surprise) to that required as the input to R/C servos which is so well dcouemnted all over the web.

God created the integers; all else is the work of man - Leopold Kronecker

TigPT's picture

nice pictures =D greath

nice pictures =D greath project!!!
TheCowGod's picture

Oh man, these robots, like

Oh man, these robots, like all of your robots, look so fun. One MORE idea I want to play with :) The speed, I think, is the big think that makes these appealing. My attempt at controlling an R/C car with a microcontroller didn't work very well, because it couldn't process the input from the sensor fast enough to react in time. But these can aparently react even when driving at full speed, and that makes them really fun :)

Dan

BaseOverApex's picture

Photos and Controllers

It helps that Frits appears to be bloody brilliant at macro photography!!

My experience the first time I tried this (with my car above) was that I had no way of reversing a 10A 7.2V motor! I couldn't find a suitable H-bridge and I was (as ever) on a budget that didn't allow an electronic speed controller. I should have stuck with the mechanical controller and driver the servo. In the end I used a DPDT relay but I didn't understand the concept of waiting for the motor to stop before reversing direction. Yes, there were sparks.

fritsl's picture

I am using 4 DPDT relays as

I am using 4 DPDT relays as well. TheCowGod showed e that they could be used to revert current (thanks), and I use another to turn the motors on/off.

I Know that 2 of the relays has one set too many pins etc, but yadayada. It was what I had :D See pictures here: http://picasaweb.google.com/fritslyneborg/WallRacers

To both of you; I think the challenge is the programming. My initial attempt did bang and crash a lot, SRF05's where torn off etc.. So I took my own medicine, just started with driving ahead and stopping before a wall, then.. and then..

I would never be able to "just program this". One thing, example; I discovered that it takes a 20 miliseconds (20 ms!!) yank to one side JUST before reversing, and then turning etc to make a skid turn come out right (skid to the right side).

My first code did not have that kind of details, but then I programmed layer upon layer of things that works.. 

It also helped me to insert a potentiometer before the rear motor, and film the behavior - all to analyze / get slow motion.. Because there is no way in hell I would be able to figure out how to create the code else. These things just fly around, gives a large impact on a wall (they are heavy now), continues to flip out afterwards .. and it is impossible to remember "what went wrong".

But with these tricks it was quite easy, spend perhaps 2-6 hours of programming & testing to get it completely right, and it was easy & doing well from first (simple) line: Stop before wall.

This approach also makes it drive "like a person", IMHO.

/ Fritsl

fritsl's picture

Rgarding the photos

Regarding the photos, I tried to give my knowledge here:

http://letsmakerobots.com/node/466 

/ Fritsl

BaseOverApex's picture

Coding Nuts

See, I'd love the coding. I'd be thinking: If I know my distance over time, then I know my speed. If I have three samples of distance, I know my acceleration. Couple of laps to measure the braking constant of the rubber against the wood floor and try to create an algorithm that "learns" when to brake without hitting the wall andlearns when to "yank".
fritsl's picture

Wow! My code is only 210

Wow! My code is only 210 bytes :D

Am optimizing, will make walkthrough!

/ Fritsl

GobliZ's picture

Awesome, I love the idea,

Awesome, I love the idea, the implementation. gimme more :)
alessio136's picture

very very nice,good stuff

very very nice,

good stuff always rise from simple ideas. 

hello

 

I was impressed with your racers, made me want to do my own now :) i was thinking about how close you could get them to the wall,have you tryed putting proportoinal responce into the code, something like

 

x=distance from wall on right;

y=distance from wall infrount;

z=100-((y+x)/10) 

turn Z amount.

I made a wall follower once for university and the idea was it would always stay 3cm away from wall and follow it. i found the type of forumula above was fairly easy and produced good results,might make it more fluid.

 if you have something like excel or matlab you can even find the best turning curves etc.

 Anyways great project and i liked the videos alot.

 Noz

fritsl's picture

Hum.. erh.. thanks..

Hum.. erh.. thanks.. hmm..

Well - to put it short; I think one thousand nerds out there have tried to make something like wall racers / Microcontroller on an old RC. But failed because they thought they could calculate the way out of things / predict etc like the robots they have experience from.

The thing is; These things (specially the cheap ones) steer like a numb fish, react like a drunk fish, and whip around like fish on speed in a heavy stream. It is NOT like a nice slow little robot. You cannot transmit formulas from "ordinary robots" that behave nice to these things, they will bang into the wall and act crazy if you try. It has to be formulas on how to steer a numb, drunk fish - on speed, in a heavy stream :)

But I will release both code and how-to's asap. I will release a very simple base-version that works (100% the one on the videos, and possibly more videos to come) - and then you can have all the fun in the world by trying different formulas - they take an afternoon to build, and are very cheap :)

Thanks again,

F. 

BaseOverApex's picture

A Fishy Tale

You evidently have most experience, so how exaclty DO you steer a drunk, numb fish on speed in a heavy stream? Is it anything like trying to steer a frightened sheep towards the edge of a cliff while wearing your wellington boots?
fritsl's picture

Walkthrough is comming -

Walkthrough is comming - with code :)
Zalzer's picture

Nice little critters

Realy like the fact that you have taken radiocontrolled cars and made them childproof, radiocontrolled cars that doesn't drive into thing that's definetly something I think a lot of parents would like and that way they also last longer

Have you thought about hidding the SRF05 sensors indside the car, can't quite come up with a way to hide ultrasonic sensors inside the cars, I can only think of a way to do it with infrared sensors.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.