Week 10 Lab
TASK #1
Get some of the basic components:
- Check which LED corresponds to each of the LEDs variables available
in URBI (for the list look at the pages on the ERS-7 from the manual
UrbiDoc-Aibo-1.4.pdf). The pages have been distributed in the
lab.
- Check how the values of the acceleration sensors change as you move
the AIBO
- Check for how long the AIBo should turn to turn by 90 degrees
TASK #2
Use the results from Task #1 to write a program to
- set the lower left LED when the left front paw pad is depressed
- set the upper left LED when the left rear paw pad is depressed
- set the lower right LED when the right front paw pad is depressed
- set the upper right LED when the right rear paw pad is depressed
- set the middle right LED when the robot is off the ground and tilted
to the right
- set the middle left LED when the robot is off the ground and tilted
to the left
TASK #3
To measure the accuracy of AIBO movements, write a program to:
- move to a sitting position
- when the top of head sensor is pressed, walk forward in a straight
line at 1/2 max velocity for 20 seconds
- turn right 90 degrees
- walk again straight at 1/2 max velocity for 20 seconds
- turn right 90 degrees
- repeat this until the dog completes a square. Measure the amount
of error (distance between initial position and final position reached)
Short Tutorial on URBI
TIME OPERATORS
A; B |
B starts after A is finished (not necessarily immediately) |
A, B |
B starts after A starts (so, B can start before A is finished) |
A & B |
A and B starts exactly at the same time |
A | B |
B starts immediately after A is finished |
URBI PREDEFINED FUNCTIONS FOR MOTIONS
Functions:
robot.walk(duration) | walk for duration milliseconds.
Walk backward if duration is negative |
robot.stopwalk() | interrupt the walk |
robot.turn(duration) | turn couterclockwise for duration
milliseconds.
Turn clockwise if duration is negative |
robot.stopturn() | interrupt the turn |
robot.initial() | initial position sitting down (strech and lay) |
robot.stretch() | stretching like in the morning... |
robot.lay() | laying (sitting down) |
robot.sit() | sit on the back |
robot.beg() | stand up with knees bent |
robot.stand() | stand up |
Variables:
robot.walkspeed | speed of walk, the smaller the faster:
period of a step. Defaults to 1s |
robot.turnspeed | speed of turn, the smaller the faster:
period of a step. Defaults to 1s |
You can assign variables values by using an assignment, such as
robot.walkspeed = 750 // milliseconds. The smaller the faster.