CSCI 131 - Techniques in Programming, Spring 2014

    Home | | Schedule | | Assignments | | Lectures | | Resources

    Group Project Specifications
    The Dancing iRobot®

    Due Date: Monday, March 31, at the beginning of lab.

    Introduction. This project focuses on programming the iRobot® . The iRobot® Create is a durable, programmable robot with multiple built-in sensors.

    For this programming assignment, you will work with your partner(s) and possibly another team to program your iRobot® to dance. The dance (or alternative) has required elements, functions and statements. It is worthy to note that this assignment is less structured than the others in the course. In some ways, you have more freedom. On the other hand, it may appear more unclear for you to determine when you are done.

    Required Elements.
    Your project involves altering an existing iRobot® program so that your robot performs an original dance. This dance must either be exceptionally intricate and interesting or it must perform a synchronized dance with another robot, i.e. your team will pair up with another team to produce a dance. As in gymnastics, diving, and dancing with the stars, the judging of your elements are somewhat subjective.

    • An original song. (You don't need to write it, but it has to be one that you haven't already heard play on the iRobot® this semester or used in previous semesters.) List of previously used songs
    • The robot must perform a motion repetitively.
    • Your robot must "mirror" its partner robot. If it doesn't have a partner, it has do something special.
    • Your robot and its partner must do some move in a synchronized fashion. Ditto previous bullet, if you have no partner.
    • Your robot must drive straight, turn, and bump into at least one object (or other robot).
    • Your robot must make use of the LEDs.

    Alternatives to Dancing.
    As an alternative to synchronized dancing you may, with my permission, decide on one of the following two-robot projects.

    • Coordination: Get two robots to guide a tennis ball together.
    • Mind Reader: Get two robots to play the "number guessing game". One robot chooses a number and the other robot guesses until it selects the correct number.
    • A coordinated robot project of your own design.
    • An intricate robot project of your own design.

    One mistake students make on this project is to write code as a long series of simple commands: drive 1 foot, turn left, drive 2 feet, turn right, beep, drive backwards, turn left, ... on and on for a hundred lines or more. This does not show any technical sophistication. It does not show that you know how to program. And it is extremely boring to read. To help you avoid such mistakes, the following technical elements are required in your code:

    • Use loops in some meaningful way (e.g. for loops, while loops).
    • Use conditionals in some meaningful way (e.g. do different actions depending on the value of some button or sensor).
    • Make good use of functions to simplify and clarify your code.

    Note: The iRobot® has sensors to measure distance and angle, but are poorly calibrated e.g., as you learned in lab 4, turn(90) causes the iRobot® to turn more than a quarter-circle, and turn(360) causes it to turn less than a full-circle. As the Hokey Pokey demonstration illustrates, errors in positive and negative angles and distances do not cancel each other out either. These problems make accurate guidance and your programming more difficult.

    Program testing.

    The directory ~csci131/PROJECTS/PROJG contains, among other things, files named iRobot.c, iRobot.h iRobotCommands.h dance.c, Makefile, and hokey_v.c. (The hokey_v.c code is there for you to see our not quite right hokey pokey dance.) You should modify dance.c for this project. Not surprisingly, there is no test script for this project.

    To submit your finished project:

    1. Submit your program file electronically in the directory that contains your (presumably thoroughly tested) dance project. The project file, dance.c, must be submitted along with a collaboration log named, collaboration.txt. Submit the project using the command:

    ~csci131/bin/submit projectG

    2. Hand in a hard copy of the dance.c you submitted electronically. Hand this to your instructor in class on the project's due date.

    3. Hand in the names of the members of your group, your robot name as well as the names of the members of the group you "danced" with. Hand this to your instructor in class on the project's due date.

    4. Print out the grading header, put your name at the top of it, and hand it in with your hard copy.

    Get started early and have fun!

    Honor code: Please review the collaboration policy on the main course webpage. Also refer to the math and CS department honor code policy.


    Home | | Schedule | | Assignments | | Lectures | | Resources



    Computer Science 131
    Last Modified: March 7, 2014
    Page Expires: October 20, 2014