Miniature Palletizing with the SO-ARM101
Warehouse robots spend all day stacking boxes onto pallets. In this workshop you build the same thing in miniature, on your desk: an affordable SO-ARM101 arm that picks up cubes and stacks them neatly, two layers at a time.
It is a hands-on introduction to robot manipulation with Viam, for developers and makers who would rather program a real arm than a simulator. You do not need industrial hardware or prior robotics experience, just a desktop arm you can build yourself. You configure it, teach it where the cubes and the pallet are by guiding it with your own hands, then write the Python that runs the whole packing routine. By the end, the arm packs a full two-by-two-by-two stack of cubes on its own, driven entirely by code you wrote.
Required hardware
- An SO-ARM101 arm with its finger gripper, connected to your computer over USB.
- Eight cubes and a pallet mat. You need eight cubes about 20 mm on a side, a two-by-two pallet grid to stack them on, and a staging spot to feed cubes from. The companion project includes a printable template: paper cube nets you fold into 20 mm cubes, and a mat that marks the pallet grid and the staging spot at the exact spacing the code expects. Print it, cut it out, and you are ready. Wooden or foam 20 mm cubes work too if you have them.
- A personal computer running
viam-server, with the arm plugged into it over USB.
Phases
- Platform mental model
- Configure the SO-ARM101
- Teach the cell by hand
- Pack from Python (milestone one: a static pack from your own code)
- Avoid placed cubes (milestone two: a collision-free full pack)
- Wrap it in a module (optional)
When you finish, the wrap-up reviews what you built and points to next steps.
Companion code
All supporting files for this workshop live in the viam-devrel/mini-palletizer repository, including the printable cube-and-pallet template. helpers.py is provided for you; you build palletizer.py yourself as you work through the phases.
Prerequisites
This is a self-serve workshop, so confirm each of the following before you start:
- A Viam account with an online machine. Log in at app.viam.com, create a machine, and confirm the green Live indicator before you begin.
- Python 3.10 or newer. Install it with uv (recommended) or from python.org.
- An SO-ARM101 that’s built, has its motors configured, and is calibrated. Follow the first-time arm setup steps in the SO-ARM101 module documentation: configure the motors, build the arm, and calibrate it.
Validate your environment
Before starting Phase 1, confirm your environment is ready:
python3 --version # 3.10 or newer
uv run --with viam-sdk python -c "import viam; print(viam.__version__)" # prints a version
If either command fails, revisit the checklist above before continuing.
Where to start
- Arm built and machine online (
viam-serverrunning): start at Phase 1. - Still building your SO-ARM101: complete the first-time arm setup (configure the motors, build the arm, and calibrate it), then return here for Phase 1.
Was this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better:
Thank you!