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_b.py from tuanhqv123/tars-mini: direct link, hf CLI and curl.
- Browser
- Download file 1.05 kB
-
https://huggingface.co/tuanhqv123/tars-mini/resolve/main/sim/render_b.py
- Command line
-
hf download hf://tuanhqv123/tars-mini/sim/render_b.py
-
curl -L -o render_b.py https://huggingface.co/tuanhqv123/tars-mini/resolve/main/sim/render_b.py
1.05 kB
| """Final demo GIF for design B: 2x ST3215-7.4V (legs, 360 deg) + 2x MG90S (height), 5 V, 1x18650.""" | |
| from cheap_designs import M, TarsSim, s_curve, cpg_walk, turn_left, turn_right, DESIGNS | |
| from render2 import Recorder | |
| s = TarsSim(M.Params(mu=0.8, **DESIGNS["B"])) | |
| rec = Recorder(s, [("3/4 view", 135, -18, 0.95), ("side view", 0, -6, 0.95)]) | |
| rec.caption = "Design B ($78): 1. Walk"; s.run(0.5); cpg_walk(s, T=2.4, cycles=2) | |
| rec.caption = "2. Turn left"; turn_left(s); turn_left(s) | |
| rec.caption = "3. Turn right"; turn_right(s); turn_right(s) | |
| rec.caption = "4. Lie down: open the V, fold legs over the top"; s.ramp(1.0, hL=0.0, hR=0.0); s.run(0.3) | |
| s_curve(s, dict(sL=170, sR=170), 6.0); s_curve(s, dict(sL=360, sR=360), 5.0); s.run(0.8) | |
| rec.caption = "5. Stand up: legs back over the top, close the V"; s_curve(s, dict(sL=170, sR=170), 5.0); s_curve(s, dict(sL=0, sR=0), 6.0); s.run(0.5) | |
| rec.caption = "Walk again"; cpg_walk(s, T=2.4, cycles=1); s.run(0.5) | |
| rec.save("../results/final_design_B.gif", speedup=3) | |
| print("final tilt", round(s.tilt_deg(), 1)) | |