Live demo · Learned kinematics

Plan robot arm motion on Chalk CPUs

This demo shows how to run a PyTorch inverse-kinematics model on Chalk CPUs to plan joint trajectories for a simulated pipetting arm. Pick destination wells to try it, then explore the code to see how it works.

Compare the learned path with the refined path

Choose a few destination wells and inspect both the arm motion and the tip-error measurements.

Try this experiment · expected results

  1. 1Run a short route

    Keep the selected wells and choose Plan and run with refinement enabled.

    Expected: The arm visits the wells; the plan reports network error and executed tip error.

  2. 2Compare without refinement

    Disable refinement and run the same wells again.

    Expected: Compare tip error for the same targets to see what the refinement step contributes.

ik network · 135k paramsOpen in new tab

Chalk serves the learned motion planner on CPUs. Compare the model’s initial tip error with the corrected path that the simulated arm executes.

This is a browser simulation. The network predicts joint angles for every waypoint in a batch; optional gradient refinement reduces tip error through the arm's forward kinematics. The example does not operate a physical robot.

Built on Chalk

The example plans the pipette path, predicts joint angles and refines them through forward kinematics. Chalk packages the CPU service, mounts its weights and serves its API.

  • Serve the planner on CPUs

    Chalk runs the CPU-only PyTorch service with two vCPUs and exposes the planning API through an HTTPS endpoint.

  • Keep weights separate from the image

    Chalk mounts the trained ik.pt file alongside the application. Retrain the model and redeploy to replace its weights.

  • Define the service in Python

    The deployment specifies dependencies, memory, replica limits and an HTTP readiness probe. Chalk builds the image and manages the replicas.

Deploy your own

Run it on your own

You need uv, Chalk credentials, and a Chalk environment. Clone the example and train the network to create ik.pt, then log in and deploy the CPU service. The script prints the URL for the simulated arm.

To adapt the example, change the arm geometry and labware positions, retrain, and redeploy. The JSON endpoint returns a trajectory for the browser simulation; connecting it to hardware requires your own control and validation layer.

chalk-ai/learned-arm-planner
git clone https://github.com/chalk-ai/learned-arm-planner
cd learned-arm-planner

# Train the inverse-kinematics network (about 2.5 minutes on a large CPU box).
uv run --with torch --with numpy python train.py --out ik.pt

# Or export CHALK_CLIENT_ID and CHALK_CLIENT_SECRET.
chalk login

# Ships the weights, server and WebGL page, and prints your demo's URL.
./deploy.py

Serve models that move things

Planning, control, or perception for your lab and your robots. Talk to an engineer about running them in your cloud.