2 min read

RRT Sim

Robotics has been an area I’ve wanted to dig into properly for a while. One of the things that drew me in is motion planning: how does a robot arm figure out how to reach a target when there are obstacles in the way? You can’t just move straight there, the arm would hit the wall. You need a path that snakes around the barriers, and computing that efficiently is a genuinely interesting problem.

I built this sim to understand the algorithms myself, and once it was working I thought it could be useful for anyone else trying to get an intuition for how this stuff works rather than just reading about it.

The visualizer shows three approaches side by side in 3D:

Greedy / Cyclic Coordinate Descent moves each joint toward the target immediately. It’s fast and simple, but it gets stuck the moment an obstacle is in the way. Good for understanding why a naive approach isn’t enough.

Standard RRT (Rapidly-exploring Random Tree) explores the space randomly, building a tree of safe positions until it reaches the goal. It gets there eventually, but inefficiently. Watching it explore makes the randomness feel concrete in a way that reading a paper doesn’t.

RRT-Connect grows two trees at once, one from the start and one from the goal, and connects them in the middle. This is the version actually used in real robotics systems. Seeing it converge noticeably faster than standard RRT makes the improvement click immediately.

The heavy computation runs in Web Workers so the UI stays smooth while the algorithms are doing their thing. Built with React, Three.js, and TypeScript.