Train and deploy your own humanoid robot controller in 1k lines of Python
kbotvid2_noaudio.mp4
kbotvid1_noaudio.mp4
You can use this repository as a starting point
- Clone this repository:
git clone https://www.github.com/kscalelabs/kbot-joystick
cd kbot-joystick- Create a new Python environment (we require Python 3.11 or later)
- Install the package with its dependencies:
pip install -r requirements.lock
pip install 'jax[cuda12]' # If using GPU machine, install Jax CUDA libraries- Train a policy: Policy converges in about 1hr, but reward keeps going up for about 24hrs
python -m train- Convert the checkpoint to a
kinfermodel:
python -m convert /path/to/ckpt.bin /path/to/model.kinfer- Visualize the converted model:
kinfer-sim assets/model.kinfer kbot-headlessIf you encounter issues, please consult the ksim documentation or reach out to us on Discord.
To see all the available command line arguments, use the command:
python -m train --helpTo visualize training your model without using kscale-mujoco-viewer, use the command:
python -m train run_mode=view