Skip to content

Add inverted-pendulum PPO example extension - #11

Merged
KraHsu merged 1 commit into
mainfrom
feat/inverted_pendulum
May 14, 2026
Merged

KraHsu merged 1 commit into
mainfrom
feat/inverted_pendulum

Conversation

@KraHsu

@KraHsu KraHsu commented May 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Register GeneLab-Inverted-Pendulum-v0 and GeneLab-Double-Inverted-Pendulum-v0 under examples/inverted_pendulum/. A single PD-controlled cart drives one or two underactuated hinge poles through rsl_rl PPO on the existing ManagerBasedRlEnv + BodyVelocitySensor stack.
  • play mode enables scene.mouse_interaction (from Add mouse-interaction plugin hook to ManagerBasedRlEnv #10) so a left-click + drag applies a spring force to the cart/pole while the policy keeps balancing.
  • Bilingual MkDocs walkthrough (docs/examples/inverted-pendulum.{en,zh}.md), examples/overview entries, a registration smoke test (tests/test_inverted_pendulum_examples.py), and pythonpath wiring in pyproject.toml so the test suite imports the extension without installation.

Test plan

  • uv run ruff check
  • uv run ruff format --check
  • uv run pyright
  • uv run pytest (includes the new registration smoke test)
  • uv run mkdocs build --strict
  • Manual: uv run genelab train GeneLab-Inverted-Pendulum-v0 --num-envs 64 --max-iterations 5 (Genesis-dependent, skipped in CI).
  • Manual: uv run genelab play GeneLab-Inverted-Pendulum-v0 --checkpoint <run>/model_150.pt --vis and verify left-click drag perturbs the cart while the policy recovers.

🤖 Generated with Claude Code

Register `GeneLab-Inverted-Pendulum-v0` and
`GeneLab-Double-Inverted-Pendulum-v0` under examples/inverted_pendulum/.
Single PD-controlled cart drives one or two underactuated hinge poles
through rsl_rl PPO on the existing ManagerBasedRlEnv + BodyVelocitySensor
stack. Play mode enables `scene.mouse_interaction` for spring-force
disturbance, with matching English/Chinese walkthrough pages and a
registration smoke test.
@KraHsu
KraHsu merged commit ad4bca6 into main May 14, 2026
3 checks passed
@KraHsu
KraHsu deleted the feat/inverted_pendulum branch May 14, 2026 08:51
KraHsu added a commit that referenced this pull request May 15, 2026
Add inverted-pendulum PPO example extension
KraHsu added a commit that referenced this pull request Jun 5, 2026
Add inverted-pendulum PPO example extension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant