2026-11-27 16:41 UTC

Batchplan packages batched robot planning and training-data generation

state: expiredheat: mediumuncertainty: mediumrelevance: mediumrobotics motion-planning training-dataNatsuku Lab

What is this?

Natsuku Lab’s Batchplan is a Rust library for batched robot motion planning: it combines inverse kinematics, collision-aware path planning and trajectory timing, and can generate datasets for robot-learning workflows. The project says it supports CPU execution and GPUs through wgpu, and exports to LeRobot. Its GitHub page reports strong speed and path-clearance results against several planners on specified benchmark sets; these are publisher-reported comparisons, not independently verified here. The project also notes material limitations, including planning against simplified collision spheres and an early, version-0.2 interface.

Why it matters

Batchplan is a notable practical robotics tool: it combines batched motion planning with robot-learning data generation, and its Rust implementation aims to work across CPUs and multiple GPU backends without requiring CUDA. If its reported results hold up, researchers and developers collecting demonstrations across many scenes could plan far more motions per unit time. The main caveats are that the benchmarks are published by the project, planning uses simplified collision spheres (with mesh checks as a filter), and the library is still at version 0.2. It is a promising specialist option, not yet evidence of a broadly established replacement for mature robotics stacks.

Current assessment

Natsuku Lab’s GitHub project describes Batchplan as a Rust library that batches inverse kinematics, collision-aware path planning and trajectory timing, and can generate NumPy or LeRobot training datasets. It supports CPU execution and GPU backends via wgpu; the project says planning itself runs on CPU threads, while IK and trajectory optimization can use the GPU. The README reports favorable comparisons on specified Panda benchmark sets, including 0.17 ms per problem in one comparison and higher solve and mesh-clearance rates than listed alternatives. These are publisher-reported results; the supplied sources do not provide independent replication. Comparisons also use different hardware and setups, so headline rates should not be treated as direct, general-purpose rankings. The project identifies constraints: it plans using collision spheres, version 0.2 may change, and GPU calls have overhead that makes CPU faster for small batches. Its dataset-generation and LeRobot export features make it relevant to robot-learning workflows, but the evidence establishes a software release and its claims, not production adoption or validated real-robot performance.

Measured heat

no measured readings yet — the hourly heat pass fills this in

How the heat travelled

10-24 17:33⭐ origin directly observedBatchplan: Plan batches of robot motions, use for execution or training data
natsuku on hacker news
—
10-24 17:33amplified on hacker news 👑hn.story.50223343
natsuku
peak 1 · 0 comments · 105% of case engagement
10-24 18:26our radar first saw it · +0.9hdiscovery anchor: hn.story.50223343—

Evidence (1) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hn ⭐Batchplan: Plan batches of robot motions, use for execution or training data
Retrieved article excerpt

Open article · Retrieved 2026-10-24T18:28:00.550797+00:00

# batchplan

*The fastest motion planning in the West.*

[Two reBot arms at each of many tables, seen from the front, handing a block over and around posts, screens and low walls, every handover planned in one batch](https://raw.githubusercontent.com/natsuku-lab/batchplan/main/docs/handover.gif)

[**Quick start**](https://github.com/natsuku-lab/batchplan#quick-start) ·
[Docs](https://github.com/natsuku-lab/batchplan/blob/main/docs/README.md) ·
[API](https://github.com/natsuku-lab/batchplan/blob/main/docs/api.md) ·
[Benchmarks](https://github.com/natsuku-lab/batchplan/blob/main/docs/benchmarks.md) ·
[Examples](https://github.com/natsuku-lab/batchplan/blob/main/examples) ·
[How it works](https://github.com/natsuku-lab/batchplan/blob/main/docs/architecture.md)

[CI](https://github.com/natsuku-lab/batchplan/actions/workflows/ci.yml)

---

**batchplan is a Rust library for collision-aware motion planning, in batches.** One call plans thousands of motions, each in its own scene: IK, a collision-free path, and a trajectory timed within the robot's limits. A typical problem plans in 0.17 ms on one CPU core, faster than [VAMP](https://github.com/natsuku-lab/batchplan#how-it-compares), with paths that keep clear of the real geometry more often than any planner we compared. IK, trajectory optimization and distance grids run on any GPU that [wgpu](https://wgpu.rs) supports (Vulkan, Metal or DX12), with no CUDA, no ROCm and no ROS, or on the CPU with the same results.

It is built for robot learning at scale: planned motions become [LeRobot](https://github.com/huggingface/lerobot) datasets that train as they are. Two reBot arms hand blocks to each other over and around dividers in 512 scenes in 1.4–1.7 s on an M4 Pro or a Ryzen AI Max+ 395, on the GPU or the CPU.

- **Plan:** batched IK; RRT-Connect, shortcutting and smoothing on SIMD collision checks; smooth B-spline paths, optionally optimized with L-BFGS; time-optimal timing within velocity, acceleration and jerk limits; replanning from a moving state; and controlled stops along the path.
- **Robots:** load from URDF, MJCF or OpenUSD, including mimic joints, closed loops, continuous joints and ball or floating joints, or assemble several, such as two arms. Collision spheres are fitted automatically. IK takes a target for each hand at once, and plans can hold one arm still while another moves.
- **Worlds:** boxes, spheres, cylinders, capsules and signed distance grids, built from meshes, point clouds, depth images or frames fused over time.
- **Data:** reaches with recoveries from mistakes, pick-and-place episodes and handovers between two arms, with grippers and task strings, plus states perturbed from them to start reinforcement learning from. They export as LeRobot v3.0 datasets (arm by arm, as ALOHA's) or NumPy arrays; `scripts/replay_mujoco.py` replays them in MuJoCo and adds camera videos.
- **Embeddable:** CPU-only builds, threads you own, time budgets, allocation-free sampling and typed errors, for use inside a robot's control process.

## Install

```
[dependencies]
batchplan = "0.2"
```

| Cargo feature | Default | Adds |
| --- | --- | --- |
| `gpu` | on | GPU devices through wgpu. Without it, batchplan is CPU-only and has no GPU dependencies. |
| `lerobot` | off | LeRobot v3.0 export (Arrow, Parquet). |
| `usd` | off | Robots and scenes from OpenUSD. |

batchplan builds on stable Rust 1.90 or later (1.96 with `usd`), with no build flags to set: its collision checks use the widest SIMD instructions the CPU has, chosen when the program runs (SSE2 up to AVX-512 on x86-64, NEON on ARM).

## Quick start

The paths below point at test robots in this repository's `assets/`; use your own robot's file instead.

### Plan a batch of motions

```
use batchplan::glam::{Quat, Vec3};
use batchplan::{
    Device, Error, IkOptions, IkProblem, Obstacle, PlanOptions, PlanProblem, Pose, Robot,
    RobotOptions, Trajectory, World,
};

fn main() -> Result<(), Error> {
    // Any URDF, MJCF or USD robot. Collision spheres are fitted when it loads.
    let robot = Robot::load(
        "assets/ur5e/ur_description/urdf/ur5e.urdf",
        &RobotOptions::default(),
    )?;
    let device = Device::gpu(&robot).or_else(|_| Device::cpu(&robot))?;

    // Scenes are uploaded once. Problems name their scene by index.
    let table = Obstacle::cuboid(Vec3::new(0.0, 0.0, -0.02), Vec3::new(1.0, 1.0, 0.02));
    let worlds = device.upload(&[World {
        obstacles: vec![table],
    }])?;

    // IK for a batch of gripper poses...
    let down = Quat::from_rotation_x(std::f32::consts::PI);
    let goals: Vec<IkProblem> = [Vec3::new(0.4, 0.2, 0.3), Vec3::new(0.3, -0.3, 0.4)]
        .into_iter()
        .map(|position| IkProblem::new(0, Pose::new(position, down)))
        .collect();
    let ik = batchplan::solve_ik(&device, &worlds, &goals, &IkOptions::default())?;

    // ...then a collision-free motion to every solution, in one call.
    let problems: Vec<PlanProblem> = ik
        .solved()
        .map(|s| PlanProblem::new(s.problem.world, robot.default_q(), s.solution))
        .collect();
    let plans = batchplan::plan(&device, &worlds, &problems, &PlanOptions::default())?;

    // Time each path within the robot's velocity, acceleration and jerk limits.
    for s in plans.solved() {
        let trajectory = Trajectory::try_new(&robot, s.solution, 1.0)?;
        let samples = trajectory.sample(100.0)?; // 100 Hz, for a controller
        println!(
            "motion {}: {:.2} s, {} samples",
            s.index,
            trajectory.duration(),
            samples.len()
        );
    }
    Ok(())
}
```

### Make a training dataset

```
use batchplan::datagen::DemoOptions;
use batchplan::glam::{Quat, Vec3};
use batchplan::lerobot::ExportOptions;
use batchplan::{Device, Error, IkProblem, Pose, Robot, RobotOptions, World, datagen, lerobot};

fn main() -> Result<(), Error> {
    let robot = Robot::load(
        "assets/ur5e/ur_description/urdf/ur5e.urdf",
        &RobotOptions::default(),
    )?;
    let device = Device::gpu(&robot).or_else(|_| Device::cpu(&robot))?;
    let worlds = device.upload(&[World::default()])?;

    // Reaches to 64 goals, plus recoveries from states perturbed along them.
    let down = Quat::from_rotation_x(std::f32::consts::PI);
    let goals: Vec<IkProblem> = (0..64)
        .map(|i| {
            Vec3::new(
                0.3 + 0.03 * (i % 8) as f32,
                -0.25 + 0.06 * (i / 8) as f32,
                0.3,
            )
        })
        .map(|position| IkProblem::new(0, Pose::new(position, down)))
        .collect();
    let demos = datagen::demonstrations(&device, &worlds, &goals, &DemoOptions::default())?;

    // A LeRobot v3.0 dataset (cargo feature `lerobot`), ready for `lerobot-train`.
    lerobot::export(
        "data/reaches",
        &robot,
        &worlds,
        &demos,
        &ExportOptions::default(),
    )
}
```

### Plan around what a depth camera sees

```
use batchplan::glam::{Quat, Vec3};
use batchplan::{
    DepthImage, Device, Error, Intrinsics, Obstacle, Occlusion, Pose, Robot, SdfGrid, SdfOptions,
    World, Worlds,
};

/// Turns one depth frame into a world to plan in, leaving the arm itself out.
fn world_from_camera(
    device: &Device,
    robot: &Robot,
    depth: &[f32],
    q: &[f32],
) -> Result<Worlds, Error> {
    let image = DepthImage {
        depth, // metres, row by row
        width: 640,
        intrinsics: Intrinsics {
            fx: 525.0,
            fy: 525.0,
            cx: 319.5,
            cy: 239.5,
        },
        // 1.5 m above the table, looking down (OpenCV axes: z forward, y down).
        camera: Pose::new(
            Vec3::new(0.5, 0.0, 1.5),
            Quat::from_rotation_x(std::f32::consts::PI),
        ),
    };
    let arm = image.robot_mask(robot, q, 0.04)?; // the arm is not an obstacle to itself
    // What objects hide is solid; what only the arm hides is free, or it would wall the arm in.
    let behind = Occlusion::OccupiedExceptRobotShadow;
    let grid = SdfGrid::from_depth(device, &image, Some(&arm), behind, &SdfOptions::default())?;
    device.upload(&[World {
        obstacles: vec![Obstacle::from(grid)],
    }])
}
```

To fuse frames over time, use an `OccupancyMap` ([Worlds and perception](https://github.com/natsuku-lab/batchplan/blob/main/docs/perception.md)).

## How it compares

Each library planned the same 2,600 Panda problems from MotionBenchMaker and MπNets, and one checker judged every path, batchplan's included. *Solved* means the path reaches the goal within the joint limits without touching the model it was planned on; *clear on the meshes* checks it against the Panda's meshes, the real robot. [Setup and per-set results](https://github.com/natsuku-lab/batchplan/blob/main/docs/benchmarks.md#against-other-planners) · [Run them yourself](https://github.com/natsuku-lab/batchplan/blob/main/docs/benchmarks.md#reproducing)

- **The fastest of these planners:** 0.17 ms per problem and 19,902 problems/s on an M4 Pro CPU, ahead of VAMP on the same spheres.
- **Clear of the real robot most often:** 85–93% of its paths clear the Panda's meshes; no other planner's reach 82%.
- **Solves the most** in every comparison, with shorter paths than every other sampling-based planner, and, with two optimization seeds, than cuRobo.

### Against VAMP and OMPL, on VAMP's spheres

Apple M4 Pro CPU, 14 cores.

| Planner | Solved | Clear on the meshes | Path length¹ | Time per problem (median) | All 2,600, one core | Batched |
| --- | --- | --- | --- | --- | --- | --- |
| **batchplan** | **90.4%** | **85.2%** | **3.41 rad** | **0.17 ms** | **0.91 s** | **19,902 /s** |
| [VAMP](https://github.com/KavrakiLab/vamp) 0.6.4 | 86.1% | 71.6% | 3.56 rad | 0.26 ms | 2.43 s | 2,689 /s |
| VAMP, stopped at 10,000 samples² | 86.1% | 71.5% | 3.56 rad | 0.26 ms | 1.06 s | 16,111 /s |
| VAMP, 2 rad steps³ | 86.4% | 75.3% | 3.56 rad | 0.27 ms | 2.72 s | 2,697 /s |
| [OMPL](https://ompl.kavrakilab.org) 2.0, RRT-Connect⁴ | 63.9% | 63.5% | 4.02 rad | 2.75 ms | 631 s | 30 /s |

¹ Median over the 1,557 problems all five solve. ² As batchplan's searches do; VAMP's default is 100,000. ³ VAMP's library default; the other rows step 1 rad, its Panda setting. ⁴ With VAMP's collision checker and a 5 s limit.

### Against cuRobo, on cuRobo's spheres

cuRobo on an NVIDIA T4 GPU with 8 Xeon threads; batchplan on the M4 Pro². The 1,300 problems whose scenes are only boxes, which both libraries load exactly.

| Planner | Solved | Clear on the meshes | Path length¹ | Time per problem (median) | Batched |
| --- | --- | --- | --- | --- | --- |
| **batchplan** | **98.9%** | 92.8% | 3.243 rad | **0.24 ms** | **13,167 /s** |
| batchplan, optimizing 2 seeds³ | 98.8% | **92.9%** | **3.137 rad** | 15.1 ms | 142 /s, 746 /s on its GPU |
| [cuRobo](https://github.com/NVlabs/curobo) 0.8 | 85.2% | 81.6% | 3.144 rad | 197 ms | 3.0 /s |
| cuRobo, 32 problems per call | 85.0% | 81.9% | 3.154 rad | 660 ms⁴ | 1.4 /s |

¹ Median over the 1,092 problems all four solve. ² The T4 machine has not been available since batchplan's previous version, which planned there in 0.64 ms and 2,152 problems/s. ³ `PlanOptions::seeds`, off by default: the searched path and the straight line, optimized. ⁴ Each call's time over its problems.

### Against MoveIt 2 and RoboPlan, which plan on the meshes

AMD Ryzen AI Max+ 395 CPU, 32 threads. batchplan plans on the spheres it ships with; every path is judged on the meshes.

| Planner | Solved, on the meshes | Path length¹ | Time per problem (median) | Batched |
| --- | --- | --- | --- | --- |
| **batchplan** | **93.1%** | **3.23 rad** | **0.13 ms** | **31,196 /s** |
| [RoboPlan](https://github.com/open-planning/roboplan) 0.7 | 73.8% | 3.78 rad | 10.3 ms | 174 /s |
| [MoveIt 2](https://moveit.ai) Jazzy (OMPL, FCL) | 63.1% | 3.80 rad | 59.4 ms | 82 /s |

¹ Median over the 1,334 problems all three solve.

### Batches and the GPU

Planning runs on CPU threads on either
natsuku10

Interpretation history

Decision trace