Open Duck project's reference motion generator for imitation learning, based on Placo.
The reference motions are used in two RL works, one using mujoco playground here and another using Isaac Gym here
Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
uv run scripts/auto_waddle.py (-j?) --duck ["go_bdx", "open_duck_mini", "open_duck_mini_v2"] (--num <> / --sweep) --output_dir <>
Args :
-j?
number of jobs. Ifj
is not specified, will run sequentially. Ifj
is specified without a number, your computer will crash :) (runs with all available cores). Usej4
for example--duck
selects the duck type--sweep
generates all combinations of motion within the ranges specified inOpen_Duck_reference_motion_generator/open_duck_reference_motion_generator/robots/<duck>/auto_gait.json
--num
generates random motions--output_dir
self explanatory
This will generate polynomial_coefficients.pkl
uv run scripts/fit_poly.py --ref_motion <>
To plot :
uv run scripts/plot_poly_fit.py --coefficients polynomial_coefficients.pkl
### Replay
```bash
uv run scripts/replay_motion.py -f recordings/<file>.json
uv run open_duck_reference_motion_generator/gait_playground.py --duck ["go_bdx", "open_duck_mini", "open_duck_mini_v2"]
- The robots descriptions should be in a separate repository and imported as a submodule. This would help having duplicates of the same files, or with different versions etc.
- Validate that we can train policies with these motions (might have broken something during the port...)
- Fix small bugs in gait_playground (refreshing, changing robots ...)
- Nicer visualization ? Directly visualize using meshcat maybe.
- A document to specify the reference motion format, if someone wants to convert some mocap data to use for the imitation reward ?
- The repo duck themed, but it could be a generic motion generator based on placo for biped robots (will add sigmaban at some point)
- Sub TODO : explain how to add a new robot