pyplot 3D

My work with pyplot continues. I spent some time today working with 3D plots. matplotlib (the parent library of pyplot) does a great job making 3D plots with very little code, but it doesn’t quite go far enough to make it trivial.

In my particular case, I had a big collection of 3 dimensional data points. These were actually motion control points related to acceleration, velocity, and brake, but you could just as easily imagine these as lidar points with x, y, and z coordinates.

In a perfect world, I’d pass these points to pyplot and get a 3D plot.

In an even more perfect world, I’d pass these points to pyplot and get a 3D contour.

Unfortunately, the world is not perfect. Although it is still pretty awesome that pyplot can create these types of plots in a Jupyter notebook. I just have to configure the data properly.

I took a while to wrap my head around this, but specifically what it turns out I need to do is find a discrete set of x values, and a discrete set of y values, such that I have the z value for every combination of x and y.

It would have been great if pyplot could have interpolated (“filled in the blanks”) from the values I had at hand. But as far as I can tell, pyplot doesn’t do that.

At first I thought that might sink me, but then I realized that if I chose my z-coordinate properly, and scaled back the range of my y-coordinates, I could achieve this.

The plot wound up looking kind of boring, but boring in this case was good! If it were interesting, I might have been obliged to discard my linear model and start looking for something polynomial. A boring plot means I get to keep my boring (and manageable!) linear model 🙂

Comparing Udacity’s Self-Driving Car Programs

Which of Udacity’s two Self-Driving Car programs is right for you? This post will show you how to make the right choice.

Udacity has two excellent Nanodegree Programs for aspiring self-driving car engineers: the Self-Driving Car Engineer Nanodegree program, and the Intro to Self-Driving Cars Nanodegree program.

Which one is right for you?

To try and answer this question, I’ll begin with a story. In October of 2016, Udacity welcomed the first class of students into our Self-Driving Car Engineer Nanodegree program. Since that historic debut, we have been delighted to enroll over 11,000 students around the world in this program!

Along the way, we learned that while people across the globe were thrilled at the prospect of being able to work on autonomous vehicles, not all of them were equipped to do so—many of them needed additional training to get ready for the rigors and challenges of our curriculum.

In order to provide a viable point-of-entry for these eager learners, we built the Intro to Self-Driving Cars Nanodegree Program, and welcomed the first class of students at the end of 2017. This “Intro” program prepares students with the fundamentals in Python, C++, calculus, linear algebra, statistics, and physics that are necessary to become a Self-Driving Car Engineer.

Both Nanodegree programs are paths to a career in the self-driving car field, but the goals of each program are distinct, as are the skills one learns.

The Self-Driving Car Engineer (SDC) Nanodegree program is an advanced program in which students write programs in Python and C++, and learn new frameworks like ROS and TensorFlow. Students entering SDC should be able to write programs from scratch, and should be comfortable with both calculus and linear algebra. SDC does not require solving differential equations by hand, but does require that students be comfortable interpreting mathematical notation and translating it into code.

The Intro to Self-Driving Cars (iSDC) Nanodegree program is an intermediate program that requires entering students to have only minimal programming and math knowledge. Students entering iSDC should be comfortable reading and modifying code in at least one language (Python helps, since that is first language the program uses). Entering students should also be comfortable with high-school algebra. From there, iSDC teaches the trigonometry, calculus, linear algebra, statistics, and physics that are necessary to succeed in the advanced SDC program.

iSDC does not require an application to enroll, and everybody is welcome. However, students with no programming experience at all might consider starting their journey with Udacity’s Intro to Programming Nanodegree program, and then proceeding on to Intro to Self-Driving Cars. A slightly more mathematical (and more challenging) alternative first step would be Udacity’s Data Analyst Nanodegree Program.

Whether you are ready for the Self-Driving Car Engineer Nanodegree program today or feel like you should cover the topics in Intro to Self-Driving Cars first, Udacity is the place to start on the road to becoming a Self-Driving Car Engineer. See you in the classroom!

Udacity’s Intro to Self-Driving Cars Nanodegree Program

Experience a free preview of our program today, and discover how YOU can enter the amazing world of self-driving cars!

Sebastian Thrun, Udacity founder, and the “Godfather” of Self-Driving Cars

Udacity’s Intro to Self-Driving Cars Nanodegree Program is for anyone in the world who ever dreamed of working on self-driving cars, but thought they never could.

This program covers the prerequisite skills necessary to advance to our career-ready Self-Driving Car Engineer Nanodegree Program, including:

  • Intermediate programming ability in C++ or Python (the languages of the autonomous vehicle industry)
  • Basic linear algebra
  • Basic calculus
  • Basic statistics
  • Basic physics

As a student in the Intro to Self-Driving Cars Nanodegree program, you’ll build your skills up over the course of a four-month curriculum path that tackles each of these areas at a pace that is both manageable and rewarding. Best of all, you’ll practice putting these skills to work on the types of projects that real self-driving car engineers work on every day.

If you love self-driving cars, but thought you’d never get the chance to work on them, then this is the program for you.

Check out a free preview of the program right now!

Udacity Self-Driving Car Engineer Nanodegree Projects

Enjoy a look at some of the projects our students are building, including Finding Lane Lines, Traffic Sign Classifier, Behavioral Cloning, and more!

Students in our Self-Driving Car Engineer Nanodegree program engage in a project-based curriculum, and from the moment they enroll, they begin addressing key challenges and topics through building specialized projects. Here are all of the projects they build!

Finding Lane Lines

This is the first project students complete, one week into the program.

They learn to work with images, color spaces, thresholds, and gradients, in order to find lane lines on the road.
Stack: Python, NumPy, OpenCV

Traffic Sign Classifier

In this project, students train a convolutional neural network to classify traffic signs.

To do so, they use the German Traffic Sign Recognition Benchmark dataset. This particular student went above and beyond to train his network to not only classify signs, but also localize them within the image, and applied his classifier to a video.
Stack: Python, NumPy, TensorFlow

Behavioral Cloning

Here, students record training data by manually driving a car around a track in a simulator.

Then they use this camera, steering, and throttle data to train an end-to-end neural network for driving the vehicle, based on NVIDIA’s famous research paper.
Stack: Python, NumPy, Keras

Advanced Lane Finding

By applying advanced computer vision techniques, such as sliding window tracking, to a dashcam video, students are able to track lane lines on the road under a variety of challenging conditions.
Stack: Python, NumPy, OpenCV

Vehicle Detection and Tracking

Students use machine learning techniques and feature extraction to identify and track vehicles on a highway.
Stack: Python, NumPy, scikit-learn, OpenCV

Extended Kalman Filter

An extended Kalman filter merges noisy simulated radar and lidar data to track a vehicle.
Stack: C++, Eigen

Unscented Kalman Filter

An unscented Kalman filter merges noisy, highly non-linear simulated radar and lidar data to track a vehicle.
Stack: C++, Eigen

Kidnapped Vehicle

Students develop a particle filter in C++ to probabilistically determine a vehicles location relative to a sparse landmark map.
Stack: C++

PID Controller

Students build and tune a proportional-integral-derivative controller to steer a vehicle around a test track, following a target trajectory.
Stack: C++

Model Predictive Control

Students build and optimize a model predictive controller to steer a vehicle around a test track, following a target trajectory.
Stack: C++, ipopt

Path Planning

In this project, students construct a path planner for highway driving based on a finite state machine.

The planner has three components: environmental prediction, maneuver selection, and trajectory generation.
Stack: C++

Semantic Segmentation

Students train a pixel-wise segmentation network that identifies and colors road pixels to identify free space for driving.
Stack: Python, TensorFlow

Safety Case

Students build a prototype of a safety case for a lane-keeping assistance ADAS feature, including the safety plan, hazard analysis and risk assessment, functional safety concept, technical safety concept, and software requirements.

Programming a Real Self-Driving Car

For this project, students form teams to drive a real self-driving car around the Udacity test track.

The car is required to negotiate a traffic light and follow a waypoint trajectory. Code is built first in the simulator, and then deployed to Udacity’s self-driving car in California.
Stack: Python, ROS, Autoware, TensorFlow

Would you like to be building these kinds of projects yourself? Then you should apply to the Udacity Self-Driving Car Engineer Nanodegree Program!