Building a Robotic Car
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Robotic Car

Welcome to the Robotic Car project of the San Diego Artificial Intelligence study group.

This is a hands-on complement to the UDACITY CS 373 class "Programming a Robotic Car".

We're implementing a controller for Mindstorms NXT models of self driven cars, with a matching simulator to test our algorithms.

We will apply various AI methods similar to those used for full size self driven cars, such as probabilistic inference, computer vision, machine learning, and planning.

The code is implemented in Python, as this is the language used for the class. Other languages may also be used.




The first version of our robot can drive forward, turn, and sense the surface under it (binary, e.g. if it is dark or not).

The file "" contains the interface to control the robot and read its sensors.

We've made a simulator to test the robot virtually, and experiment with various localization algorithms.

There is an implementation of a particle filter to localize the robot.

Running the Simulator

$ cd src
$ python


Can you control the robot to get all particles to cloud around it?

$ cd src
$ python 7

The numerical argument determines the complexity of the landscape.

Manual Simulation

$ cd src
$ python
>>> import game
>>> game = game.Game(complexity = 4)

Place a hidden robot in a random location:

>>> game.board.place_robot(x = None, y = None, color = "None")

Set directions:

>>> import math; right = math.pi/2; left = - math.pi/2


>>> game.board.move_robot(right, 100)
>>> game.board.move_robot(left, 100)

Repeat until the robot is localized!

Controlling the Robot

Download nxt-python from:

Place the nxt-python directory in src folder of this repository, then:

$ cd src
$ python


If Bluetooth doesn't connect:

  1. Make sure the NXT display is not in the bluetooth configuration mode.

If you see the following error:

nxt.locator.NoBackendError: No selected backends are available! Did you install the comm modules?

Potential fixes:

  1. export the PYTHONPATH from the shell to the directory of the installed lightblue


Open source license to be determined.