# bhuman/bhumancoderelease architecture

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

- Interactive diagram: https://gitdiagram.com/bhuman/bhumancoderelease
- Repository: https://github.com/bhuman/bhumancoderelease

## Overview

B-Human is a humanoid-robot soccer codebase. Its runtime behavior-control modules produce motion requests; the motion engine selects and coordinates motion phases, which motion generators and engines turn into joint commands. The tree also contains a simulator/operator interface and debugging and log-playback tools. The README identifies the release but does not document subsystem wiring; links below are limited to explicit calls in the sampled motion source or conservatively documented by the runtime structure.

Main entry points: [`Src/Modules/MotionControl/MotionEngine/MotionEngine.cpp`](https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/MotionEngine/MotionEngine.cpp) (Motion coordinator), [`Src/Libs/SimulatedNao/RobotConsole.cpp`](https://github.com/bhuman/bhumancoderelease/blob/master/Src/Libs/SimulatedNao/RobotConsole.cpp) (Robot console), [`Src/Modules/MotionControl/WalkingEngine/WalkGenerators/WalkToBallAndKickEngine.cpp`](https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/WalkingEngine/WalkGenerators/WalkToBallAndKickEngine.cpp) (Walk-to-kick), [`Src/Modules/BehaviorControl/SkillBehaviorControl/Options`](https://github.com/bhuman/bhumancoderelease/tree/master/Src/Modules/BehaviorControl/SkillBehaviorControl/Options) (Soccer options)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_behavior["Behavior control"]
  node_behavior_control["Skill behavior"]
  node_behavior_options["Soccer options"]
  node_behavior_skills["Motion skills"]
end

subgraph group_motion["Motion control"]
  node_motion_engine["Motion coordinator<br/>[MotionEngine.cpp]"]
  node_walk_kick["Walk-to-kick"]
  node_walk_kick_engine["Walk kick generator<br/>[WalkKickEngine.cpp]"]
  node_kick_engine["Kick generator<br/>[KickEngineData.cpp]"]
  node_keyframe_engine["Keyframe motions"]
  node_fall_engine["Fall protection<br/>[FallEngine.cpp]"]
  node_head_engine["Head motion"]
  node_arm_keyframe_engine["Arm keyframes"]
  node_point_at_engine["Pointing arms<br/>[PointAtEngine.cpp]"]
end

subgraph group_runtime["Robot runtime"]
  node_robot_runtime["Robot runtime<br/>[Robot.cpp]"]
  node_module_runner["Module graph runner"]
  node_debug_transport["Debug transport<br/>[TcpConnection.cpp]"]
end

subgraph group_tools["Simulation and tools"]
  node_sim_robot["Simulated robot<br/>[SimulatedRobot.cpp]"]
  node_sim_console["Robot console<br/>[RobotConsole.cpp]"]
  node_log_player["Log playback<br/>[LogPlayer.cpp]"]
end

node_operator(("Operator"))
node_joint_output(("Joint commands"))

node_operator -->|"operates"| node_sim_console
node_behavior_control -->|"selects"| node_behavior_options
node_behavior_options -->|"invokes"| node_behavior_skills
node_motion_engine -->|"checks falls"| node_fall_engine
node_motion_engine -->|"requests phases"| node_keyframe_engine
node_walk_kick -->|"creates walk kick"| node_walk_kick_engine
node_walk_kick -->|"creates kick"| node_kick_engine
node_motion_engine -->|"outputs joints"| node_joint_output
node_module_runner -->|"runs modules"| node_robot_runtime
node_robot_runtime -->|"uses transport"| node_debug_transport
node_sim_console -->|"controls"| node_sim_robot
node_log_player -->|"provides playback"| node_sim_console

click node_behavior_control "https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/BehaviorControl/SkillBehaviorControl/SkillBehaviorControl.cpp"
click node_behavior_options "https://github.com/bhuman/bhumancoderelease/tree/master/Src/Modules/BehaviorControl/SkillBehaviorControl/Options"
click node_behavior_skills "https://github.com/bhuman/bhumancoderelease/tree/master/Src/Modules/BehaviorControl/SkillBehaviorControl/Skills"
click node_motion_engine "https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/MotionEngine/MotionEngine.cpp"
click node_walk_kick "https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/WalkingEngine/WalkGenerators/WalkToBallAndKickEngine.cpp"
click node_walk_kick_engine "https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/WalkingEngine/WalkKickEngine.cpp"
click node_kick_engine "https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/KickEngine/KickEngineData.cpp"
click node_keyframe_engine "https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/KeyframeMotionEngine/KeyframeMotionEngine.cpp"
click node_fall_engine "https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/FallEngine/FallEngine.cpp"
click node_head_engine "https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/HeadMotionEngine/HeadMotionEngine.cpp"
click node_arm_keyframe_engine "https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/ArmKeyFrameEngine/ArmKeyFrameEngine.cpp"
click node_point_at_engine "https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/PointAtEngine/PointAtEngine.cpp"
click node_robot_runtime "https://github.com/bhuman/bhumancoderelease/blob/master/Src/Libs/Framework/Robot.cpp"
click node_module_runner "https://github.com/bhuman/bhumancoderelease/blob/master/Src/Libs/Framework/ModuleGraphRunner.cpp"
click node_sim_robot "https://github.com/bhuman/bhumancoderelease/blob/master/Src/Libs/SimulatedNao/SimulatedRobot.cpp"
click node_sim_console "https://github.com/bhuman/bhumancoderelease/blob/master/Src/Libs/SimulatedNao/RobotConsole.cpp"
click node_log_player "https://github.com/bhuman/bhumancoderelease/blob/master/Src/Libs/LogPlayback/LogPlayer.cpp"
click node_debug_transport "https://github.com/bhuman/bhumancoderelease/blob/master/Src/Libs/Debugging/TcpConnection.cpp"

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_behavior_control,node_behavior_options,node_behavior_skills toneBlue
class node_motion_engine,node_walk_kick,node_walk_kick_engine,node_kick_engine,node_keyframe_engine,node_fall_engine,node_head_engine,node_arm_keyframe_engine,node_point_at_engine toneAmber
class node_robot_runtime,node_module_runner,node_debug_transport toneMint
class node_sim_robot,node_sim_console,node_log_player toneRose
class node_operator,node_joint_output toneIndigo
```

## Components

### Behavior control

- [Skill behavior](https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/BehaviorControl/SkillBehaviorControl/SkillBehaviorControl.cpp): `Src/Modules/BehaviorControl/SkillBehaviorControl/SkillBehaviorControl.cpp`
- [Soccer options](https://github.com/bhuman/bhumancoderelease/tree/master/Src/Modules/BehaviorControl/SkillBehaviorControl/Options): `Src/Modules/BehaviorControl/SkillBehaviorControl/Options`
- [Motion skills](https://github.com/bhuman/bhumancoderelease/tree/master/Src/Modules/BehaviorControl/SkillBehaviorControl/Skills): `Src/Modules/BehaviorControl/SkillBehaviorControl/Skills`

### Motion control

- [Motion coordinator](https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/MotionEngine/MotionEngine.cpp): `Src/Modules/MotionControl/MotionEngine/MotionEngine.cpp`
- [Walk-to-kick](https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/WalkingEngine/WalkGenerators/WalkToBallAndKickEngine.cpp): `Src/Modules/MotionControl/WalkingEngine/WalkGenerators/WalkToBallAndKickEngine.cpp`
- [Walk kick generator](https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/WalkingEngine/WalkKickEngine.cpp): `Src/Modules/MotionControl/WalkingEngine/WalkKickEngine.cpp`
- [Kick generator](https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/KickEngine/KickEngineData.cpp): `Src/Modules/MotionControl/KickEngine/KickEngineData.cpp`
- [Keyframe motions](https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/KeyframeMotionEngine/KeyframeMotionEngine.cpp): `Src/Modules/MotionControl/KeyframeMotionEngine/KeyframeMotionEngine.cpp`
- [Fall protection](https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/FallEngine/FallEngine.cpp): `Src/Modules/MotionControl/FallEngine/FallEngine.cpp`
- [Head motion](https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/HeadMotionEngine/HeadMotionEngine.cpp): `Src/Modules/MotionControl/HeadMotionEngine/HeadMotionEngine.cpp`
- [Arm keyframes](https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/ArmKeyFrameEngine/ArmKeyFrameEngine.cpp): `Src/Modules/MotionControl/ArmKeyFrameEngine/ArmKeyFrameEngine.cpp`
- [Pointing arms](https://github.com/bhuman/bhumancoderelease/blob/master/Src/Modules/MotionControl/PointAtEngine/PointAtEngine.cpp): `Src/Modules/MotionControl/PointAtEngine/PointAtEngine.cpp`

### Robot runtime

- [Robot runtime](https://github.com/bhuman/bhumancoderelease/blob/master/Src/Libs/Framework/Robot.cpp): `Src/Libs/Framework/Robot.cpp`
- [Module graph runner](https://github.com/bhuman/bhumancoderelease/blob/master/Src/Libs/Framework/ModuleGraphRunner.cpp): `Src/Libs/Framework/ModuleGraphRunner.cpp`
- [Debug transport](https://github.com/bhuman/bhumancoderelease/blob/master/Src/Libs/Debugging/TcpConnection.cpp): `Src/Libs/Debugging/TcpConnection.cpp`

### Simulation and tools

- [Simulated robot](https://github.com/bhuman/bhumancoderelease/blob/master/Src/Libs/SimulatedNao/SimulatedRobot.cpp): `Src/Libs/SimulatedNao/SimulatedRobot.cpp`
- [Robot console](https://github.com/bhuman/bhumancoderelease/blob/master/Src/Libs/SimulatedNao/RobotConsole.cpp): `Src/Libs/SimulatedNao/RobotConsole.cpp`
- [Log playback](https://github.com/bhuman/bhumancoderelease/blob/master/Src/Libs/LogPlayback/LogPlayer.cpp): `Src/Libs/LogPlayback/LogPlayer.cpp`

### Other components

- **Operator**
- **Joint commands**

## Connections

- Operator → Robot console: operates
- Skill behavior → Soccer options: selects
- Soccer options → Motion skills: invokes
- Motion coordinator → Fall protection: checks falls
- Motion coordinator → Keyframe motions: requests phases
- Walk-to-kick → Walk kick generator: creates walk kick
- Walk-to-kick → Kick generator: creates kick
- Motion coordinator → Joint commands: outputs joints
- Module graph runner → Robot runtime: runs modules
- Robot runtime → Debug transport: uses transport
- Robot console → Simulated robot: controls
- Log playback → Robot console: provides playback
