Skip to content

Update 'Training Locomotion Policies with RL' page to reflect the need for the latest version of RSL-RL #33

Open
@S-Ali-Zaidi

Description

@S-Ali-Zaidi

Originally flagged here: Genesis-Embodied-AI/Genesis#895 (comment)

Please update the docs to reflect the need for using the newest version of RSL-RL!

I was just following along with them as instructed here:

# Install rsl_rl.
git clone https://github.com/leggedrobotics/rsl_rl
cd rsl_rl && git checkout v1.0.2 && pip install -e .

# Install tensorboard.
pip install tensorboard

On running the script, I was getting the error:

(.venv) ali@TheTower:~/Projects/Genesis$ /home/ali/Projects/Genesis/.venv/bin/python /home/ali/Projects/Genesis/Genesis/examples/locomotion/go2_train.py
[Genesis] [14:03:45] [INFO] ╭─────────────────────────────────────────────────────────────────────────────────────╮
[Genesis] [14:03:45] [INFO] │┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉ Genesis ┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉│
[Genesis] [14:03:45] [INFO] ╰─────────────────────────────────────────────────────────────────────────────────────╯
[Genesis] [14:03:45] [INFO] Running on [NVIDIA GeForce RTX 3050] with backend gs.cuda. Device memory: 5.69 GB.
[Genesis] [14:03:45] [INFO] 🚀 Genesis initialized. 🔖 version: 0.2.1, 🌱 seed: None, 📏 precision: '32', 🐛 debug: False, 🎨 theme: 'dark'.
[Genesis] [14:03:46] [INFO] Scene <333ecbc> created.
[Genesis] [14:03:46] [INFO] Adding <gs.RigidEntity>. idx: 0, uid: <503fdf9>, morph: <gs.morphs.URDF(file='/home/ali/Projects/Genesis/Genesis/genesis/assets/urdf/plane/plane.urdf')>, material: <gs.materials.Rigid>.
[Genesis] [14:03:46] [INFO] Adding <gs.RigidEntity>. idx: 1, uid: <aa8cf99>, morph: <gs.morphs.URDF(file='/home/ali/Projects/Genesis/Genesis/genesis/assets/urdf/go2/urdf/go2.urdf')>, material: <gs.materials.Rigid>.
[Genesis] [14:03:46] [INFO] Building scene <333ecbc>...
[Genesis] [14:03:48] [INFO] Compiling simulation kernels...
[Genesis] [14:03:53] [INFO] Building visualizer...
Traceback (most recent call last):
  File "/home/ali/Projects/Genesis/Genesis/examples/locomotion/go2_train.py", line 170, in <module>
    main()
  File "/home/ali/Projects/Genesis/Genesis/examples/locomotion/go2_train.py", line 164, in main
    runner = OnPolicyRunner(env, train_cfg, log_dir, device="cuda:0")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ali/Projects/Genesis/rsl_rl/rsl_rl/runners/on_policy_runner.py", line 61, in __init__
    actor_critic_class = eval(self.cfg["policy_class_name"]) # ActorCritic
                              ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'policy_class_name'
[Genesis] [14:03:53] [INFO] 💤 Exiting Genesis and caching compiled kernels...
(.venv) ali@TheTower:~/Projects/Genesis$ 

I was wondering why things weren't working when they were a couple days ago -- came here and saw the committed changes to the locomotion script! Look like it won't work if someone follows along with the exact instructions on the documentation page.

Upon installing the latest version of RSL-RL, i no longer have this issue!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions