MPC for UR5e Robotic Arm — Warehouse Sorting
Model Predictive Control for a UR5e manipulator with analytical DH kinematics and real-time obstacle avoidance. Picks and stacks colored cubes around obstacles using a receding-horizon CasADi/IPOPT solver, replanning every timestep in MuJoCo — deployed on real hardware.
On Real Hardware
Red cubes in the red zone, black cubes in the black zone — fully autonomous. The arm reclassifies each cube’s color from the camera feed and routes it to the correct drop location while avoiding the obstacle wall separating the pickup region from the placement region.
MuJoCo Simulation
The MuJoCo environment matches the real lab setup: colored drop zones, an obstacle wall, and a Robotiq gripper. The MPC horizon visualizes the predicted end-effector path (cyan markers) in real time. Each frame of the 20-step horizon is solved live via IPOPT in ~10 ms.
Trajectory Analysis
Left: top-down view of four sorting runs — trajectories route around the obstacle wall to reach the drop zones. Right: side elevation showing the arm lifting over the wall (z = 0.5 m) without any pre-programmed height constraint.
Convergence & Safety
Position error converges below 3 cm by end of approach. Obstacle clearance stays above zero throughout — minimum 7.9 cm from the wall, well above the 2 cm NLP safety margin.
Joint Profiles & Solve Time
Joint profiles are smooth across all six DOF — the receding horizon doesn’t produce jerky commands even replanning every tick. Solve time drops from 38 ms (cold warm-start) to a steady ~10 ms, well within the 50 ms control timestep.
Related projects
Decentralized Fleet Coordination for Airport Ground Operations
Multi-agent coverage control for airport ground vehicles using Buffered Voronoi Cells, Lloyd's algorithm, and game-theoretic demand response — zero collisions across all test scenarios.
Deep Learning from Scratch
The full arc: backpropagation in raw NumPy, CNNs with BatchNorm and Dropout trained to 78% on CIFAR-10, multi-head self-attention for text summarization, and a Masked Autoencoder that reconstructs images from 25% of their patches — then transfers those features to downstream tasks.
Classical ML from Scratch
Two learning paradigms built from NumPy up — tree-based spam classification (decision tree, Random Forest, AdaBoost) and SVD/ALS matrix factorization for movie recommendations. No frameworks; matched scikit-learn on both.