Skip to content
PalletLab
Architecture

Architecture

Repository layout

core/          C++20 engine: geometry, rules, packers, WES, robot poses, JSON API
  include/pal/   public headers        src/   implementation
  apps/          palletize, wes_sim, bench (CLI11)
  tests/         GoogleTest            bench/ Google Benchmark
  wasm/          embind bindings for the browser
ros2/          palletizer_interfaces (service) + palletizer_ros (node, launch, tests)
web/           Next.js site: landing, docs (MDX, en + ja), simulator, AI assistant
docker/        ROS 2 Jazzy image          scripts/  build-engine.sh, ros.sh

One core, three front-ends

                 ┌─▶ CLI apps (JSON files)  ─▶ web/public/data
core (pal::core) ─┼─▶ WebAssembly (embind)  ─▶ simulator "Try other boxes"
                 └─▶ ROS 2 node             ─▶ /plan_pallet, markers, TF

All three call api.cpp or the same packer functions, so a fix in the core reaches every front-end.

Frames

  • Pallet frame: integer millimetres, z up, origin at the deck's back-left corner. All packing happens here.
  • Robot base frame: metres, ROS conventions (x forward, y left, z up). Place poses are reported here.
  • three.js scene: metres, y up. The viewer puts a single rotated, scaled group around each pallet, so the planner's numbers are used unchanged.

Key decisions

DecisionWhy
Integer millimetres for packingexact "top equals bottom" comparisons, no float epsilons
Eigen only for posesrotations are naturally floating-point
JSON at the boundariesone simple format for files, WASM and debugging
Seeded, self-mapped randomnessidentical results on every platform
Heuristics, not exact solversmilliseconds, well inside a robot's cycle time
Static site + one API routethe engine runs in the browser; only the assistant needs a server