Cornell University: ECE 4960/5960
Return to main page
Lab 8 Stunts!
Objective
The purpose of this lab is to combine everything you’ve done up till now, and especially labs 6 and 7 to do fast stunts. This is the reason you labored all those long hours in the lab carefully soldering up and mounting your components!
We will score for two categories: 1) controlled stunts (Task A, B, or C), and 2) open loop, repeatable stunts.
Parts Required
One fully assembled car, with a SparkFun RedBoard Artemis Nano, ToF sensors, and an IMU.
Lab Procedure
Controlled Stunts
All of these stunts must be performed on the tracks setup in the lab (or hallway outside of the lab). We have set up crash pads which should help prevent excessive damage when vehicles go rogue. We will need video evidence that your stunt works (or worked at least once); and graphs showing the sensor data, KF output, and motor values. Feel free to upload bloopers!
Task A: Don’t Hit the Wall!
Your robot must start at the designated line (<4m from the wall), drive fast forward, and upon reaching the sticky matt with a center located 0.5m from the wall, perform a flip, and drive back in the direction from which it came.
- Your stunt will be considered successful if you manage to do a flip. The score will depend on how quickly (if at all) you make it back past the initial starting line.
- Note that if you don’t feel comfortable tuning your PID controller from Lab 6 to work at high speeds, you are welcome to do a bang-bang control (i.e. simply drive fast at a fixed speed towards the wall, and flip when needed).
- The TOF sensors are not all calibrated equally well; manually tuning the distance to the wall for which your robot initiates the flip is fine.
- The Kalman Filter is what will help you estimate the distance to the wall, in spite of the slow sensor readings. When you have new sensor readings, run both the prediction and the update step. When you don’t have new sensor readings, run only the prediction step (i.e. compute your estimated distance based only on the motor inputs and your dynamics model). Remember to adjust your discrete A and B matrices to the new sample rate and your input to the new PWM values.
- If you never got the Kalman Filter working well, you can try doing this lab either by extrapolating TOF data forward, or simply guestimating a good distance value at which to estimate your turn.
Task B: Drift Much?
Your robot must start at the designated line (<4m from the wall), drive fast forward, and initiate a 180 degree turn with drift such that before it starts driving backward, it reaches a distance 0.6m from the wall (marked by a line on the floor).
- Your stunt will be considered successful if you manage to touch the line and make it back past the initial starting point. The score will depend on how quickly you make it back.
- The TOF sensors are not all calibrated equally well; manually tuning the distance to the wall for which your robot initiates the turn is fine.
- The Kalman Filter is what will help you estimate the distance to the wall, in spite of the slow sensor readings. When you have new sensor readings, run both the prediction and the update step. When you don’t have new sensor readings, run only the prediction step (i.e. update your estimated distance based only on the motor inputs and your dynamics model). Remember to adjust your discrete A and B matrices to the new sample rate and your input to the new PWM values.
- If you never got the Kalman Filter working well, you can try doing this lab either by extrapolating TOF data forward, or simply guestimating a good distance value at which to estimate your turn.
Task C: Thread the Needle!
Omitted since, sadly, noone took on this task.
Open Loop, Repeatable Stunts
Come up with your own exciting stunt! The only requirement is that you have video evidence for it being repeatable (3 times!) and that you share the control sequence on your page.
This will count for up to 3 out of 10 credits in the lab. Every student and TA in class will be given 10 votes to distribute among their peers, and credits will be assigned proportional to the number of votes you receive.
During the voting process, everyone will be given one extra vote to give to the best blooper video. The three highest scores will be given 1 extra credit!
Write-up
To demonstrate that you’ve successfully completed the lab, please upload a brief lab report (<800 words), with code snippets (not included in the word count), photos, graphs, and/or videos documenting that everything worked and what you did to make it happen.