In this lab you will learn how to use pyro to control a
physical robot: either an Aibo or a Khepera. The goal of
this lab is to give you hands-on experience dealing with issues that
arise when operating in the real world rather than in a simulation.
This lab will focus on direct control of the robots and need not
include any learning mechansims.
Aibos
-
Connect to the Aibo following these instructions. When you are done using the Aibo be sure to put it back on the recharging station. Unfortunately we only have one recharging station that must be shared by both Aibos. It typically takes several hours for the Aibo to recharge fully.
-
Read about the various sensors and affectors that are available on the
Aibo here.
Experiment with them at the command line of the pyrobot window.
-
Do an update81 and then
try executing the AiboTrackBall.py brain available in your
cs81/labs/2/ directory. This will cause the Aibo to move its
head to try to track a bright pink ball. If the ball moves beyond the
head's range of movement, the program causes the head to return to
center until the ball is in view again.
- Options for lab task:
- Use the AiboTrackBall.py brain as a starting point to
create a brain that will cause the robot to follow the pink ball with
both its head and its body. If the ball is relatively centered and
close, the robot will stop and watch it with its head. If the ball is
off center or distant the robot will move its body to attempt to get
it centered and close again. In the current brain, when the ball
isn't in view the robot just stops and waits. You may want to
consider adding a searching behavior that will try to find the ball if
it is not in view.
-
Your own idea; please run it by me before you begin.
Kheperas
-
Connect to the Khepera following these instructions.
NOTE: the power cable must be plugged into the Khepera interface
box. When you are done, always unplug the power cable.
- The basic Khepera has 7 infrared sensors (to measure distance to
obstacles) and 7 light sensors (to measure light intensity).
Read about range sensing, sensor units, sensor topology, and named
sensor groups here.
Then within pyrobot, query the range sensors under a variety
of different conditions to get a sense of how they could be used for
navigation control. A small light source is available on the desk.
Try plugging this in and viewing how the light sensors respond as
well.
-
Options for lab task:
-
Create a program that will search for and find a light source within the
environment.
-
Create a program that will wall follow its way through a maze.
-
Your own idea; please run it by me before you begin.