Skip to content

Repository files navigation

KangEngine

Character animation and GPU-parallel physics simulation in C++ and Python.
Built for robot learning, motion workflows, and interactive visualization.

Official Documentation PyPI Python License: MIT

Parallel robotics simulation in KELab

Task Framework Environments Environment Step FPS Step + Inference FPS Step + Inference + Train FPS
Cartpole KELab (KangEngine) 4096 1,153,317 914,046 527,070
Cartpole IsaacLab v2.3.2 (local) 4096 978,112 794,296 491,239
G1 Rough KELab (KangEngine) 4096 104,009 95,889 84,954
G1 Rough IsaacLab v2.3.2 (local) 4096 85,039 85,122 76,552

GPU-parallel simulation and training performance benchmarks.
Headless, RTX 4090 + i7-13700K; FPS counts environment control steps. Single runs with differing software stacks and simulation implementations. Benchmark details.

Features

  • GPU-parallel simulation: PhysX rigid bodies and articulated robots across thousands of environments on Linux/NVIDIA.
  • Robot learning: Train policies with KELab, a reinforcement-learning framework built on KangEngine with RL-Games and RSL-RL support, or use KangEngine as a simulation backend for MimicKit.
  • Character motion: BVH/FBX motion visualization, SMPL/AMASS workflows, skeletal animation, and retargeting.
  • Visualization: Interactive C++/OpenGL rendering for KangEngine and Newton simulation workflows.

Quick Start

Use Python 3.12 in a virtual environment:

uv venv --python python3.12
source .venv/bin/activate
uv pip install kangengine
  • OS: macOS 26+ (Apple Silicon), Ubuntu 24.04 (x86-64)
  • Python: 3.12
  • Simulation: PhysX 5.1 CPU on macOS; PhysX 5.8 CPU/GPU on Ubuntu
  • Dependencies: OpenGL 4.1+ for visualization; NVIDIA driver 580+ for CUDA 13 on Ubuntu

See Installation for details.

import kangengine as ke


class HelloApp(ke.App):
    def setup(self):
        self.materials = self.create_standard_materials()
        self.scene.add_ground("/ground", scale=10.0)
        box = self.scene.add_mesh(
            "/box",
            ke.geometry.create_cube_data(1.0),
            self.materials.pbr,
            color=ke.Vec4(0.8, 0.3, 0.02, 1.0),
        )
        box.set_local_translation(ke.Vec3(0.0, 0.5, 0.0))
        self.set_camera_view([3.0, 2.5, 4.0], [0.0, 0.5, 0.0])


app = HelloApp()
app.initialize(width=1920, height=1080, hide_ui=False, up_axis=ke.UpAxis.Y)
app.start()

See Hello App for lifecycle callbacks.

Examples

Workflow Start here
Create a scene and manipulate objects Hello App / First Scene
Drop a ball with physics First Simulation
Load and simulate articulated robots Articulation
Load and play character motion Load Motion
Train RL policies with KELab KELab / Benchmarks
Train RL policies with Mimickit MimicKit
Visualize Newton simulations Newton integration

Complete scripts are in python/examples. Clone the repository to run those files; they are separate from the installed Python package.

License

KangEngine is licensed under the MIT License. Bundled third-party components retain their own licenses.

Acknowledgments

Built with NVIDIA PhysX and OpenUSD, with inspiration from MimicKit, Isaac Lab, Newton, SAPIEN, GenoViewPython, and AI4AnimationPy.

About

C++/Python engine for character motion, robotics simulation, and visualization.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages