Instructions to use tuanhqv123/tars-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- stable-baselines3
How to use tuanhqv123/tars-mini with stable-baselines3:
from huggingface_sb3 import load_from_hub checkpoint = load_from_hub( repo_id="tuanhqv123/tars-mini", filename="{MODEL FILENAME}.zip", ) - Notebooks
- Google Colab
- Kaggle
Download sim/render_fall.py from tuanhqv123/tars-mini: direct link, hf CLI and curl.
- Browser
- Download file 1.18 kB
-
https://huggingface.co/tuanhqv123/tars-mini/resolve/main/sim/render_fall.py
- Command line
-
hf download hf://tuanhqv123/tars-mini/sim/render_fall.py
-
curl -L -o render_fall.py https://huggingface.co/tuanhqv123/tars-mini/resolve/main/sim/render_fall.py
1.18 kB
| """GIF: fallen flat (legs folded) -> legs up -> over to the V/bridge -> close the V. Shows what actually happens.""" | |
| import math | |
| import v_liedown # noqa: F401 | |
| from v_liedown import M, TarsSim, s_curve | |
| from render2 import Recorder | |
| from confirm_all import SC09 | |
| def quat_x(deg): | |
| a = math.radians(deg) / 2 | |
| return [math.cos(a), math.sin(a), 0, 0] | |
| for face, sign, name in (("front", +1, "fall_attempt_A"), ("front", -1, "fall_attempt_B")): | |
| p = M.Params(mu=0.8, **SC09); s = TarsSim(p) | |
| s.d.qpos[3:7] = quat_x(90 if face == "front" else -90); s.d.qpos[2] = p.D / 2 + 0.002 | |
| rec = Recorder(s, [("side view", 0, -6, 0.8), ("3/4 view", 135, -18, 0.85)]) | |
| rec.caption = "1. Fallen flat, legs folded"; s.run(1.0) | |
| rec.caption = "2. Raise both legs up (90 deg)"; s_curve(s, dict(sL=sign * 90, sR=sign * 90), 2.5); s.run(0.5) | |
| rec.caption = "3. Keep swinging legs over to make the V (170 deg)"; s_curve(s, dict(sL=sign * 170, sR=sign * 170), 2.5); s.run(0.5) | |
| rec.caption = "4. Close the V (try to stand up)"; s_curve(s, dict(sL=0, sR=0), 6.0); s.run(1.0) | |
| rec.save(f"../results/{name}.gif", speedup=2) | |
| print(name, "final tilt", round(s.tilt_deg(), 1)) | |