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
PathWeaver MPC Simulator
Advanced Self-Driving Car Simulation with WebGL & Three.js
Welcome to the PathWeaver MPC Simulator, a project demonstrating real-time, on-road,
lattice-based autonomous vehicle motion planning combined with Model Predictive Control (MPC) directly in your browser.
While many industrial motion planners rely on C++, CUDA, or OpenCL for GPU acceleration,
this simulator showcases how WebGL can be harnessed to execute similar parallel planning
algorithms. Coupled with Three.js, these complex operations are visualized in interactive, real-time 3D simulated environments.
This simulator is an ongoing development effort by Idriss Boukmouche. As such, you might encounter
bugs, occasional WebGL issues, or unexpected vehicle behaviors. For the best experience and full functionality,
it is currently recommended to use Google Chrome
with hardware acceleration enabled and experimental canvas features activated (see project README for setup).
The target is 60fps, though performance may vary based on your hardware's planning capabilities.