Skip to content

CoMMALab/SPaSM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPaSM: Millisecond Sequential Manipulation

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.

Install

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 seaborn

Run

First start meshcat server in a separate terminal:

meshcat-server --zmq-url tcp://127.0.0.1:6000

You 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 --viewopt

You should see a solved configuration like this:

Screenshot 2025-10-10 053537


Try running the solver again with timing (Be sure to disable visualization (--viewopt) for accurate timings)

python spasm/solve.py --num_blocks 8 --bench

A 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.

Problem Listing

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/

About

GPU-Powered Sequential Manipulation in Milliseconds

Topics

Resources

Stars

Watchers

Forks

Languages