Robots that play with people and pets

I'm working on a design for a something to impress and entertain my niece Caroline, who has recently gotten involved with robots. Caroline is eleven; my impression is that she hasn't done any ground-up robot construction, but she does seem to have enjoyed a Lego-based program at her school.

So... I have an old Radio Shack "Street Quake" R/C truck I've dug out of my collection of thrift-store $2 specials, and I'm wondering how I can come up with "something" that is:

- Interesting and/or amusing to an eleven-year-old, - Autonomous, and - Cheap.

My first thought was a simple "wandering truck" that would occasionally go to sleep, then wake up, and wander some more. Its main goals would be to (a) move randomly so it looked like it was exploring and (b) not run into too many walls.

Then I discovered Bert Van Dam's 'web site and read his article on "Tom", a Subsumption-based robot that "chased" things, and things started falling into place. Here's what I hope I'll be able to make this truck do:

1) Wander about exploring and not cause too much damage. 2) Find a dark place and hide ("sleep") for a while. 3) Chase moving objects (based on distance) 4) "Play" with humans (and possibly dogs and cats) by moving toward them, following if they move away, and running away if they come close.

("Tom" has a rather full array of sensors, but I'm hoping I can get similar results with fewer, and a smaller investment.)

Well, after several days exploring odd places on the 'web, I haven't been able to come up with a simple, clear, and inexpensive way to tell if my robot is facing a warm-blooded creature. I've looked at E-fields, radiometers, thermopiles, pyrometers, and all sorts of noncontact temperature measuring devices with prices from $40 to $500 (I even looked into a gadget called a capaciflector); the best I've been able to come up with is sticking a pair of Fresnel-domed PIR motion detectors on the front of the truck. (Panasonic/ Matsushita's 'MP' series have some really nice features, but they're in the $30-$45 range).

I could do worse: somewhere in my collection is my father's Garden Frog which croaks when it "detects people", apparently by rapid changes in the intensity of light falling on it (think "CdS photoresistor"), but even that involves detecting motion. I'm curious as to whether anyone can suggest another approach. Detecting the presence of humans (e.g. "occupancy") seems to still be an Interesting Problem; I've seen USENET newsgroup discussions on the topic as far back as 1997.

The PIR approach has some problems. First, because it detects changes in temperature, it can't detect a nonmoving human. Second, it's not much help in determining range, and third, even when motion is present I'm not sure I can tell which direction the human is moving. How about a $10 noncontact ranging IR thermometer? "There's a 98.6 degF object 2.64 meters away" would be really nice, since I could use the range measurement to "chase" or "avoid".

Since I'm still at the GedankenRobot stage (the point where many of my best creations seem to get stuck) it's not hard to change my design. Any suggestions will be welcomed.

  • * *

A note on the R/C truck. I wan't thrilled with having to cobble up an L293D/PWM arrangement, but it looks like I can re-use the trucks existing -- and designed exactly for the motors and batteries -- drive electronics. This is one of many _many_ R/C and IR/C vehicles built around the Realtek TX2/RX2 and TX2C/RX2C chipsets, and it _looks_ like all I'll have to do is desolder the chip and solder in a 16-pin header for a cable.

Tracing a PC board to build some idea of its circuit is a long, tedious project (I've done it a few times, but it's never fun); it's simpler to throw the whole assembly away and start again. Even worse, you have to do it again for the next R/C vehicle. On the other hand, patching into the circuit through _known_ points (the RX2 pins) is not only straightforward but it's a _reusable_ technique. In fact, if I had the companion TX2 board, I could control the truck from _it_ and connect it to the RX2 board with a two-wire cable.

Will an AVR output pin properly drive the transistors controlling the L/R steering motor and the drive motor? Guess I'll find out, but even the _thought_ of accomplishing that kind of re-use warms my auld Scots heart.

  • * *

If anyone's curious, here are a few pointers to some of the items I've mentioned:

Bert Van Dam's 'web site

formatting link
Connell 1987: Tom (Description of "chase" behavior)
formatting link
Realtek RX2/TX2 and RX2C/TX2C datasheets
formatting link
formatting link
PIR Sensors/Modules/Detectors (search on PIR, Fresnel, RE200B)
formatting link
SKU#35050 $10.95
formatting link
CAT#IRD-10 $3.95
formatting link
BB054 $8.95
formatting link
QK76 $12.95

Discussion thread on finding Fresnel lenses

formatting link
s=409bf6d58c94f4f6fc69200d19b42dde&showtopic=5048

Enjoy...

Frank McKenney, McKenney Associates Richmond, Virginia / (804) 320-4887 Munged E-mail: frank uscore mckenney ayut minds pring dawt cahm (y'all)

-- Copper wire was invented when two Scotsmen found the same penny.

--

Reply to
Frnak McKenney
Loading thread data ...

Hi Frank. Just a couple of comments to boil down your post. van Dam has a lot of interesting stuff on his site. You should be able to cook up an interesting bot using subsumption techniques, possibly coupled with an "overseer" device that can select between different behavioral schemes for different situations.

Joe Jones' books "Mobile Robots" and also "Robot Programming" are very good practical introductions to subsumption techniques. Added to this, Joseph Jones & Ben Wirz discuss their RoCK robot, which had a number of different behaviors coded using subsumption techniques, and which they could select between using a manual pushbutton. One behavioral repertoire coded in were little song'n'dance routines. Kids love this.

formatting link
I haven't experimented much with PIR devices, but it seems you could use them to produce an interesting robot which would either approach or run away from humans, or animals, in different circumstances. Having such "ambivalent" responses might have some appeal to teenagers. You might also check Braitenberg's classic book "Vehicles" regards coding different forms of robot behavior for different situations.

More to practicalities, R/C cars generally do not make the best robot platforms, since they are made for speed, while most robots tend to lumber around at much slower rates. In general, the sorts of small computers used in small robots to do have enough processing power to deal with high speeds. R/C cars generally will not run well at slower speeds, since the gear trains are not geared properly for this. You won't get enough torque at the low end.

Also, the L293D h-bridges only handle 600-mA max, and most R/C car motors will draw much more than this. It's probably easiest to try and tap into the h-bridges already present in the car.

Reply to
dan michaels

Was supposed to say "... do not have enough ..."

Reply to
dan michaels

Dan,

Thanks for tak> Frnak McKenney wrote:

van Dam's description of his "Tom" robot was what really started pulling things together for me. The Subsumption approach seems to have worked well for van Dam, and I may well adopt it or something like it, but before I start coding I need to work out a clear and reasonably specific statement of how Caroline's toy will behave when she turns it on. I may change it later, but at least I won't be "evolving" code as I write.

Thanks for the reminder. I dug out my copy and I've flagged a couple of points to re-read when things calm down around here.

Thank you for the pointer. My Journal Storage and Retrieval system (see also: Stacks'o'Magasines ) turned up issues #141, 142, and 144, but it appears that I pulled #143 out some time back (for a ReallyGoodReason(tm), I'm certain) and never got around to replacing it.

The "Waltz" behavior sounded interesting, but there's little description beyond "plays songs and moves in a pattern". Still, it's worth thinking about.

One of my goals is to have the robot respond to humans and pets, and be able to distinguish them from (say) radiators and fireplaces (especially the latter! ). PIR detectors, as I mentioned in my original post, are the best thing I've found, but I'm hoping someone out there has a better approach. If not (and several past Usenet exchanges on the topic were inconclusive), I'll use them and hope that I can be "good enough" to amuse Caroline.

But... R/C cars, carefully acquired ("You're not throwing _that_ away, are you??!!") are much cheaper than the cost of most motors, battery packs, and motor controllers.

Yup. And as I mentioned, knowing the details of the TX2/RX2 IC family should let me do this without spending hours following PC board traces and trying to get part numbers off components.

Wish me luck. I'm hoping that creating this for Someone Else will be incentive enough to ensure that it at least makes it past the GedankenRobot stage; I have way too many bits and pieces of "virtual robots" that never saw a soldering iron lying around here.

And if any one out there has any suggestions for a cheap and reliable People Sensor, please feel free to comment.

Thanks again, Dan.

Frank McKenney, McKenney Associates Richmond, Virginia / (804) 320-4887 Munged E-mail: frank uscore mckenney ayut minds pring dawt cahm (y'all)

-- "Provide me with ships or proper sails for the celestial atmosphere and there will be men there, too, who do not fear the appalling distance" -- Johannes Kepler

--

Reply to
Frnak McKenney

For what you are trying to do, I would strongly suggest that evolving your code as you write it is the only way to go. Your goal is to make the robot interesting, and there's just no way possible for you to precisely define "interesting" before you start coding. You can't even do a good job of. No one can really.

Doing this type of evolutionary design work is not bad practice - it's the only way to solve problems that haven't already been solved by someone else. If there were books written on how to design and build interesting interactive robot toys, then sure, get the book and read it before you start (as you are doing). But in the end, hopefully, you will add some features to your robot that no one has added to any other robot (or never wrote a book or paper about) - and you come across these ideas by evolutionary exploring of the design space. Build, play, think, build play think, continue as long as possible.

Sensory data processing is one of the areas that most robots are extremely weak in. It's a very hard problem that no one has yet come up with a simple general answer to. If the sensor doesn't tell you want you want to know directly, most robots simply don't "know it". In general, it's a complex problem of statistical analysis that simply doesn't get built into most hobby robots. It's what keeps complex sensors like video cameras from being used more on small robots.

I assume you are talking about some type of heat sensor (IR?). It seems to me that might get confused with various heat sources as you suggest. But, it might turn out that the confusion makes it all that more interesting as the robot tries to play with the fireplace, or a heat vent. ("oh look, he likes the fire!"). And this is where the evolutionary design approach really works. Instead of worrying about how it might get "confused" just write some code taking your best guess as to what might produce interesting behavior and see what behaviors emerge. If one of the behaviors is to drive itself into a hot fireplace, then evolve the code to make it stop that. :) You could make it be attracted to a low heat source but run away from a high heat source for example - which could cause it to move towards and then away from the fire place until something more interesting grabs its attention.

I suggest that subsumption/reaction based approaches are most likely to produce the most life-like and in turn, the most interesting behaviors. And when interesting and entertaining is what you are shooting for instead something precise like "vacuum the entire floor without missing any spot", then you don't have to worry about the complex interaction of the different behaviors - the more they interact in unpredictable ways the more interesting it is likely to be. Robots that are predictable quickly become uninteresting.

Reply to
Curt Welch

Frank,

One thing you may want to consider is the low cost PIR sensors they sell (in Wal mart) for under $15. I forget the brand name, but I had disassembled a few of them a couple of years ago to build trailcameras, in order to photograph wildlife as it passed by the camera box. I found the plans, with schematics and details on jesseshuntingpage.com

I am not sure if the page is still there, but it's worth a try. I know of no other way to detect a moving warm body then this. Unless you buy the sensors (the wavelength that we give off is 10 microns, by the way), alone, and then buy a lens (fresnel of some type ) to detect just the 10 u radiation. I think they are called pyrosensors. Google is your friend there.

Anyway, hope this helps.

Joe

Reply to
Joe

Curt,

Thanks for jo> Frank McKenney wrote:

Agreed. I can't precisely define it. On the other hand, I think I need to have some kind of general idea of what I want to happen. I may well (as you point out) wind up going back and tweaking my specifications based on what I learn is possible.

Agreed. Fortunately, as van Dam's 'web site

formatting link
and Joseph Jones' (and others') books demonstrate, I don't have to choose between starting _completely_ from scratch and waiting for SomeoneElse(tm) to come up with a solution. There is a great deal of material to build on.

"Never give in. Never surrender!"

(Winston Churchill? Tim Allen? Someone along those lines )

The use of sensors is an incredibly wide-ranging topic. One of the "Holy Grails" of A.I. research has always been a Magic Box that would take a bunch of sensor inputs and Somehow Deliver The Right Answers: from Arbib and Papert to Neural Nets to The Kalman Filter to Subsumption.

Fortunately, I don't have to creat a GUTER (Grand Unified Theory of Everything Robotic) to build what I have in mind (That can probably wait 'til _next_ week. )

But it can be very difficult to "think like your robot". Even if you imagine yourself inside a sound-, vibration-, and light-proof box with a panel full of LEDs, dials, and switches, you also have to think at a "ground level" of perhaps 3" (where the world looks very different) and accept that you may never "know" just how many scars you've left on the wall or how many cats have gone scurrying out of your way. In fact, you won't even realize that you're lying upside down with your wheels spinning because you didn't detect the top of a stairway...

I complain about my poor eyesight, but things could be a _lot_ worse.

Could be. And, as you point out, I'll have to wire it up, program it, and see what happens (and then pick out th parts I like and keep them).

Hm. I don't think you intended that statement _quite_ as literally as I "heard" it; there's Chaos near one end of a spectrum, and Crystal-lattice Rigidity near the other. My experience has been that most of the things I find interesting are located near boundaries, or, in this case, something like "unpredictable interactions between predictable components".

Yup.

Thanks for the comments.

Frank McKenney, McKenney Associates Richmond, Virginia / (804) 320-4887 Munged E-mail: frank uscore mckenney ayut minds pring dawt cahm (y'all)

-- "A good traveller has no fixed plans and is not intent on arriving." -- Lao Tzu (570-490 BC)

Reply to
Frnak McKenney

Joe,

Thank you for resp>

--snip--

You can find a sensor (the RE200B), the lens, and complete modules for even less (URL snipped from my original post):

+> PIR Sensors/Modules/Detectors (search on PIR, Fresnel, RE200B) +>
formatting link
SKU#35050 $10.95 +>
formatting link
CAT#IRD-10 $3.95 +>
formatting link
BB054 $8.95 +>
formatting link
QK76 $12.95

I _think_ I have some of the BB054-style bubble-modules... er, "in a box somewhere", but if I can't find them that's what I'll probably try first. I need to work with them a bit to get a sense of how their output signal is affected my various stiluli so I can decide whether or not if they're what I'm looking for (or more likely, "the best I can do" ).

Looks like it's time to grab one of those nice Rubbermaid storage boxes and make a "grand sweep" of all my various Parts Repositories (scattered across three rooms and half a basement) to collect "stuff that might be useful".

Was this the thread (another URL snipped from my original post)? Or was there more stuff there that I missed?

+> Discussion thread on finding Fresnel lenses +>
formatting link
+> s=409bf6d58c94f4f6fc69200d19b42dde&showtopic=5048 I did run into a lot of other sensors when I was looking for non-contact temperature measurement devices, but the prices were a bit steep for my purposes (e.g. the Panasonic / Matsushita units I mentioned).

I do appreciate your contribution (and Dan's and Curt's). Given Earthlink's recent News Server problems (down fo a full week last month) it's also reassuring to know that my posts are getting out.

The "people sensor" question seems to recur periodically; Gordon McComb contributed to a round of it back in 2000. It seemed likely that if someone had found a really good approach I would have run into at least a reference to it in my 'web searches; on the other hand, it was a question worth asking.

Ah, well. Time to go do some RealWork(tm) so I can spend some time on "fun" stuff like this robot-to-be.

Thanks again.

Frank McKenney, McKenney Associates Richmond, Virginia / (804) 320-4887 Munged E-mail: frank uscore mckenney ayut minds pring dawt cahm (y'all)

-- You are not thinking. You are merely being logical. -- Neils Bohr to Albert Einstein

--

Reply to
Frnak McKenney

Yeah, I was even thinking that as I wrote it. Pure chaotic random movement would not be very interesting either.

For sure. Finding the right balance between predictable and unpredictable is where we seem to find things the most interesting. I believe I even remember reading a comment by a composer saying the same thing about music.

Reply to
Curt Welch

Heh. One of the first sensors I want to put on my bots (when I get that far -- which should be pretty soon!) is some sort of tilt sensor. A tip switch (or several such) could do in a pinch. Nothing makes a robot look all kinds of stupid more than spinning its wheels upside down.

The next thing I want on my bots is a way to tell when the wheels or feet aren't touching the ground at all. With feet this is pretty easy (just stick a force sensor or two to the sole). With a wheeled bot it's harder, unless you also have a suspension like the Roombas. But I feel it's important, because a bot continuing to spin its wheels when you pick it up looks only slightly less stupid than the one doing it upside-down.

Of course our robots are going to actually BE stupid... but they shouldn't APPEAR that way to a casual observer. (A lesson I learned from computer-game AI programming!)

Best,

- Joe

Reply to
Joe Strout

It's a general principle of psychology. In a nutshell, learning is fun, and most fun relates to learning in some way. Something that's completely predictable is no fun because you have nothing more to learn from it. Something that's completely random is no fun because there is nothing you CAN learn from it (though it may be fun at first until you realize this is the case). Fun things are those which you can continuously learn from.

Best,

- Joe

Reply to
Joe Strout

You might also be interested in taking a look at what Rod Brooks did on one of his first robots, Genghis.

formatting link
Subsumption based, and all of those round things on its nose are PIR sensors.

Reply to
dan michaels

If she's eleven, and not retarded, a toy car that chases her around the room will get really really boring Real Soon. :-)

What you do, is let her program whatever she wants into it; and get her today's equivalent of an Erector Set, and let her make her own accessories and stuff.

Good Luck! RIch

Reply to
Rich Grise

Frank,

Try this site for PIR sensor info:

formatting link
Joe

Reply to
Joe

I don't think that would ever bother one of my designs; none of them has ever had a Feel_Embarassed() behaavior.

Seriously, you might check out the Sharp GP1S36 Tilt Sensor; it's a $2 unit with a metal ball and two optical interruptors.

If you were monitoring motion with (say) a hacked optical mouse mounted in the underside of your robot it might be possible to detect being picked up. Or, if you have a ring of "cliff detectors", you can make a special case to handle all of them going off at the same time.

Yes, but the nice thing is that it takes so _little_ to convince a human being that you're behaving intelligently.

Frank McKenney, McKenney Associates Richmond, Virginia / (804) 320-4887 Munged E-mail: frank uscore mckenney ayut minds pring dawt cahm (y'all)

-- Writers listen for harmonies; civilians listen for melody alone. For them the facades of ordinary situations are opaque, and they see what is there to be seen. Writers are attracted to translucence. We start with nothing but an idea, an agitation, a compulsion, an irritation. That, plus a bumblebee's faith that it can fly. -- Hal Ackerman / Write Screenplays That Sell

--

Reply to
Frnak McKenney

Um... reminds me of Dave Gorfein's Behavioral Psychology classes. Let me think a minute.

While it's true that my robots work occasionally, it's also true that I learn much more when they don't work. Can I conclude, therefore, that my robots are _learning_ to malfunction in order to get more of my time and attention?

Aaaaauuugh! It's A Conspiracy! (but it does explain a _lot_!)

Frank McKenney, McKenney Associates Richmond, Virginia / (804) 320-4887 Munged E-mail: frank uscore mckenney ayut minds pring dawt cahm (y'all)

-- "Bother!" said Pooh, as the warp core went critical.

--

Reply to
Frnak McKenney

Only if it _always_ chases her. Point taken, though -- it needs to intermittently change behavior (e.g. run away, or play with someone else).

Let's see if this holds her interest long enough for us to talk about Something Robotic. I need to move rapidly, though: at eleven she'll soon be expecting to be chased by other things.

Frank McKenney, McKenney Associates Richmond, Virginia / (804) 320-4887 Munged E-mail: frank uscore mckenney ayut minds pring dawt cahm (y'all)

-- [T]he notion that capitalism is hostile to art is in itself absurd. In fact, capitalism or bourgeois patronage has often marked a great flowering of art: the Medicis, Venice, and Holland, or, to go further back, the great merchant republic of Athens. -- Robert Conquest, "The Dragons of Expectation"

--

Reply to
Frnak McKenney

--snip--

Joe,

Thanks for the pointer. The PDF file has a schematic, plus a description of how the PIR sensor and lens work.

In other good news, my missing three PIR modules turned up in a box in my basement (turns out that they're KitsRUs #76 units). Next step is to pull out my 'scope. hook one up, and see how it reacts to hand-waving in various directions.

And then... Major Surgery on the truck!

Frank McKenney, McKenney Associates Richmond, Virginia / (804) 320-4887 Munged E-mail: frank uscore mckenney ayut minds pring dawt cahm (y'all)

-- One of the demanding things about social life is that it fights back. While you figure out how to move from tree to tree, the tree just sits there, and while you figure out how to crack a nut, the nut waits patiently. But while you are figuring out how to deal with another monkey, it is figuring out how to deal with you, or a third monkey steps in to make the deal. -- Susan McCarthy / Becoming a Tiger

--

Reply to
Frnak McKenney

Dan,

Thanks for the po> You might also be interested in taking a look at what Rod Brooks did on

Very impressive animations, and fortunately small enough that mplayer on a 450MHz P-II can handle them.

Really? They looked like ultrasonic transducers, but the PDF file listed with the MOV animations doesn't say much at all about sensors of any kind.

Anyway, it looks like somethign that would be fun to build... once I get a DOD-funded research grant to pay for all those servos.

Frank McKenney, McKenney Associates Richmond, Virginia / (804) 320-4887 Munged E-mail: frank uscore mckenney ayut minds pring dawt cahm (y'all)

-- The joy of research must be found in doing, for every other harvest is uncertain. -- Theobald Smith

--

Reply to
Frnak McKenney

formatting link

try Hitec HS-322HD at $10/ea from several vendors.

Reply to
dan michaels

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.