NOTE: REQUIRES Python 3.8 BC THAT'S WHAT THE UNITREE LIBRARY IS COMPILED FOR FOR SOME REASON
-
Copy or symlink Go1's lib into the two following folders:
lib
andunitree_api_wrapper/lib/
-
Run
pip install -e .
When you swap batteries and first boot up the robot, the following applies:
- Make sure you boot up the robot always in the same flat resting position, NOT on a rack/gantry. When you switch batteries, take it off the rack/gantry
- You will know that booting is done when the robot stands up.
- When the robot is standing up, it's running what's called "sport mode", which means it will listen to the gamepad for remote control and when you send commands they will clash with that.
- So you need to terminate "sport mode". To do that run
./kill-sport-mode.sh
(password is123
). If you've done that correctly, the robot will lie down. And then it's ready to be used with this library
IMPORTANT:
This works best if you don't have to estimate the linear/angular velocity from IMU. There are 2 tasks in https://github.com/simonchamorro/legged-gym-rl/ that support this:
a1_flat_novel
and
go1_flat_novel
The difference between go1_flat_novel
and go1_flat
is that the former is trained without access to the ground truth linear and angular velocities of the robot body.
(Make sure you're using a jitted policy - see README over here: https://github.com/simonchamorro/legged-gym-rl/tree/main/legged_gym)
- Copy your policy into the ./policies directory,
- Then cd into the scripts folder
cd scripts
- Edit the file
05-run-base-policy.py
and replace thepolicy_path
parameter with the name of your policy - Run the script
python 05-run-base-policy.py
- ...
- Profit