-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
Describe the bug
Following the official documentation for the Newton Physics Sim-to-Real Policy Transfer workflow leads to a NameError during the velocity distillation training phase.
The root cause is a configuration inheritance issue. The G1_29_DOFs_VelocityDistillationRunnerCfg agent config inherits from a PPO-based configuration but fails to override the class_name attribute. As a result, it incorrectly retains the parent's class_name="OnPolicyRunner". The train.py script reads this incorrect name and attempts to launch the OnPolicyRunner with a StudentTeacherRecurrent policy, which is incompatible, causing the script to crash.
Steps to reproduce
Follow the official documentation for the Newton Physics Sim-to-Real Policy Transfer: https://isaac-sim.github.io/IsaacLab/main/source/experimental-features/newton-physics-integration/sim-to-real.html
Run the command for the 2. Distill the student policy step. The command is similar to:
./isaaclab.sh -p scripts/reinforcement_learning/rsl_rl/train.py --task=Velocity-G1-Distillation-v1 --num_envs=4096 --headless --load_run xxx --checkpoint model_xxx.pt
actor_critic_class = eval(self.policy_cfg.pop("class_name"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 1, in <module>
NameError: name 'StudentTeacherRecurrent' is not defined
Proposed fix:
@configclass
class G1_29_DOFs_VelocityDistillationRunnerCfg(G1_29_DOFs_FlatPPORunnerCfg):
# This line must be added to override the parent class name
class_name = "DistillationRunner"
Checklist
- I have checked that there is no similar issue in the repo (required)
- I have checked that the issue is not in running Isaac Sim itself and is related to the repo
Acceptance Criteria
[ ] The G1_29_DOFs_VelocityDistillationRunnerCfg configuration is corrected to include class_name = "DistillationRunner".
[ ] The velocity distillation training command from the Newton sim-to-real documentation executes successfully without a NameError.