How caleb-pace/stability-aware-robotic-dog works
This repository is a Python control prototype for a Unitree Go2 robotic dog. In the main runtime, a gamepad supplies stick input to the controller entry point, which updates a gait engine; its clock generates foot positions, solves inverse kinematics, and sends motor commands through an output abstraction (the sampled entry point uses a dummy output). Separate capabilities include gait definitions, forward/inverse kinematics, interpolation, and plotting. The graph reflects sampled calls and documented project scope; unsampled implementations are represented only where the tree supports their paths, and their wiring is omitted where uncertain.
Main entry points: kinematic_controller/main.py Controller entry · gait_engine.py Gait engine · gamepad_controller.py Gamepad polling · visualisation/main.py Visualisation entry
Components 21
Control runtime
- Controller entry
py_src/kinematic_controller/main.py - Gait engine
py_src/kinematic_controller/gait_engine.py - Controller data
py_src/data_structures/controller_input.py
Motion and kinematics
- Gait presets
py_src/kinematic_controller/gaits.py - Gait definition
py_src/kinematic_controller/gait_definition.py - Foot stepping
py_src/kinematic_controller/stepper.py - Inverse kinematics
py_src/kinematic_controller/ik_solver.py - Forward kinematics
py_src/kinematic_controller/fk_solver.py - Geometry types
py_src/data_structures
Hardware interface
- Gamepad polling
py_src/hardware_abstraction_layer/gamepad_controller.py - Input interface
py_src/hardware_abstraction_layer/input_layer.py - Output interface
py_src/hardware_abstraction_layer/output_layer.py - Dummy output
py_src/hardware_abstraction_layer/dummy_out.py
Interpolation and visualisation
- Interpolator API
py_src/interpolation/base.py - Catmull-Rom
py_src/interpolation/catmull_rom_spline.py - Lagrange interpolation
py_src/interpolation/lagrange.py - Visualisation entry
py_src/visualisation/main.py - Gait plots
py_src/visualisation/graph_3d_kinematics.py - Curve plots
py_src/visualisation/graph_3d_interpolated_curves.py - Joint-angle plots
py_src/visualisation/graph_angle.py
Other components
- Operator
Connections 13
- Operator → Gamepad polling: moves sticks
- Controller entry → Gamepad polling: polls input
- Gamepad polling → Controller data: builds data
- Controller entry → Gait engine: passes input
- Controller entry → Gait presets: selects preset
- Gait engine → Foot stepping: requests foot positions
- Gait engine → Inverse kinematics: solves positions
- Gait engine → Output interface: sends commands
- Controller entry → Dummy output: constructs output
- Dummy output → Output interface: implements
- Catmull-Rom → Interpolator API: implements
- Visualisation entry → Gait plots: plots gait
- Visualisation entry → Gait presets: supplies TROT