Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

Latest commit

 

History

History
30 lines (21 loc) · 3.19 KB

README.md

File metadata and controls

30 lines (21 loc) · 3.19 KB

Bevy Quadruped Neural Control

MIT/Apache 2.0 Rust

Control quadruped robot in simulation using neural network. These demos use bevy_mujoco (mujoco physics for bevy) and sonos/tract (invoke neural networks in Rust) to make an environment with neurally-controlled quadruped robot Unitree A1.

app.2023-01-04.20-08-47.mp4
Example Description
examples/bevy_rl_rest.rs Tuns Unitree A1 simulation wrapped as Reinforcement Learning Gym envronment with bevy_rl. It also rust REST API so you can control a robot from another environment such as python.
python/policy.py An example how to control a robot with trained stable_baselines3/SAC policy from python env
python/run_onnx_policy.ipynb Exports PyTorch stable_baselines3 SAC policy to Open Neural Network Exchange format and runs the policy from python env
examples/a1_walk.rs Runs Unitree A1 simulation and ONNX neural network to control it all in Rust env

Details on control system synthesis here.

Running Neural Network in Rust Environment with Sonos Tract

cargo run --example a1_walk

Running Rust Simulator and Neural Networks in Python

cargo run --example bevy_rl_rest &
cd python && python policy.py