CSCI 458: Autonomous Mobile Robotics
Assignment 0: Getting Started
Your goals for the first assignment are:
- Robotics kit is itemized.
- Please let me know if there are any missing or duplicate pieces.
- First wheeled bot is assembled.
- Use the guidebook included in your kit as a template.
- New firmware is installed.
- You have designed a program that makes the robot drive forward for one second, then stop.
Assignment 1: Servos/Movement
Before you begin: Construct a mount for a whiteboard marker. Your robot should trace on the practice boards so that the quality of your movement can be appropriately evaluated.
After constructing the basic wheeled bot from the Mindstorms manual (servos only, no sensors) you will complete the following programs to get the hang of the most basic output--movement.
- Square - your robot should trace the path of a square that is 1 foot in diameter. It should start and end in both the same place and the same orientation.
- Circle - Your robot should trace the path of a circle that is 1 foot in diameter. It should start and end in the same location, and in the same orientation.
- S Shape - Using your circle program as a basis it should be trivial to use two half-circles to create an S-shaped curve. Your robot should start and end in the same orientation, and the two half-circles should be the same size.
- 5 Point Star - Your final demo should trace a 5-point star. Dimensions are up to you, but it should be big enough to make the star shape obvious. Again, try to start and end at the same location and orientation.
Assignment 2: Bumble Bot (a sense of touch)
My robotic vacuum is capable of (among other things) the minimal autonomous behavior of being able to explore and avoid obstacles (and getting hung up on them). More modern incarnations are capable of more sophisticated planning and navigation.
You should construct a robot using the available touch sensors. The robot should maneuver around the space it is in, and should react appropriately to touch input. That is, if it touches an object it should drive away from that object and continue on its way. You are expected to use all available touch sensors, and to define different behaviors based on what it is touch (e.g., run into an object on the right side vs. left vs. center). The details of your construction are up to you, but your robot should be given the ability to explore without getting hung up on obstacles, and should use its new sense of touch to do basic obstacle avoidance.
Your build should be capable of (at minimum) moving forward, registering when it runs directly into an object, and doing some sort of avoidance before continuing to move.
Note: You will most likely need to learn to be a bit creative w.r.t. debugging this semester given the somewhat limited hardware we are working with. You will find that the ROBOTC API has a function for emitting a noise (e.g., a beep) when something happens like receiving sensor data. Please don't overuse this for obvious reasons, but know that it can be a useful tool.
Assignment 3: More Bot Less Bumble
Augment your robot to include input from the ultrasonic sensor. You may have to tinker with placement to figure out an ideal height/angle. This assignment will consist of two parts:
Note: Again, you may experience some debugging headaches if you do not approach things from the correct direction. Before you start working on the actual code for the main project, you may wish to create a separate test executable for getting quick readouts from the ultrasonic sensors.
After adding the distance (ultrasonic) sensor write a demo program to measure the distance in front of the (stationary) bot. Your program should both measure the distance of the nearest object in front of the robot and display the distance (with units of measurement) on the built-in display. Please demo this portion of the assignment before moving on.
Augment your previous build to include both the ultrasonic sensors and the bump sensors. Your robot should continue to avoid obstacles as it did before, however this time use the ultrasonic sensors for primary obstacle avoidance. When it detects an object in its path it should attempt to both avoid collisions and continue to explore its surroundings. (Unlike the touch-only bot it shouldn't have to turn away quite as much.) Your robot should stop when it gets within approximately 8-9 cm (3-4 inches) from an obstacle.
You should continue to use the bump sensors to ensure that you don't get hung up (the ultrasonics have limitations), but your primary goal should be to avoid making contact with anything in the environment.
Because you will have a (most likely front-facing) distance sensor you may wish to rethink touch sensor placement for a better configuration.
Try to figure out how frequently you get readings, how accurate they appear to be, how they interact with motion, etc. Having an additional utility like this will also help you determine on the fly if something is going wrong with your sensor readings while you work.
You will find that the LCD Display API is quite extensive, and should give you everything you need to print debugging information from the ultrasonic input device.
Assignment 4: Boundary Bot
In this assignment we will be exploring the use of the light/color sensor. The goal of this assignment is simple: create a robot that respects a boundary. The robot will be set on a practice board on an unmarked region, and it should explore again (bumble) until it reaches a boundary delineated by a black marker. The region of exploration will be be entirely enclosed by the black marker, and may be irregular in shape.
This task will likely be best served by mounting the light/color sensor so that it faces downward. You may need to experiment to find a good distance from the ground.
As was the case in the previous assignments, it may be a good idea do develop a separate utility that just reads and displays current light/color readings for both debugging and calibration purposes.
Note: You may want to start exploration with the sensor's getColorRGB function. There are other methods for reading that you may require here or in the future, but this function will serve as a good jumping-off point.
Assignment 5: Garbage Collector
In this assignment we will be augmenting the hardware/software build from the previous assignment to perform a slightly modified task: clearing the region that the bot explores:
- Like the boundary bot you will be exploring a black-bounded region on the practice boards (color sensor).
- Your physical build should have some way of catching/pushing physical debris on the board.
- You should use a sensor or some combination of sensors to determine where debris exists, and to push it until it is past the boundary line.
- After clearing a piece off the board your robot should return to the bounded region, and should respect the boundary while exploring until objects are encountered again.
- Your robot should decide when the field is clear. I will not dictate how you will make this decision--this is a part of your own software design. When judging your performance I will be interested in hearing about how you make a decision regarding being finished.
When your robot is satisfied that the field is clear it should indicate this to the user with a sound and/or light display, and should cease execution.
Assignment 6: Line Follower
In this assignment we will repurpose the light/color sensor from the previous build (the other elements can be stripped off) for a modified task. Rather than remaining within the confines of a bounded region you will use the light/color sensor to track/follow a line.
For testing purposes You will be provided a map with a black line on a white background. Your robot should follow the line in a quick, accurate, and smooth (not jerky) manner.
Your demonstration will be judged based on the following dimensions:
Note: Your line-following routine will be reused in the next assignment. You may wish to have it stable before proceeding.
- accuracy of line tracking (avoid deviating from the course of the line),
- speed of line tracking (while tracking may result in slightly slower performance it should not cause an overall hindrance),
- smoothness of ride (not noticeably jerking back and forth as your robot glides).
Assignment 7: Hindsight is 20/20
After you have perfected your line following routine, your next task will be to have the robot recall the route of its journey after navigating a line-following routine. You have a number of available sources to track your original path for later reconstruction (power to servos, clock time in the machine, servo encoder readings).
In order to get full credit your robot should:
- Follow a line track until some predefined stopping point (you may define stopping criteria--seeing a different color on the whiteboards, receiving a button press, etc.)
- Your robot should handle arbitrary straight lines, curves, and angled turns.
- The robot should keep track of its journey as it is following the line.
- After stopping your robot should give you enough time to get it set up on another board to recall its journey (waiting until a button press may be a good way of accomplishing this).
- Your robot should trace the resulting journey on the second board and stop in the correct position relative to its original journey. For full credit your robot should be able to trace its journey using a marker so accuracy can be compared back to the original line. (The marker will either need to be placed for the second journey or should move itself into position via a servo.)
In this assignment I will be paying attention to accuracy of retracing the original path, with a secondary attention on smoothness of ride and speed.