|
|
Status
Report 1/1/01
Created 01/01/01
What is Working
I didn't have a robot when I started working on this website, so much of
my early writing was speculative and "blue sky" at best. I thought everything
I wanted to do was possible, but I didn't know for sure. I've spent the last several
months testing and experimenting and I'm happy to report that I've pretty much proved that
it all can be done. Now I just need to do it, and get it all working together.
Here's a short list of what I've definitely got "working":
- Cybert can navigate from any room in the house to any other room in the house
(same floor, of course).
- Cybert can navigate to his charger from any room in the house. Once he
finds the charger he can dock with it and recharge automatically.
- Cybert can detect objects that are in front of him. (The IR beam is very
narrow so only items in the middle of his "view" can be detected.)
- My VB program can "reset" the communications port when my PC loses
contact with the robot. (Our house is electronically "noisy" and modern
serial ports tend to lockup after awhile. Manually clicking on the "reset"
button on the CyeServ window usually restores the connection -- so I hope this will work!)
- Cybert can "say"anything using sophisticated text-to-speech. The
quality of the voice is quite good!
- My VB program can create textfiles of the latest weather, news headlines, stock
prices from our portfolio, jokes, incoming e-mail, and more. Cybert can then read
these text files out loud.
- My program can change the volume, tempo, and pitch of Cybert's voice to
correspond with his "mood". Every statement the robot makes is
automatically indexed by the mood variable. The "Speak(statement)" routine
will even pick randomly if multiple comments are available.
- Cybert can measure and record light and sound readings.
- Using the light meter and the IR sensor, Cybert can detect if objects are moving
nearby. (Probably indicating a human or pet.) In other words, I have a virtual
"motion detector".
Map-N-Zap Communications Problem Solved!
The Map-N-Zap software that comes with every Cye robot not only provides powerful
navigation capabilities, it lets users create custom "scripts" (called ZAP
files) that tell Cye to perform a variety of tasks. For example: the
"home.zap" script tells Cye to navigate from his current location to his home
base.
I had originally planned to have my VB program "shell" to these ZAP
scripts when I needed the robot to go somewhere, thus it wouldn't be necessary for me
to figure out the complicated job of navigation. Unfortunately, Map-N-Zap couldn't
recognize that my program had already established a connection to the robot, so it
wouldn't run. I finally came up with a workaround for this problem: before I shell
to the ZAP script I turn off VB communications with the robot (by setting Cye.RobotAddress
to "0"). After a short delay I re-establish the link. This works
great! (Probotics is apparently planning to release a new version of the .OCX that
will provide better integration with Map-N-Zap. This should allow me to navigate and
perform other tasks without having to bring up the MZ software.)
The only real problem with my current approach is that my program has to load MZ
every time I want the robot to go anywhere. It takes four or five seconds before
Cybert starts moving once he has decided to go somewhere. (MZ has to load, establish
a link to the robot, call up the ZAP script, execute the script, etc.)
Object Detection Problem Solved!
Using MZ for navigation has greatly simplified my code. Unfortunately, since
Cye robots don't have range-finding sensors, MZ doesn't "look for obstacles".
However, since VB and MZ can run simultaneously I've written code that makes my VB
program monitor the IR sensor for nearby objects while MZ is navigating. If
something is detected, I can tell Cybert to "stop" and this interrupts whatever
ZAP script is running. The next step is for me to write a VB routine that does the
following:
Scan left and right, looking for obstacles. Plan and execute a short
route around the obstacle based on the scans, then re-run the previous ZAP script.
(MZ will plan a new course based on Cybert's updated position.)
If Cybert can't find a way around the obstacle, I could use his x and y
coordinates to look for the nearest checkpoint (if it's on the same side of the obstacle
he is) and call a ZAP script to make the robot navigate back to this checkpoint and
recalibrate his position.
One small problem was introduced with all of this: when navigating from point A
to point B, MZ automatically "checkpoints" along the way. (This consists
of bumping a wall or corner at a pre-determined position so the robot can compare where he
thinks he is, versus where he actually is.) But guess what happens... as soon as
Cybert gets close to the wall to check in, the IR sensor detects an object and shuts down
the ZAP script! The current version of the .OCX doesn't allow my VB program to
monitor whether the robot is checkpointing or not, but I can monitor the robot's
x position, y position, and heading. It should be fairly easy to ignore the IR
readings when the robot is facing, and within X inches, of a checkpoint.
Alternately, I could create different .MAP files that don't include some or all
of the checkpoints. (So Cybert wouldn't be able to checkpoint at all.) But
this wouldn't be desirable as the robot would get lost more easily.
To-Do List
Here's a partial list of the things that I still need to implement:
| The back of Cybert's head is still missing, exposing wires that I'm
afraid our puppies might decide to chew on one of these days. I haven't decided the
best way to fix this problem, but I've thought about cutting a hamster ball in half and
gluing the "hatch" side to the back of the robot. (Then I could just open
the door when I need access to the radio or other head internals.) |

|
- The light sensor needs to be mounted. It was originally behind one of the
"eyes" but this didn't work well. I may drill a hole in the forehead and
glue the sensor there. (It needs to be out of the head and facing forward.)
- The head needs to be mounted to the body. I'm currently using tacky glue to
hold it on... I obviously need something better. I've thought about gluing a plastic
or wood base to the bottom of the head, and then attaching a PVC pipe to it. That
way I could just slide the pipe into the hole on the top of the robot (where Probotics
attaches the wagon). I don't want a permanent attachment, so I can't use glue or
screws. If the pipe idea works it will literally take 10 seconds to convert Cybert
from a robot pet to Cye, the vacuum cleaner!
- Create .ZAP scripts for all the MZ hotspots I've created. (And to anywhere
else I might want Cybert to navigate.)
- Write code to make Cybert look for obstacles when he's navigating. It will
need to "ignore" checkpointing by comparing the robot's x and y coordinates with
a table of checkpoint x and y coordinates. (I might have to use "heading",
as well.)
- Write code to make the robot find his way around detected objects. (And
stay away from the stairs!!!)
- Write and implement mood-based comments so Cybert can talk about what he's doing
and react to his environment. (When he bumps something, for example, he should
randomly make a comment.)
- Write behavior code to make Cybert: wake us up at a pre-determined time, tell us
the news, weather, and stock reports, play games, explore, look for people, sing songs,
alert us when we have new e-mail, and more.
- Create a behavior control program that integrates sensor data, Cybert's mood, and
other variables with his various behaviors. The program should make it easy to
"drop in" new comments and behaviors. (And I hope to be able to "drop
in" the new .OCX when Probotics releases it.)
- Get Cybert set up to work downstairs. I could create a separate map for
that area and my VB program could select it via a checkbox, or perhaps even automatically
based on the time of day. (After 9:00am and before 7:00pm he assumes he is
downstairs.) We have a lot of hardwood floors downstairs so I may have to put down
some floor mats and "runners". My wife has already agreed to this!!!
|