Examples
Example code and tutorials for EmbodiK.
Not sure where to start?
New to the API โ Quickstart and Basic IK. Teleop stalls or weak tracking โ Solver Robustness & Recovery. Collision latency or safety โ Collision Constraints & Tuning. Full guide map โ Guides overview.
๐งญ Core Guides
- Basic IK Example โ Minimal
solve_position_step()IK bring-up - Multi-Task Multi-Constraints IK Example โ Hierarchical tasks with CoM support-polygon constraint
- Collision-Aware IK Example โ Self-collision avoidance with velocity-damper constraints
- CoM Constraint Example Overview โ Support-polygon inequality constraints and visualization
- Dual-Arm ECTS Example Overview โ Coordinated bimanual control modes and constraints
โญ Highlighted Scripts
These are the public examples that are kept closest to release quality and are the best starting points for users.
01_basic_ik_simple.pyโ Minimal fixed-base IK loop with interactive target02_collision_aware_IK.pyโ Collision-aware IK with optional GPU mode03_teleop_ik.pyโ Minimal teleop input adapter into EmbodiK IK04_com_constraint_example.pyโ CoM support-polygon constraint demo in Viser05_dual_arm_ects.pyโ Dual-arm ECTS/Orthogonal coordination with collision handling06_bimanual_whole_body_ik.pyโ Bimanual whole-body teleop for AI Worker and RB-Y1 with CoM, collision handling, adaptive tuning, and optional Seer input07_unitree_g1_retargeting_ik.pyโ Unitree G1 retargeting IK with palm/foot/pelvis targets, CoM visualization, and optional self-collision constraints08_spot_full_body_ik_viser.pyโ Spot full-body IK in regular Viser with arm+torso, torso-only, full-body, and two-stage modes09_spot_locomanip_mjviser.pyโ Spot locomanipulation ONNX policy rollout in MuJoCo through mjviser
Highlighted interactive examples use a shared solver runtime policy so example
code stays focused on tasks, targets, and visualization while robust constraint
handling remains in C++.
Viser examples share the same default browser endpoint,
http://localhost:8080; pass --port when running multiple viewers at once.
๐งช Specialized References
These scripts remain available in a repository checkout or copied example bundle, but they are narrower benchmarks or API walkthroughs rather than the main demo path.
gpu_batch_ik.pyโ GPU batched velocity IK benchmarkgpu_collision_batch.pyโ GPU batch collision detection benchmarkgpu_solver_demo.pyโ CPU vs GPU solver scaling demoparallel_trajectory_tracking.pyโ 100+ robots tracking trajectories in parallelrobot_model_example.pyโ RobotModel API walkthrough (FK/Jacobians/CoM)visualization_example.pyโ Visualization and interactive marker usage
๐ Running Examples
Install and copy the example bundle once using the
Installation Guide. Then run scripts from the
copied embodik_examples directory:
If pip downloads embodik-*.tar.gz or fails while finding native CMake
packages, use the source-build fallback in the Installation Guide.
Examples default to the Panda preset; use --robot <key> to switch models.
For repository development, use Pixi:
Pass --robot <key> when you want a non-default robot preset.
๐งฐ Example Helpers
The examples/example_helpers/ directory contains reusable utilities:
ik_common.pyโ Shared defaults and small IK/collision helper functionsteleop_ik_backend.pyโ Reusable registered-task IK backend for the teleop examplecommon_bimanual_model_utils.py/common_bimanual_teleop_app.pyโ Shared bimanual whole-body IK helpers for public robot examplesdual_arm_ik_helper.pyโ Dual-arm IK utilitiesg1_model_utils.py/g1_ik_runtime.pyโ Unitree G1 model, retargeting, and IK runtime helperslimit_profiles/โ Joint limit profile configurations