• Aucun résultat trouvé

Introduction to the Polly system

2.3 Detailed example

The robot always begins near my desk, facing south (see gure 2.4). It leaves the oce by performing a xed set of steps specied by a sequencer. First it drives south until it is blocked by an obstacle. This leaves it near the le cabinet labeled (1) in gure 2.4. It then turns left and drives until it no longer sees a wall on the left, bringing it out the oce door (point 2 in the gure). It then moves forward a few feet, turns left again, and drives until it is blocked and facing east, at which point it should be facing the right-hand wall (point 3 in the gure). It then turns right 120 degrees so as to face the pillar and couch, and moves forward. The robot's obstacle avoidance mechanisms are sucient to move it into the channel between the couch and the wall and o into the corridor (see point 4 in the gure). At this point, Polly's normal navigation systems are activated. The robot's position is initialized to \Ian's oce" and the wanderer sets the goal landmark to be the vision lab (see gure 10.1).

2.3.1 Patrolling

The robot now begins patrolling. It is in the corridor between \Ian's oce" and

\Elevator lobby" in gure 10.1, traveling west. The HLN determines that it is east of its goal, the vision lab, and so allows the LLN to continue to move west. When the robot reaches the elevator lobby, the wall on the right-hand side suddenly vanishes from view, indicating that the robot has reached a right turn. The robot checks its map for a right turn and determines that it is at the elevator lobby. The entry in the map for the elevator lobby says that the robot should veer to the right to remain in the corridor, so the HLN instructs the LLN to make a small right turn. The LLN does so and continues across the open space of the elevator lobby until it reaches the other side. There, the LLN realigns with the corridor and continues west. As the robot drives past the leftmost corridor in gure 10.1 (the corridor between the vision lab and the kitchen), the left-hand wall vanishes from view and the vision system signals the presence of a left turn. The HLN nds the turn in its map and updates its position.

When the robot reaches the vision lab, it detects another left turn and the HLN updates its position again. Now several things happen. First, the HLN notices that it has reached its goal. Then the wanderer notices that it has reached the vision lab

27

Desk

Couch

File cabinet

Starting position

1

2

4

3

Figure 2.4: The robot's path as it leaves the oce and enters the corridor. Both path and oor plan are only schematic|neither is drawn to scale.

28

N

Figure 2.5: Polly's habitat, the 7th oor of the MIT AI laboratory. The diagram is not to scale, and the direction north has been dened for convenience, rather than geological accuracy.

and sets the goal to be the southern corner of the playroom. This, in turn, causes the HLN to wake up. The HLN determines that the goal is to the southeast. Since it is at a turn to the south, it instructs the LLN to turn 90 degrees to the left. The LLN turns left, and begins to align with the new (southern) corridor, as if nothing had happened, and proceeds along the corridor. When the robot reaches the southern wall (near the T.V. lounge in the gure), several things happen again. The LLN can no longer move any further and so it stops. The HLN notices that it has reached the southern wall, and so updates its position again. Since the goal is now east instead of southeast, the HLN tells the LLN to turn left again. The LLN turns, follows the wall through the T.V. lounge, and proceeds on its way. The robot continues, the HLN updating its position with the appearance of each left hand turn, until the robot reaches the playroom. Then the wanderer sets the goal back to the vision lab, the HLN tells the LLN to turn north, and the cycle repeats.

2.3.2 Giving tours

The robot continues to patrol until it encounters a person in the hallway. When this happens, a sequencer (offer-tour) is started. The sequencer inhibits the LLN and HLN and halts the robot. It then says \Hello, I am Polly. Would you like a tour? If so, wave your foot around." It then looks to see if there is any motion in the image. If not, it says \OK, have a nice day," and dis-inhibits the LLN and HLN. If there is motion, then it says \please stand to one side," and waits until it is no longer blocked. Then it says \OK, follow me," and starts a new sequencer,give-tour. Give-tourrecords the current position of the robot, and sets the robot's global mode to give-tour mode, which enables the tour-chatterand tour-announce-place processes. Give-tour waits for the robot to return to that position. In the mean time, the wanderer, HLN,

29

and LLN continue as if nothing had happened. Each time the HLN recognizes a new place, tour-announce-place wakes up and gives the speech listed in the map for that place. This leaves long periods of boring silence while the robot drives from one place to another, so thetour-chatterprocess inserts chatter messages in the pauses, roughly every 15 seconds. Eventually, the robot returns to the place it started from.

Then give-tour wakes up, says \That's the end of the tour. Thank you and have a nice day," sets the global mode to \patrol" (which disablestour-announce-place

andtour-chatter), and turns itself o. The robot then continues on its way, looking for a new visitor.