Using the Sony AIBO Robot
This module describes how to use the Sony AIBO robot dog in Pyro.
Connecting to the AIBO
To use the AIBO, first load your Tekkotsu memstick into the AIBO's memstick slot. (See "Setting up Your Memstick" below if you haven't already done this.) Then turn the dog on; you will hear a beep, then a growling noise. This means that the robot is ready.
Running robot brains on the AIBOs
The details of how to do this depend on the site:
Know your Aibo
The ERS-7 comes with all of the following:
-
576 MHz MIPS R7000
-
64 MB RAM
-
802.11b wireless ethernet (standard)
-
Memory Stick reader/writer (in dog)
-
18 PID joints, each with force sensing
-
4 legs
-
3 joints each (elevate, rotate, knee)
-
1 paw button each
-
3 joints on neck (tilt, pan, nod)
-
2 joints on tail (tilt, pan)
-
1 joint on mouth
-
2 ears, 1 boolean joint each (flick up or down)
-
26 independent LEDs
-
Video camera
-
56.9° wide and 45.2° high
-
Resolutions: 208 x 160, 104 x 80, 52 x 40
-
30 frames per second
-
Stereo microphones
-
3 IR distance sensors
-
X, Y, and Z accelerometers
-
4 pressure sensitive buttons (one on head, three on back)
-
1 boolean button under mouth
-
Sensor updates every 32 ms, with 4 samples per update.
Nearly all of these features are fully integrated into the Python Robotics system. At the moment, however, both ear movement and sound detection using the microphones remain unimplemented.
AIBO Movement Control
The AIBO can be moved using the standard forward/backward and rotate interfaces (ie, robot.move()). There is also an additional control: robot.strafe(amount). Strafing is a side-to-side movement.
Three different types of walks can be imported using the command robot.setWalk(file), where file can be one of the following: PACE.PRM, TIGER.PRM, WALK.PRM.
Individual Joint Control
The AIBO has a number of joints to be manipulated. The values of the joint positions are normalized to a range from -1.0 to 1.0, or in some cases 0.0 to 1.0. This table lists the joint names, ranges, and some useful values to know.
| joint | range | significant values | ||
| mouth | 0.0 : 1.0 | 0.0 is closed, 1.0 is open | ||
| tail pan | -1.0 : 1.0 | |||
| tail tilt | -1.0 : 1.0 | |||
| front rotator | -1.0 : 1.0 | 0.0 pointing down, 1.0 max forward, -1.0 max backward | ||
| back rotator | -1.0 : 1.0 | 0.0 pointing down, 1.0 max backward, -1.0 max forward | ||
| elevator | -1.0 : 1.0 | 0.0 straight down, 1.0 max away from body, -1.0 close to the body | ||
| front knee | -1.0 : 1.0 | 0.0 straight, 1.0 max bent, -1.0 max extended | ||
| back knee | -1.0 : 1.0 | 0.0 straight, 1.0 max bent, -1.0 max extended | ||
To get the value of a joint, use getJoint(jointName), where jointName is one of the following:
-
leg [front | back] [left | right] [rotator | elevator | knee]
-
head [tilt | pan | roll | nod]
-
tail [tilt | pan]
-
mouth
Examples:
robot.getJoint("leg front left rotator")
robot.getJoint("head roll")
robot.getJoint("mouth")
robot.getJoint("tail tilt")
To set the position of a joint use setPose(jointName, amount). amount is a floating-point value between -1.0 and 1.0 (see table above). jointName is any of the possiblities from getJoint(). For example:
robot.setPose("leg front right elevator", -0.4)
robot.setPose("mouth", 0.35)
Alternatively, you can leave off the [elevator | rotator | knee] component of the leg joints and specify all three values at once. Similarly, you can specify both the pan and tilt of the tail with one command.
-
leg [front | back] [left | right], amountRotator, amountElvevator, amountKnee
-
tail, amountPan, amountTilt
Like this:
robot.setPose("leg back left", 0.0, -0.2, 0.6)
robot.setPose("tail", 1.0, 0.5)
AIBO Sounds
You can make the AIBO speak like this:
robot.playSound("filename")
Here are some of the available sound file names: 3BARKS.WAV, 3YIPS.WAV, BARKHIGH.WAV, BARKLOW.WAV, BARKMED.WAV BARKREAL.WAV, CAMERA.WAV, CATCRY.WAV, CATYOWL.WAV, CRASH.WAV CUTEY.WAV, DONKEY.WAV, FART.WAV, GLASS.WAV, GROWL.WAV GROWL2.WAV, GRRR.WAV, HOWL.WAV, MEW.WAV, PING.WAV, ROAR.WAV SKID.WAV, SNIFF.WAV, TICK.WAV, TOC.WAV, WHIIP.WAV, WHIMPER.WAV WHOOP.WAV, YAP.WAV, YIPPER.WAV
AIBO Sensors & Buttons
You can read the values of the AIBO's sensors and buttons in a similar way.
To get the value of a particular sensor use getSensor(sensorName) where sensorName can be any of the following:
-
ir [near | far | chest]
-
accel [front-back | right-left | up-down]
-
power [remaining | thermo | capacity | voltage | current]
robot.getSensor("ir near")
robot.getSensor("accel right-left")
This table explains the values returned by the sensors.
| sensor | unit | range of values | |
| ir near | mm | 50-500 | |
| ir far | mm | 200-1500 | |
| ir chest | mm | 100-900 | |
| accel (all) | positive-negative values | ||
| power remaining | % of power remaining | 0.0-1.0 | |
| power thermo | deg. celcius | ||
| power capacity | milli-amp hours | ||
| power voltage | volts | ||
| power current | negative milli-amp hours | ||
To read the raw value of a button use getButton(buttonName) where buttonName is one of:
-
paw [front | back] [left | right] : returns whether it's on or off
-
chin : pressure
-
head : pressure
-
body [front | middle | rear] : returns the amount of pressure being applied
-
wireless
robot.getButton("paw front left")
robot.getButton("chin")
robot.getButton("body middle")
Head Movement/Using the AiboCamera
To make use of the AIBO's head camera, typerobot.startDevice("AiboCamera")
at the pyrobot command line. A window will pop up displaying the real-time image taken from the AIBO's camera. The AIBO Camera is fully integrated with Pyro's vision system, so you can filter, blobify, etc. The robot's head is implemented as a standard pan/tilt/zoom device, but the zoom parameter is ignored. An additonal parameter, roll, controls the angle of the head relative to the neck.
robot.ptz[0].pan(0.3) robot.ptz[0].roll(1.0)
The ranges of the pan/tilt/roll parameters are:
| param | range | significant values |
| pan | -1.0 : 1.0 | 0.0 centered, 1.0 max left, -1.0 max right |
| tilt | -1.0 : 0.0 | 0.0 highest, -1.0 lowest |
| roll | 0.0 : 1.0 | 0.0 lowest (straight ahead), 1.0 highest (about 45 degrees up) |
Some AIBO Brains
TrackBall.py will follow a blob. See the vision module for more information.
AiboFindBall.py will attempt to kick a ball into a goal.
Requirements
Hardware:
-
Aibo (ERS-7 comes with wireless)
-
Wireless access point
-
Sony memstick (16MB will do)
-
Memstick reader/writer
-
Linux host computer
Software:
-
Python
-
Pyro (at least version 3.5.0) - build with Vision system, and Aibo camera
-
Tekkotsu 2.4 Memstick
Setting up Your Memstick
Pyro uses the
Tekkotsu Monitoring system, version 2.4, to control the AIBO robot over the wireless. Don't use the 3.0 version until we update.
-
Make sure that the AIBO is charged, and the wireless is configured properly.
-
Download Tekkotsu Monitor and Tekkotsu Memstick software (with our patches).
-
Copy the Memstick software onto a blank pink AIBO memstick (16MB will do). There will be three directories on the memstick when you are done: config, data, and open-r.
-
Edit the wlanconf.txt file on the memstick:
/memstick/open-r/system/conf/wlanconf.txt
It might look something like:
HOSTNAME=aibo ETHER_IP=109.23.34.76 ETHER_NETMASK=255.255.255.0 IP_GATEWAY=109.23.34.1 ESSID=SomeKeyWord WEPENABLE=0 WEPKEY=AIBO2 APMODE=1 CHANNEL=6 DNS_SERVER_1=109.23.1.6 DNS_DEFDNAME=college.edu USE_DHCP=0
If you have any spaces in your ESSID, don't put any kind of quote marks around it. For example, if your ESSID was Clever DogWireless, the line would be:
ESSID=Clever DogWireless
Also, don't forget to put 0x in front of your WEPKEY if it is in hexidecimal.
-
Edit your MEMSTICK/config/tekkotsu.cfg and change all of the lines that have "rawcam" and "udp" on them so that they refer to "tcp" rather than "udp". For example, change:
rawcam_transport=udp to rawcam_transport=tcp
-
Boot the Aibo on this new memstick. You should hear a growl after a few seconds. You should also be able to ping it (if you don't block ping data in your firewall). You will also need to have access to the following ports: 10011, 10012, 10020, 10031, 10032, 10050, 10051, 10053, and 10061.
-
Run Pyro version 3.5.0 or greater.
Bryn Mawr student Ioana Butoi did the work to get the AIBO interface running. For further informationb please visit:
Next: Using the IntelliBrain-Bot Up: PyroHardware
