# openrobokit/robokit architecture

> Architecture diagram of the GitHub repository openrobokit/robokit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/openrobokit/robokit
- Repository: https://github.com/openrobokit/robokit

## Overview

RoboKit is a general-purpose robotics toolkit for batched optimization, retargeting, planning, and simulation. A typical user-facing path is to choose a robotics task, configure a robot and objectives, solve or simulate it, and obtain a motion or calibrated pose. The graph preserves the README’s major capabilities and the core optimization, robot-model, and task layers. Some subsystem links are documented only at the capability level; unsampled implementation details are not inferred.

Main entry points: [`src/robokit/gallery/__main__.py`](https://github.com/openrobokit/robokit/blob/main/src/robokit/gallery/__main__.py) (Task Gallery), [`src/robokit/helpers/motion_plan/motion_planner.py`](https://github.com/openrobokit/robokit/blob/main/src/robokit/helpers/motion_plan/motion_planner.py) (Motion Planning), [`src/robokit/robo/robot.py`](https://github.com/openrobokit/robokit/blob/main/src/robokit/robo/robot.py) (Robot Kinematics), [`src/robokit/terms/task.py`](https://github.com/openrobokit/robokit/blob/main/src/robokit/terms/task.py) (Task Framework)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_models["Robot Models"]
  node_robot_spec["Robot Description<br/>[robot_spec.py]"]
  node_robot["Robot Kinematics<br/>[robot.py]"]
  node_robot_state["Robot State<br/>[robot_state.py]"]
  node_se3["SE&#40;3&#41; Operations<br/>[se3_kernels.py]"]
end

subgraph group_optimization["Optimization Tasks"]
  node_variables["Optimization Variables<br/>[var_values.py]"]
  node_tasks["Task Framework<br/>[task.py]"]
  node_lm["LM Solver<br/>[lm_optimizer.py]"]
  node_population["Population Solver"]
  node_warp_utils["Warp Utilities<br/>[warp_utils.py]"]
end

subgraph group_applications["Robotics Applications"]
  node_gallery["Task Gallery<br/>[__main__.py]"]
  node_ik["Inverse Kinematics<br/>[ik.py]"]
  node_motion["Motion Planning<br/>[motion_planner.py]"]
  node_hand_retarget["Hand Retargeting<br/>[online.py]"]
  node_humanoid_retarget["Humanoid Retargeting<br/>[online.py]"]
  node_calibration["Hand-Eye Calibration<br/>[calibrator.py]"]
  node_grasp["Grasp Synthesis<br/>[grasp_var.py]"]
end

subgraph group_simulation["Simulation Control"]
  node_sim_mpc["Simulation MPC<br/>[sim_mpc.py]"]
  node_sim_context["Simulation Context<br/>[sim_context.py]"]
  node_simulator["Physics Simulation<br/>[mjwarp.py]"]
end

subgraph group_geometry["Geometry"]
  node_collision["Self-Collision Tasks"]
  node_trajectory_collision["Trajectory Collision"]
  node_sdf["Distance Kernels<br/>[sdf_kernels.py]"]
end

node_user(("Robotics User"))

node_user -->|"selects task"| node_gallery
node_gallery -->|"offers IK"| node_ik
node_gallery -->|"offers planning"| node_motion
node_gallery -->|"offers retargeting"| node_hand_retarget
node_gallery -->|"offers retargeting"| node_humanoid_retarget
node_gallery -->|"offers calibration"| node_calibration
node_gallery -->|"offers MPC"| node_sim_mpc
node_gallery -->|"offers grasping"| node_grasp
node_motion -->|"uses IK"| node_ik
node_motion -->|"uses solver"| node_lm
node_motion -->|"uses solver"| node_population
node_motion -->|"uses robot"| node_robot
node_robot_spec -->|"configures"| node_robot
node_tasks -->|"reads variables"| node_variables
node_tasks -->|"invokes solver"| node_lm
node_collision -->|"computes kinematics"| node_robot
node_collision -->|"uses kernels"| node_sdf
node_trajectory_collision -->|"uses kernels"| node_sdf
node_sim_context -->|"reads simulation"| node_simulator
node_sim_mpc -.->|"uses context"| node_sim_context
node_robot -.->|"updates state"| node_robot_state
node_robot -->|"uses specification"| node_robot_spec
node_tasks -->|"uses kernels"| node_warp_utils
node_robot_spec -.->|"uses transforms"| node_se3

click node_gallery "https://github.com/openrobokit/robokit/blob/main/src/robokit/gallery/__main__.py"
click node_robot_spec "https://github.com/openrobokit/robokit/blob/main/src/robokit/robo/robot_spec.py"
click node_robot "https://github.com/openrobokit/robokit/blob/main/src/robokit/robo/robot.py"
click node_robot_state "https://github.com/openrobokit/robokit/blob/main/src/robokit/robo/robot_state.py"
click node_variables "https://github.com/openrobokit/robokit/blob/main/src/robokit/opt/var_values.py"
click node_tasks "https://github.com/openrobokit/robokit/blob/main/src/robokit/terms/task.py"
click node_lm "https://github.com/openrobokit/robokit/blob/main/src/robokit/opt/lm_optimizer.py"
click node_population "https://github.com/openrobokit/robokit/blob/main/src/robokit/opt/population_solver.py"
click node_ik "https://github.com/openrobokit/robokit/blob/main/src/robokit/helpers/ik/ik.py"
click node_motion "https://github.com/openrobokit/robokit/blob/main/src/robokit/helpers/motion_plan/motion_planner.py"
click node_hand_retarget "https://github.com/openrobokit/robokit/blob/main/src/robokit/helpers/hand_retargeting/online.py"
click node_humanoid_retarget "https://github.com/openrobokit/robokit/blob/main/src/robokit/helpers/humanoid_retargeting/online.py"
click node_calibration "https://github.com/openrobokit/robokit/blob/main/src/robokit/helpers/hand_eye_calibration/calibrator.py"
click node_grasp "https://github.com/openrobokit/robokit/blob/main/src/robokit/helpers/grasp/grasp_var.py"
click node_sim_mpc "https://github.com/openrobokit/robokit/blob/main/src/robokit/helpers/sim_mpc/sim_mpc.py"
click node_sim_context "https://github.com/openrobokit/robokit/blob/main/src/robokit/terms/simulation/sim_context.py"
click node_simulator "https://github.com/openrobokit/robokit/blob/main/src/robokit/sim/mjwarp.py"
click node_collision "https://github.com/openrobokit/robokit/blob/main/src/robokit/terms/dense/self_collision_task.py"
click node_trajectory_collision "https://github.com/openrobokit/robokit/blob/main/src/robokit/terms/sparse/trajectory_collision_task.py"
click node_sdf "https://github.com/openrobokit/robokit/blob/main/src/robokit/geom/sdf_kernels.py"
click node_se3 "https://github.com/openrobokit/robokit/blob/main/src/robokit/lie/se3_kernels.py"
click node_warp_utils "https://github.com/openrobokit/robokit/blob/main/src/robokit/utils/warp_utils.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_robot_spec,node_robot,node_robot_state,node_se3,node_user toneBlue
class node_variables,node_tasks,node_lm,node_population,node_warp_utils toneAmber
class node_gallery,node_ik,node_motion,node_hand_retarget,node_humanoid_retarget,node_calibration,node_grasp toneMint
class node_sim_mpc,node_sim_context,node_simulator toneRose
class node_collision,node_trajectory_collision,node_sdf toneIndigo
```

## Components

### Robot Models

- [Robot Description](https://github.com/openrobokit/robokit/blob/main/src/robokit/robo/robot_spec.py): `src/robokit/robo/robot_spec.py`
- [Robot Kinematics](https://github.com/openrobokit/robokit/blob/main/src/robokit/robo/robot.py): `src/robokit/robo/robot.py`
- [Robot State](https://github.com/openrobokit/robokit/blob/main/src/robokit/robo/robot_state.py): `src/robokit/robo/robot_state.py`
- [SE(3) Operations](https://github.com/openrobokit/robokit/blob/main/src/robokit/lie/se3_kernels.py): `src/robokit/lie/se3_kernels.py`

### Optimization Tasks

- [Optimization Variables](https://github.com/openrobokit/robokit/blob/main/src/robokit/opt/var_values.py): `src/robokit/opt/var_values.py`
- [Task Framework](https://github.com/openrobokit/robokit/blob/main/src/robokit/terms/task.py): `src/robokit/terms/task.py`
- [LM Solver](https://github.com/openrobokit/robokit/blob/main/src/robokit/opt/lm_optimizer.py): `src/robokit/opt/lm_optimizer.py`
- [Population Solver](https://github.com/openrobokit/robokit/blob/main/src/robokit/opt/population_solver.py): `src/robokit/opt/population_solver.py`
- [Warp Utilities](https://github.com/openrobokit/robokit/blob/main/src/robokit/utils/warp_utils.py): `src/robokit/utils/warp_utils.py`

### Robotics Applications

- [Task Gallery](https://github.com/openrobokit/robokit/blob/main/src/robokit/gallery/__main__.py): `src/robokit/gallery/__main__.py`
- [Inverse Kinematics](https://github.com/openrobokit/robokit/blob/main/src/robokit/helpers/ik/ik.py): `src/robokit/helpers/ik/ik.py`
- [Motion Planning](https://github.com/openrobokit/robokit/blob/main/src/robokit/helpers/motion_plan/motion_planner.py): `src/robokit/helpers/motion_plan/motion_planner.py`
- [Hand Retargeting](https://github.com/openrobokit/robokit/blob/main/src/robokit/helpers/hand_retargeting/online.py): `src/robokit/helpers/hand_retargeting/online.py`
- [Humanoid Retargeting](https://github.com/openrobokit/robokit/blob/main/src/robokit/helpers/humanoid_retargeting/online.py): `src/robokit/helpers/humanoid_retargeting/online.py`
- [Hand-Eye Calibration](https://github.com/openrobokit/robokit/blob/main/src/robokit/helpers/hand_eye_calibration/calibrator.py): `src/robokit/helpers/hand_eye_calibration/calibrator.py`
- [Grasp Synthesis](https://github.com/openrobokit/robokit/blob/main/src/robokit/helpers/grasp/grasp_var.py): `src/robokit/helpers/grasp/grasp_var.py`

### Simulation Control

- [Simulation MPC](https://github.com/openrobokit/robokit/blob/main/src/robokit/helpers/sim_mpc/sim_mpc.py): `src/robokit/helpers/sim_mpc/sim_mpc.py`
- [Simulation Context](https://github.com/openrobokit/robokit/blob/main/src/robokit/terms/simulation/sim_context.py): `src/robokit/terms/simulation/sim_context.py`
- [Physics Simulation](https://github.com/openrobokit/robokit/blob/main/src/robokit/sim/mjwarp.py): `src/robokit/sim/mjwarp.py`

### Geometry

- [Self-Collision Tasks](https://github.com/openrobokit/robokit/blob/main/src/robokit/terms/dense/self_collision_task.py): `src/robokit/terms/dense/self_collision_task.py`
- [Trajectory Collision](https://github.com/openrobokit/robokit/blob/main/src/robokit/terms/sparse/trajectory_collision_task.py): `src/robokit/terms/sparse/trajectory_collision_task.py`
- [Distance Kernels](https://github.com/openrobokit/robokit/blob/main/src/robokit/geom/sdf_kernels.py): `src/robokit/geom/sdf_kernels.py`

### Other components

- **Robotics User**

## Connections

- Robotics User → Task Gallery: selects task (evidence: `README.md`)
- Task Gallery → Inverse Kinematics: offers IK (evidence: `README.md`)
- Task Gallery → Motion Planning: offers planning (evidence: `README.md`)
- Task Gallery → Hand Retargeting: offers retargeting (evidence: `README.md`)
- Task Gallery → Humanoid Retargeting: offers retargeting (evidence: `README.md`)
- Task Gallery → Hand-Eye Calibration: offers calibration (evidence: `README.md`)
- Task Gallery → Simulation MPC: offers MPC (evidence: `README.md`)
- Task Gallery → Grasp Synthesis: offers grasping (evidence: `README.md`)
- Motion Planning → Inverse Kinematics: uses IK (evidence: `src/robokit/helpers/motion_plan/motion_planner.py`)
- Motion Planning → LM Solver: uses solver (evidence: `src/robokit/helpers/motion_plan/motion_planner.py`)
- Motion Planning → Population Solver: uses solver (evidence: `src/robokit/helpers/motion_plan/motion_planner.py`)
- Motion Planning → Robot Kinematics: uses robot (evidence: `src/robokit/helpers/motion_plan/motion_planner.py`)
- Robot Description → Robot Kinematics: configures (evidence: `src/robokit/robo/robot_spec.py`)
- Task Framework → Optimization Variables: reads variables (evidence: `src/robokit/terms/task.py`)
- Task Framework → LM Solver: invokes solver (evidence: `src/robokit/terms/task.py`)
- Self-Collision Tasks → Robot Kinematics: computes kinematics (evidence: `src/robokit/terms/dense/self_collision_task.py`)
- Self-Collision Tasks → Distance Kernels: uses kernels (evidence: `src/robokit/terms/dense/self_collision_task.py`)
- Trajectory Collision → Distance Kernels: uses kernels (evidence: `src/robokit/terms/sparse/trajectory_collision_task.py`)
- Simulation Context → Physics Simulation: reads simulation (evidence: `src/robokit/terms/simulation/sim_context.py`)
- Simulation MPC → Simulation Context: uses context (evidence: `src/robokit/helpers/sim_mpc/sim_mpc.py`)
- Robot Kinematics → Robot State: updates state (evidence: `src/robokit/robo/robot_state.py`)
- Robot Kinematics → Robot Description: uses specification (evidence: `src/robokit/robo/robot_spec.py`)
- Task Framework → Warp Utilities: uses kernels (evidence: `src/robokit/terms/task.py`)
- Robot Description → SE(3) Operations: uses transforms
