CS81 Spring 2006
Lab 1: Learning Python and Pyro

For this lab you will familiarize yourself with the Python programming language and the Pyro tool for programming robots which uses Python. If you have used Pyro before, then you should explore some of the new features that have been added since last semester (as described below).

Exploring the new features of Pyro

The Pyrobot simulator has been substantially enhanced. In addition to sonar devices, robots in this simulator can now have grippers and cameras. Start pyrobot and select the server PyrobotSimulator with the world CamWorld.py. Next select the robot PyrobotRobot60000.py. Finally select the brain Joystick.py and press "Run".

Notice that the devices section of the window now has a set of pull-down options. Select camera[0] and then press "View". Using the joystick rotate the robot left and right and watch how the camera image changes. From the devices secion, now select gripper[0] and then press "View". The upper section of this window shows the gripper commands while the lower section shows the status variables associated with the gripper. Use the joystick to move the robot so that one of the pucks is between the gripper's arms. Then press ".close()" and ".store()" to pick it up and store it in the robot. Try moving to another section of the world and then press ".deploy()" to release the stored puck. What happens if you run into a puck while moving forward? What happens if you try to turn over a puck that is to the side of the robot?


There is nothing to turn in for this lab.