None Project_1_Description

Project 1

Challenge

Most of the time, an autonomous robot is equipped with advanced sensors, such as rotary encoders, GPS sensors, LiDAR sensors, cameras, or inertial measurement units to navigate as accurately and efficiently as possible.

However, no sensor is impervious to errors or failures.

In this project, you are working with Zumo robots implemented as semi-autonmous material handling vehicles in a facility that handles hazardous materials. The robot works on a floor that is below ground level, so in case of an emergency such as a fire, the robot must use a service elevator to return to the ground floor to escape the hazard and remove the hazardous material from the danger so it does not create additional risks. The service elevator in the factory was originally designed to hold up to four zumo robots packed 2x2, and is shown in the diagram below.

. .

In an emergency, the elevator will rise automatically as the open elevator shaft needs to be closed to seal off the ground floor from any smoke or fire below. The elevator is timed to provide the zumo just enough time to get on the platform, and it calculates this time based on how far away the factory's central control system reports that the zumo is from the elevator platform.

Your zumo is equiped with a material handing rack that carries the hazardous cargo. As long as the Zumo itself gets onto the elevator platform, the elevator will be able to lift the Zumo and the cargo to safety even if some of the cargo is "hanging off" the edge of the platform.

Under normal operation, the robot would use its line-following sensors, distance sensors, and wheel encoders to reach the elevator. However, it needs to be designed such that if some or most of the robot's navigational sensors fail during the emergency event, it can still escape! Therefore, the robot will need to be able to access an internal model where it useses its own dynamics to navigate without all of its sensors.

Luckily, your experience in system dynamics (ME352) and the material presented in the first two weeks of this course can be combined to develop this internal mode and allow the robot to operate in the emergency with catastrophic sensor failure.

Therefore, you will approach this project as if the robot has no closed loop control capability and instead use a well-calibrated dynamic model of the robot's behavior to allow it to use what it knows about the payload it is carrying and its own internal dynamics to reach the platform location in time to escape.

Note that if the zumo arrives too late or too early, it wll impact the gates and be prevented from getting on the platform. If the zumo misses the location of the elevator, it may fall of the edge as the elevator rises or the elavator will simply leave without it!

The zumo needs to arrive at the platform just after the gates open and be positioned so it is completely on the platform before they close in order for it to reach safety.

Problem Specifics

Your task for project 1 is to program your Zumo robot to go a given, user-selected distance in specified time without using any of its sensors.

When we say "without using any of its sensors," we mean: Your robot may not use the encoders to make decisions while it is moving to try to get on the platform. In the real sensor fault situation, the encoders wouldn't even be available for measurement. For this project they are operational, but you will not access them during normal operation.

However, Zumo's wheel encoders MAY be used to measure distance traveled and/or robot velocity the during the system model development and validation.

That's it. Just make the robot travel straight for a given distance (between 2 and 6 zumo lengths) given a certain time criterion.

Here are the fixed assumptions everyone will use and can't be changed by you:

  1. The robot should simply go in a straight line for project 1, which means you can assume that the robot is already facing the elevator when the run begins.
  2. By changing two parameteres in your code, you should be able to program your Zumo to go precisely the target distance within the target time, even if the Zumo is loaded with a payload of known mass of up to 2kg.
  3. Once your distance and added mass are set in code, uploading the Zumo code by itself shall not make the robot move. The robot will wait for user input.
  4. A press on the robot's "button C" will initiate motion, but The robot will not move for at least two seconds after button C on the robot is pressed. This press on button C is meant to simulate a "return to base" signal.
  5. Before the robot moves, it must sound an alarm for at least 1 second to alert any nearby people or robots of its intent to move.
  6. While the robot is moving, it must flash the user LED (yellow). The light must flash with a frequency of at least 2 Hz and no more than 10 Hz.
  7. When the robot is finished with a "run," representing a fault-condition return to the elevator platform, it will sound another alarm at a different pitch than the first, and wait for another "go" input from the user on button C.
  8. Your robot's accuracy in traveling the prescribed distance will be evaluated together with the time it takes to traverse that distance will be weighted equally in determining your performance score for the project.

Project 1 Deliverables

Your primary deliverable is a 1-2 page writeup detailing your design methodology and showcasing your design's performance. It should simply answer the question, how did you solve the problem? Include relevant diagrams, plot and tables. Code will be provided as an Appendix to your 1-2 page writeup. Equations can be part of the report's main body, but derivations would also be in the appendices. The 2 page report will be presented in a formal style. The appendices are understood to be supporting "notes" and do not need to be carefully formatted. Your audience is your supervisor who is "fluent in the art," but would expect to see evidence that you made decisions with justification and the writeup has sufficient detail to allows that person to quickly evaluate your design methodology. Be brief, but concise. More details of the report format will be provided later.

You will also need to demonstrate your working program in lab during the Week 8 (10/18-10/22) Laboratory Period. You'll do this by participating in a "competition" with the other members of your section. You won't be competing against each other, just trying to achieve the best performance you can. You'll be given a random distance, weight, and a target time range. Your robot will start exactly that distance away from the elevator platform, loaded with the new payload. Your score on the project will be partially based on a combination of your robot's ability to make it to the elevator platform and whether the robot makes it there before the elevator gates close.

You will be able to practice by using your workstation gate module to represent the gates of the elevator and you'll use a sensor to detect when your zumo starts moving. You'll learn how to use these modules in the first two labs.

Notes/Expectations

This project (and the other two to follow) are INDIVIDUAL assignments. You may exchange ideas with your classmates, but you may not exchange code. Your writing, code, plots, figures, and diagrams must be your own. You're expected to work on this project outside of class, and in order to avoid assignments "stacking" uncomfortably, you should start soon so that you run into big problems early and can get help. The project is designed to help you develop relevant questions about the course material, and to give you an opportunity to truly help you understand the concepts taught in this course by having you synthesize them in a new context.

Below, is some basic information about how to get started with your robot.

Appendix A: Introduction To the Zumo

The Zumo is a small, tracked robot made by Pololu, inc. The robot has two wheel encoders, three proximity sensors, an array of line-following sensors, a compass, a gyroscope, and an accelerometer. It uses an Arduino-like processor and can be programmed using the Arduino environment.

image-2.png

Many of you have used Arduino before, so we won't spend too much time on paper hashing out the very basics, especially since many of the basics will be covered in Labs 1 and 2. If you need help, there are tons of tutorials on the Arduino website for you to check out.

You need to follow the links below to use your Zumo on your personal computer (or a Lafayette Computer that is not fully equipped)

You will be using a library of functions written specifically for the zumo. Use the link below to get the documentation on installing and using the library:

Other relevant links you should keep handy:

Appendix B: Getting your computer set up for Zumo

Out[2]:

Appendix C: Your First Zumo Program

Out[3]:

IMPORTANT NOTE FOR PC USERS!: in the video, I'm using a Mac-- for whatever reason, if you're using the Zumo32U4 library on Windows, you can't just import the Zumo32U4.h library. You also have to import Wire.h. The modification to the code presented in the video above is simple. Here's an updated version for reference:

#include <Wire.h>
#include <Zumo32U4.h>

Zumo32U4Encoders encoders;
Zumo32U4ButtonA buttonA;

int countsLeft;
unsigned long millisec;
boolean buttonstate;

void setup() {
  Serial.begin(115200);
}

void loop() {
  millisec = millis();
  buttonstate = buttonA.isPressed();
  countsLeft = encoders.getCountsLeft();

  Serial.print(millisec);
  Serial.print("\t");
  Serial.print(buttonstate);
  Serial.print("\t");
  Serial.print(countsLeft);
  Serial.println();
}

Collecting Data from your Zumo and Plotting with MATLAB

Out[4]:
In [ ]: