Project Page | Paper | Video
Jax code for solving sequential constraint satisfaction and manipulation problems in milliseconds
SPaSM: Differentiable Particle Optimization for Fast Sequential Manipulation
Lucas Chen1,
Shrutheesh R. Iyer1,
Zachary Kingston1
1Purdue University
submitted to ICRA 2026
hero.webm
SPaSM solution to the obstructed block stacking task. The block placements and arm trajectories are jointly optimized for feasiblity and shortness.
Set up a conda environment, taking care to ensure you have the cuda version of JAX installed.
conda create -n spasm 'numpy<2' jax "jaxlib=*=*cuda*" flax -c conda-forge
conda activate spasm
pip install meshcat jaxlie xmltodict seabornFirst start meshcat server in a separate terminal:
meshcat-server --zmq-url tcp://127.0.0.1:6000You should be able to go to localhost:7000/static in your browser and see a blank environment.
You can proceed to run any of the problems discussed in our paper. Here we will demonstrate solving the tetris problem with 8 tetrominoes, visualizing intermediate steps.
python spasm/solve.py --num_blocks 8 --viewoptYou should see a solved configuration like this:
Try running the solver again with timing (Be sure to disable visualization (--viewopt) for accurate timings)
python spasm/solve.py --num_blocks 8 --benchA reported timing of ~30ms is common for laptop GPUs, and even faster runs are expected for more powerful CUDA-supported graphics cards. Please refer to our paper for timings on our RTX 4090 machine.
spasm/solve.py: Run tetromino placement CSP for the tetris problem.
spasm/tetris_traj.py: Run trajopt for the tetris problem. spasm/solve.py must be run first so its solution file can be read.
spasm/tower_solve.py: Run block placements CSP for the tower problem.
spasm/tower_traj.py: Run trajopt for the tower problem. spasm/tower_solve.py must be run first so its solution file can be read.
mbm/solve.py: Run solver for the MotionBenchMaker problems (Franka Research 3 only). You must first download the problem files into problems/
