The road is two lanes wide and is
represented by a spline curve controlled by anchor
points. Road positions use station-latitude (SL)
coordinates. Station is the longitudinal distance
along the arc-length of the road. Latitude is the
lateral offset to the left (negative) or right
(positive) of the road centerline.
Left-click + Drag
Shift + Left-click
Ctrl + Left-click + Drag
Right-click + Drag
Place new obstacle
or Move obstacle
Delete obstacle
Rotate obstacle
Pan view
Static obstacles do not move during the
course of the simulation. They can be used to
represent things like parked cars, road debris,
construction zones, etc.
Dynamic obstacles will move along the road
according to their velocities, starting from their
initial station-latitude positions. The initial
latitude is a normalized value between -1 and +1,
corresponding to the latitudes of the left and right
lane boundaries.
Run
Road
Static Obstacles
Dynamic Obstacles
Clear…
AllDynamic ObstaclesStatic ObstaclesRoad
— fps
ChaseTop DownFree
2D3D
Dash Self-Driving Car Simulator
Built with WebGL and Three.js
This project demonstrates a real-time, on-road,
lattice-based autonomous vehicle motion planner in the
browser. Many autonomous vehicle motion planners are
implemented close to the metal in C or C++, or they
utilize computing platforms like CUDA or OpenCL to
generate plans in a highly parallel fashion on the GPU.
Using WebGL, we can implement similar parallel planning
algorithms right in the browser that can run on a
variety of moderately-powerful consumer graphics cards.
With Three.js, the motion planner can be executed in
real-time 3D simulated scenarios.
This simulator is still a work-in-progress. You may see
bugs, WebGL crashes, strange vehicle behavior, and any
number of other failures. Currently, it is fully functional
only in Google Chrome
with hardware acceleration enabled
and experimental canvas features enabled.
The target frame rate is 60fps, but it may run
slower depending on how long planning takes on your
hardware.