Lab 8: Stunts!

April 12th, 2023
work-single-image

INTRODUCTION

All the previous labs have been leading up to this stunt. My car will drive quickly at a wall and drift just before hitting, then drive away. The speed is the key complication and is what made the task so difficult. That being said, this stunt is very similar to the one I posted for lab 6, simply due to the lab task found here.

CATCH MY DRIFT?

In order to run the robot really quickly at the wall, I implemented the following routine. I also added an additional condition to my Kalman Filter. The Kalman filter now only updates its value using the sensor reading when there's a new reading available, not every step. This will allow the Kalman filter to use its model to predict future Time of Flight values rather than being influenced by past sensor readings.

After those small tweaks to my implementation of lab 6 I was able to run the routine in about 3 seconds.

MISHAPS

Although, this routine seemed simple at first, I ran into a lot of small problems that hindered my progress quite a bit. For one, my taped tires couldn't get enough friction to turn effectively. I started doing this trick on tile flooring and had a lot of issues getting the car to avoid running itself into the wall. Below are a few of my personal favorite crashes that helped me learn my lesson.

Fun fact: There were lots and lots of these near misses where the car just barely touched the wall and around 50 different failed video attempts of all kinds.

Another issue was the repeated impacts that my time of flight sensor sustained. After a couple crashes I'd get meaningless crashes where the TOF would only read "0," leading to some ridiculous behavior. The solution was to ensure that my sensor was plugged in all the way after every crash, and before each run I had to ensure the sensor was pointed at a high enough angle that it wouldn't be trying to sense the floor.

I was very happy with the performance of my robot in the end and I'm happy to move on to the mapping and navigation sides of the course.

Other Labs

Lab 6: PID Control

Using gain constants to control angle.

Lab 7: Kalman Filter

Fixing noisy sensors with statistics!

Lab 9: Mapping

Using transformation matrices and TOF data to map a room.

Lab 10: Localization (sim)

Using a Bayesian filter, localize the location of a virtual robot.