Robot Control

Back to Tutorials.

Tutorial Two: Running the Robot

A plan, in general terms, is a sequence of actions that an agent must carry out to accomplish certain goals. In this applet, there is only one kind of action: movement. Plans, therefore, consist of a list of locations that the robot must visit in sequence. Whenever you create a new location, it is automatically added to the end of the plan. A robot cannot be run without a plan, as it requires instructions in order to do anything. Also, the plan cannot be modified while the robot is executing it. If the robot is running, it will have to be reset before altering the plan. To view or modify the plan you have, click the 'View/Modify Plan' button. Below is the "Planner" dialog which will appear. The plan shown is the initial plan for the map from Tutorial 1.


You can add locations to the end of the plan by selecting them on the left hand side and clicking the 'Add' button. Also, you can remove locations from the plan by selecting them on the right hand side and clicking the 'Remove' button. When you are done modifying the plan, click the 'Update' button.

Once the plan is finalized, you can start running the robot by clicking the 'Run Robot' on the toolbar above the main white canvas.


The robot will run for a specified number of time intervals (the default is 300)and then stop. To stop it before it reaches the time limit, click the 'Stop Robot' button. You can also single step the robot by clicking the 'Step Robot' button. If at any point, you would like the robot to start trying to execute its plan from the beginning, click the 'Reset Robot' button. It will have to be stationary when you do so. You can then move it to the desired starting location, by selecting and dragging the robot, and run it again. Finally, if the trace showing where the robot has been makes the screen too messy, the 'Clear Trace' button will clear the path. Resetting it will also clear the trace.

The robot will execute its plan, by attempting to visit the locations in its plan in sequence and avoid hitting walls. It is, however, possible for the robot to crash into a wall as it is trying to get to a location. If this happens, a dialog like the one below will appear and the robot will stop running.


As the robot runs or steps through the plan, the Middle and High Level Controller Logs below the main canvas will log the signals and states of the controllers as they communicate with one another and as time passes. You can scroll through these logs to view how the robot decided where to move. Reseting the robot will clear the controller logs. The controllers are discussed in more detail in Tutorial 3.


Valid HTML 4.0 Transitional