From MAE/ECE 148 - Introduction to Autonomous Vehicles
Jump to navigation Jump to search

Team Members

  • Aron Laszik (ECE)
  • David Zhu (MAE)
  • ElizabethPark (ECE)
  • Zhe Tang (ECE)


The goal of our project is to use 4 TOF (Time-of-Flight) sensors to continuously sample data from the sensors to successfully parallel park our car. We drew inspiration from a previous team, 2018FallTeam2, who did a project on parallel parking with TOF sensors. Our idea is to further the work done by the previous team by utilizing more sensors and to sample data continuously to prevent any collision while parking.


Initial Design and Indoor Track

RoboCar06's initial design

The chassis of the car was given to us fully assembled, so the team's first tasks are to a design a platform for the electronics and a camera stand. Both the acrylic plate and the camera mount was made using the tools in Envision.

Our first camera design was proven flawed as we are collecting data for the indoor autonomous model. We've concluded that its short height and small angle of Incline is the problem, as the pictures recorded included too many variances that could disturb the training process. The car's first attempt to drive itself was cut short when it's beginning to cut corners and drive off track. Upon further testing, we learn that the car needed much more data and consistent throttle in order to train a model. We kept that in mind for future training and gotten much better results.

The schematics for the electrical components of the final car are here. They include Time of Flight sensors, which are not needed for the autonomous laps, only the parallel parking. Car Schematics

File:Indoor Lap.mp4

Final indoor autonomous attempt Indoor lap video is shared through Youtube due to maximum file size limitation on the wiki

Final Design and Outdoor Track

Before we attempted the outdoor track, we changed the design of the camera mount. Learning from our previous mistake, the new mount is 30% taller than before, with a 65º inclination angle with respect to the ground. This decreases the chances of capturing unwanted factor that could negatively impact the model.

In comparison to the indoor track, the outdoor track in EBU II has a few significant disadvantages: variance in lighting, uneven terrain, and generally more distractions like window reflections. We were fortunate in choosing a good time to do our training, as the cloudy day provided relatively consistent lighting throughout our training and testing process.

However, the track is still challenging. Because of a problem with our motor configuration, which is detailed at the end of the page, we set our throttle to a lower value in order to prevent any accidents. This proves to be a disadvantage at this track, as the car struggles to go up a small bump in one of the turns. A second problem arose when the model began to recognize the residue lines from the older track and started to follow it. Both issues were resolved with more data. Our final model utilized 10,000 captured data, and successfully drove around the track more than 5 times.

RoboCar06's final design
File:Outdoor Laps.mp4


For our project, we placed four TOF sensors around the car to detect the environment. Small L-Brackets were 3D printed for the sensors to be secured on using velcro. Code for our project can be found through Github

Gap Detection

File:Gap Detection.mp4 Two sensors are located to the right side of the car. We simulate a situation of a right-hand drive car seeking a large enough parking spot to park in. Depending on the mode it is in, the car will stop after it has detected a large enough gap. Perpendicular parking requires less space than parallel parking, and vice versa.

Wall Detection

File:Crash Prevention.mp4 Improving upon the previous team, we added two additional sensors in the front and back of the car. This allows us to program the car to stop and revert its course when near a wall or other cars(which are boxes in this case)

Perpendicular Parking

File:Perpendicular Park.mp4 Once the car detects a wide enough gap, it will stop and began to back into it. As demonstrates in the video, the back sensor will "warn" the car of its proximity to the wall and prevent it from hitting it.

Parallel Parking

File:Parallel Park 2.mp4 File:Parallel Park 1.mp4 Once the car detects a gap wide enough, it will stop. Then it turns it's wheels all the way in and reverses. Once the back facing sensor noticed that the wall behind it is within a threshold distance, as well as when the side facing sensor notices the wall is within a threshold distance, the car reverse the direction of its front wheels and continues reversing. The thresholds change at this point to be even closer, and once the sensors measure underneath that threshold, the car pushes a small forward-facing voltage to stop. The wheels now straighten and the car goes until the forward facing sensor's distance reading falls underneath a certain threshold.

The overall idea of this strategy is similar to the one the parallel parking group utilized in the previous quarter, however, their program was based on time. So they would apply a reverse voltage for a measured amount of time, and they would change wheel directions after certain time thresholds. Their car would run into some of the parking spots though because this was not as accurate a measuring scenario as they thought it would be. That's why we decided to use tof sensors that can continuously update the car's location with respect to what is around it. Parallel-diagram-start.pngParallel-diagram-finish.png Diagram showing our parallel parking procedure

The code specifically for parallel parking is here: [1]


Error with smbus library and TOF Sensors

We ran into issues with using the smbus library which helps us change the I2C addresses of the TOF sensors in Python. We were able to change the I2C address but could not access the data correctly when trying to establish communication through I2C. With this error we could not use all 4 TOF sensors simultaneously.
We bought 2 multiplexer buses from Fry's so we can use all 4 TOF sensors at the same time. However, we still ran into issues with using the multiplexer buses as they were not two-way compatible.

Finally, we had to order an older version of the Pimoroni sensors, the Gowoops VL53L0X Time-of-Flight (ToF) Laser Ranging Sensor, since it had better library support. With these we were able to change and utilize the addresses properly. The code to set up the sensors and to get them working is here: [2]

Motor Configuration

We experienced some issues with our motor that caused it to re-configure our maximum, stop, and reverse speed values. We believe it might be an issue with a loose connection in our wiring or chassis, as there was a little wobbling when turning the wheels. We worked around it by checking the configuration values every time we started up our car. Our parallel parking worked perfectly but we restarted the car and the motor configuration changed again. So when we were doing the perpendicular parking, the car stops at a further distance away than expected which made it harder to control the correct angle. We tried to reset the motor several times and still weren’t able to find the same configure as before. The speed is harder to control in the perpendicular parking testing.

Future Improvement

Because of the various issues we had with the car, we were unable to progress as far as we wanted with the project. We advise future teams to not use the Polulu sensors or to take a look at how 2019WinterTeam10 implemented the TOF sensors. Here are some ideas that future team can implement with the car.

  • Exiting the parking spot: The car can ideally utilize a similar maneuver as parking in reversing the car out of theparking spot. The sensors will act as a warking system to prevent collisions.
  • Parking in a tighter spot: In order to park parallelly with real cars, the spot has to be at least 1.5 times the car length. Currently, our robocar06 needed more than that, but that can be improved upon based on the minimum turning radius of the chassis.