An Honest Review of Udacity’s Self-Driving Car Engineer Nanodegree — Second Term

Mithi
9 min readJun 2, 2017

TLDR: It’s ok. I don’t really recommend it. I think it there should be twice as much content, and much better presentation and it should be half the price. There are a lot of free content out there that give much better presentation of the topic. Here’s a compiled list of curated resources.

If this article helped you in someway, consider buying me a coffee :)

Here are some of my thoughts about and experiences from the second term as someone who just completed it recently.

Preparing for the Second Term

Very much like the first term, there are five projects. Unlike in the first term, the required language is C++ instead of Python. Because self-driving programs need to process data and make decisions in real-time, a performant language like C++ is a good choice.

❤️ 🚙 🚗 DEEP BLUEBERRY BOOK: If you’ve always wanted to start learning about deep-learning for free, you might have stumbled upon the right place! (click this link)

I completed the first term around the third week of March, and I was assigned to start the second term at April 7, 2017. While waiting for the program to start, I brushed up on my C++ and watched Udacity’s old (but free) A.I for robotics lectures.

I’m incrementally improving my C++ skills and there are still so many things to learn. I’ve compiled a list of resources that I think are good places to learn C++.

It’s good that I browsed through the free A.I lectures as some of these were also used for the second term. When I officially started the second term, a lot of the lessons were already marked as complete.

The Five Projects

There were two sensor fusion projects, one localization project, and two control projects.

Extended Kalman Filters and Unscented Kalman Filters

The first two projects are about Kalman Filter and its flavors. The focus is on how it can be applied to fusing measurements from different sensors — such as lidars and radars — to accurately estimate the state (e.g. position, velocity) of a tracked object, such as a pedestrian on the street.

The Kalman Filter works best when the conversion from the measurement to the state is linear. The Extended Kalman Filter estimates a linear function about a current datapoint to address the fact that not all sensor measurements can be linearly converted such as a radar measurement.

Sometimes linearization is not only computationally cumbersome, it also does not produce satisfactory results such as when the tracked object is assumed to be turning. This is where the Unscented Kalman Filter shines.

For these two projects, we had the option to fill-in a given code or write the code from scratch. I wrote the code from scratch to practice writing C++. At that time, the simulators and bonus projects were not yet shipped. I tested code by printing out the matrices in the console and checking if each output was what was intended. This project was hard for me because of many reasons, but mostly it’s related to using a poor angle normalization function or not catching a division by zero somewhere.

For the EKF project, I actually wrote my code in Python before C++ just to see if I really got it.

Particle Filters

The third project is to localize a “kidnapped” vehicle given noisy sensor data. The Particle Filter localization algorithm is a really fun algorithm that’s relatively easy to understand conceptually. I implemented a very simple version based on the lecture before proceeding to the actual project.

One constraint of this project is that we had to fill-out the necessary bits of a given code. We weren’t allowed to modify the other files including the (.h) header files, we were only allowed to modify one (.cpp) implementation file. Some people complained about this, particularly because there was one method (DataAssociation()) which seems to be a God Methoda method with many steps needed to accomplish the task. It could use a few helper functions which we weren’t allowed to declare in the corresponding header file. I wasn’t particularly bothered by this, but it did annoy some people. What bothered me more was some misleading or contradicting comments which weren’t fixed since it was written in December 2016 up to at least early May 2017 this year.

Overall, despite the shortcomings, I really liked this project. I am even thinking of making a version of this project that I’ll write from scratch as a coding exercise. At the time I was doing this project, Udacity hasn’t provided an official visualization tool for this (there is now), and many students wrote their own visualization tool. I am also thinking of writing my own visualization when I have the time.

Update: Got a bit of free time to write an incomplete visualization! ❤

PID and Model Predictive Control

The last two projects are to use control methods to smoothly maneuver a vehicle around a track.

The first was to implement a PID controller which is one of the more simpler and widely-used control method. I’ve seen this implemented in a lot of balancing and line-following toy robots so I was pretty familiar with this method. What was new to me was a simple parameter optimization method known as twiddle.

While waiting for the project to be released at that time, I coded a simple toy where you can manually tune the three PID parameters with sliders and see how it affects the movement of the car trying to follow a line.

When the PID project was released, some people were surprised that the project can be accomplished within 15 minutes via manual tuning (implementing twiddle was optional). Others implemented a PID not only for controlling the steering angle but also for controlling the acceleration and braking. Some accepted the challenge to get speeds as fast as 100 mph and still maneuver safely around curves which was pretty difficult. Some linearly controlled the speed of the vehicle based on the magnitude of the steering angle.

I decided to use an aggressive method which was to do a full acceleration at all times except when detecting a large angle, and error in which it will fully brake. This is a dangerous way of driving in real life, given the latency between sensing and command and also the the latency between command and actuation. It looks pretty cool though in the simulation. :)

This latency thing is no problem using the MPC or Model Predictive Control Method. The MPC method can anticipate future events because we have an idea of what is probably gonna happen if we do something. I like how MPC is very intuitive because that’s how rational humans plan their actions. The fist few videos of the series below developed my intuition of MPC and also made me appreciate this method even more.

Some were unhappy with the MPC lessons because there weren’t any lecture videos released. For a lot of people including myself, it took around 10 days to get feedback for a submitted project. Others also panicked because the term was approaching the end for the first cohort and it was taking too long to get feedback. Even though my code for this project is pretty short compared to the earlier projects, there were some things that I thought I understood but turns out didn’t. Good thing there are a lot of smart people in the Slack Channel and forums who clarified some of my misconceptions.

The Second Term vs the First Term

As I’ve said earlier, the main topics for the second part of Udacity’s Self-Driving Car Engineer Nanodegree are sensor fusion, localization, and control. I’m really much more interested in these topics than in computer vision or machine learning which were the main topics for the first term so there might be a bit of a bias.

When the second term was opened for me, a lot of the lessons were already marked as complete as I’ve mentioned before. There were also lessons that were marked as “COMING SOON” clearly indicating that this course was less polished and is clearly still a work in progress. The lessons marked as coming soon were the PID Controller Project, Vehicle Models, Model Predictive Control, and Model Predictive Control Project. These lessons were still being rolled out one at a time. Sometimes a lesson or project is previewed to us at its beta stage where there are still a lot of bugs and a lot of students were happy to help polish them. The project requirements were also still being tweaked, the requirements when I passed some of the projects isn’t the same as it is now. This wasn’t an issue, since there are still many cool things you can do in life outside Udacity right? ;)

This term is way more mathematically rigorous that last term, so I had to review a little bit of calculus, linear algebra, statistics, and high school physics. There are also more pictures and animations this term, which I found cute. I really appreciate the effort Udacity took to design these visual aids. I found that the lectures are not enough for me to understand some things, luckily we have the whole internet where we can get supplementary materials.

Some people think that the first term had more material covered than this term and that you don’t need as many hours per week. I personally think I spent significantly more hours in this term than last term. Maybe it’s because I’m not as experienced in C++ and I didn’t do the `bonus challenges` of last term.

Others, especially the Windows people, complain that it took more time to setup the project dependencies than to do the actual projects themselves. They encountered a lot of problems installing some dependencies in their machine. Some even said that it would be nice if all projects used Docker instead. Thankfully, I didn’t experience this running my projects in a Unix environment.

Definitely, this term is way less polished compared to last term. It seems to still be in its `beta-testing` stage. It looks very much like still a work-in-progress. I’d say for it to be worth 800 USD, I think Udacity should spend a couple more months polishing the presentation of this term and more importantly adding more content. I think there should be twice as much content and should have much better presentation at half the price. There are a lot of free content out there that give much better presentation of the topic.

If this article helped you in someway, consider buying me a coffee :)

See my list of recommendations below.

--

--