|
Note: This is an
group assignment. The work is shared among the group members and each
member is responsible for all of the work. For example, if
there is plagiarism is found in the assignment, every member
is responsible. The group is expected to do it's own work, and must
properly cite any and all work taken from external sources. Each member is responsible to carry their own portion of the workload. To this end, there is a peer assessment process where each member must assess each other member's contribution. Individual marks may differ based on the peer assessment, the instructor's assessment, and other factors. |
Another note: You will need to download the CASA project and the iRobotCreate project to this assignment. For details, see the getting CASA and the iRobot code page. |
Implement a CASA agent that measures one wall of a room. The wall that is to be measured has a "virtual wall" device pointed at it. Your robot will start in a random, unknown location in the room and must find the appropriate wall, measure it, then play a short victory song while displaying the wall measurement on your agent's console ("command" tab). Your robot agent should communicate with the robot-proxy class, iRobotCreate, and should make use of
iRobot.execute
lisp function in iRobotCreate.The basic requirements are:
At startup, the robot should just acknowledge it's ready by flashing lights, playing a short song, or something appropriate of your choice.
The agent should accept the following run-time commands:
You may implement other commands as appropriate.
The length of the wall is to be reported in meters to the nearest centimeter. If a report is requested before the completion of the task, any unmeasured variables are to be reported as "unknown", but all measured variables should be reported. Be sure to account for the size of the robot when measuring the wall.
When the agent has completed the task, the robot should acknowledge by playing a victory song and power down.
Your agent will be limited to 10 minutes to complete the task from the time of the robot's startup acknowledgement. If the agent has not completed the task in the allotted time, the robot should signal this by playing a pathetic song, and displaying a red power light. The robot may continue on the task, however.
You must account for recovering from bumping into walls or other obstructions in your search for the correct wall. However, it is guaranteed that no obstacle will be within 2 robot diameters of the wall to be measured.
You can detect the virtual wall using register 13, "Virtual Wall", which will have values 0 or 1. You can detect a wall using the bump sensors (register 7, "BumpsAndWheelDrops") or using the wall detector (register 8 "Wall" [0 or 1], or register 27 "WallSignal" [0-4095]). In the unlikely event you are backing up, you may detect a wall by an overcurrent (register 14 "Overcurrents").
The State pattern is highly recommended to implement your controller.
You can down load the basic iRobot software, just like CASA download, at the iRobotCreate download site.
To get your initial strategies right, you can use the robot simulator, which is provided in the iRobotCreate project. You the simulator is embodied in the iRobotCreate.simulator.Environment agent, which you can run just like any other agent. To make a robot agent (any subclass of iRobotCreate.iRobotCreate), you create the agent by setting the key parameters :outstream and :instream to different file names. (You connect an iRobotCreate agent to a real robot by setting both the key parameters :outstream and :instream to the file that represents the bluetooth serial I/O channel for that robot.) An example Lisp file (that starts up an Environment agent, populates it with object consistent with this assignment, and adds a iRobotCreate agent into the simulation) is given below (Figure 2). This yields a simulated environment as shown in Figure 3. The iRobotCreate agent started up here is CreateBounce agent that just inherits from iRobotCreate, but has a mind of it's own to move about. For the assignment, you should use a simple iRobotCreate agent, and control it using your own subclass of iRobotCreate.Controller.
(let* ( |
Last updated 2015-02-03 18:58 |