Today, we wrapped up the first phase of our project. After assessing our learning goals, we decided that we wanted to move in a different direction in the second half of our project. In this blog post, we’ll outline the progress we’ve made so far and the steps we took to get there. We’ll also give some insight into our decision to shift gears (pun intended) in this latter half of the project, and explain what our plan is moving forward.

Parallel and Perpendicular Parking


If you’ve been following along with our blog, you may recall this video, which demonstrated our CV parking system in action. Take a look at that video, and then compare that with our finished product below!

image1
image1

As you can see, we’ve gone from World's Worst Attempt at Parallel Parking(Do yourself a favor and watch that video at twice the speed!) to valet level accuracy. How did we do it? Our last blog post details the algorithm that underlies our implementation. In practice, what we ended up doing was sending the Neato a Twist to drive a 90 degree arc (¼ of a circle) by specifying a particular speed and then calculating the angular velocity that would result in our intended radius. The radius for the first arc is half of the distance between the neato and the wall (or the front of the parking spot), and the radius for the second arc is slightly smaller.

In perpendicular parking mode, we drive only the first arc. In parallel parking mode, we drive both arcs. In both modes, we make a small correction after we complete our arcs to align the Neato optimally within the spot.

The general system pipeline we designed works as follows:

  1. Drive alongside the parking spots.
  2. Lidar callback function collects data
    • Distance to wall
    • Distance to parked Neato (to make sure you’re far enough away to park)
    • Distance between the two parked cars - gives us width of our spot
  3. Determine radius, origin
    • Radius = 0.5 * (distance to wall)
    • Origin = (middle of parking spot + radius, radius)
  4. Drive forward radius from middle of parking spot
  5. Begin driving arc one (90 degrees)
  6. If we’re in perpendicular mode, drive arc two.
  7. In both modes, finish by making any necessary alignment adjustments.

Learning Goal Reflections


At this point, we’ve successfully built our MVP. As is always the case, it was difficult to predict how long it would take to get to this point, and how difficult it would be. The experience of researching the state-of-the-art parallel parking algorithms was challenging, in that the algorithms rely on complex math. We’re proud of the fact that we were able to extract the main ideas from the research, and successfully built a simple system that mimics those algorithms. However, having accomplished our goal, we realized that the stretch goals we had outlined at the start of the project would not teach us anything new.

Our team was concerned that while we had learned about a complex algorithm, the work we did computationally was not complex enough to challenge us significantly. With this in mind, we set out to identify new stretch goals that could keep us busy in these last two weeks of the project which would stretch us in the right direction. We decided to implement another parking assist feature which will integrate the work we did in our computer vision project.

The feature we plan to implement now is guidelines for rear view parking assist cameras. Rear view camera footage is typically overlaid with guidelines which represent the projected path of the car. In the image below, you can see that the lines represent the arc that the car is driving, and show that the car is projected to make it into the spot. These guidelines often change color when the car becomes perfectly aligned with the parking spot, indicating that the projected path will steer the vehicle into the spot.

image1

In this final phase of the project, we intend to develop a similar feature for the Neato, to be used while parking or navigating manually via Teleop Twist. Our knowledge about the pinhole camera model and arc projection will be helpful to us in implementing this feature. We intend to use the Hough Line Transform algorithm to match our path projection with the lines we see on the ground. Given enough time, the stretch goal for our stretch goal would be to implement a Hough Line Transform algorithm ourselves.

Stay tuned for more updates on this project! We’re excited to see where this final phase takes us, and how this turns out. If this goes well, our final result will be a full-fledged parking assist system with a suite of options that rivals any fancy car-- manual parking with path projection guidelines, autonomous perpendicular parking, and autonomous parallel parking.