Solving the Udacity SDCND exercises with the Windows Subsystem for Linux (WSL) / Windows Ubuntu

Some of the projects in the SDCND nano-degree are C/C++ projects base on cmake. Though there is some support for using direct Windows development, to some, developing on Linux is more comfortable and Linux is also actually relevent as an OS in the automotive domain. There are several scenarios that you could use on a Windows PC:

  • Setup dual boot and boot into the OS that you currently need for development – boring and cumbersome
  • Set up a virtual machine (e.g. with VirtualBox) that runs an Ubuntu Linux. A very nice solution, and actually one that I prefer.
  • Use the Windows Subsystem for Linux (WSL) to run Ubuntu directly on your machine. This is a new feature of Windows 10.

For the last scenario, most of the instructions for developing on Linux directly apply. However, WSL does not (directly) support programs with a GUI. So what would you do for that?

In the Unix world, GUIs are displayed on a system called the X-Server. So what would we need to run, e.g. Eclipse in Ubuntu directly on Windows?

  1. Install and run an X-Server. I use MobaXTerm. It is a standalone program and can be easily configured.
  2. Install Ubuntu from the Microsoft app store:
  3. Start Ubuntu from the windows menu
  4. In the Ubuntu shell, install a Java run time / JDK.
    sudo apt-get update
    sudo apt-get update
  5. Download an Eclipse distribution for Linux 64 bit. Unpack it (hint: gunzip -c , tar xvf  ).
  6. In the Ubuntu shell:
    export DISPLAY=localhost:0.0
    This sets the information where the X-Server is to be found to display the GUI-based programs from the Ubuntu Shell
  7. Run the Eclipse binary -> voila, a Unix-Styled Eclipse on your Windows desktop:



Using Eclipse CDT for the Udacity Self Driving Cars Nanodegree C++ projects

There are a number of C/C++ IDEs that can be used for working on the Udacity SDCND C++ projects. This blog post contains a few tips for using Eclipse CDT to solve the Extended Kalman Filter project.

  1. Get Eclipse CDT. Either by downloading and installing it from the Eclipse Website or by using the setup from my last post.
  2. Checkout the project from github
  3. invoke cmake ..  -DCMAKE_BUILD_TYPE=Debug invoke cmake ..  -G “Eclipse CDT4 – Unix Makefiles” (in contrast to the documentation, I compile with debug)
  4. This creates a .cproject and .project in the build directory. Copy those one level higher.
  5. Import the project as existing project in Eclipse.
  6. I usually compile / run from the command line. Open a shell directly from Eclipse
  7. To run your code from within Eclipse or to debug from within Eclipse, use the context menu.
  8. Debug mode will stop in “main()”, to disable this. Click on the settings for your debug configuration:
    2018-01-20_16h38_53Goto the debugger tab and disable the option:

An Integrated Development Environment for the SDCND

The self-driving car nanodegree from Udacity includes a number of different projects in Python and C++ in different environments (local PC, AWS if you don’t have an GPU). A common discussion topic on Slack is  the question, what everyone is using as editor / IDE.

Since I have been recently working on the topic of development environments for ML in automotive, I took the inspiration and set up and easy to install configuration for Eclipse including

  • PyDev for Python Development
  • CDT for C/C++ development
  • EGit for the integrated git access
  • AWS Eclipse integration for starting / stopping and accessing the AWS instances
  • Remote Systems Explorer etc. for easy access to AWS instances
  • Linux Tools for Docker for Docker management.

All these can be easily installed by means of the Eclipse installer (also known as “Oomph”). If you’d like to try the configuration, perform the following steps:

  1. Download the Eclipse Installer from
  2. Download the setup configuration from
  3. Start the Eclipse Installer. Choose the “Advanced Configuration” Mode in the drop-down menu on the top right.
  4. In the first diaglog, chose the C/C++ Developer entry as a base, and use “Oxygen” as product:
  5. Click next, use the “+” button at the top to add our setup file:
  6. Click next and proceed to the final dialog. The installer will download and install all the Eclipse packages.

You can now start to clone the SDCND repositories and work on your projects.