File tree Expand file tree Collapse file tree
source/robot_lab/robot_lab/tasks/manager_based/locomotion/velocity/config/quadruped/anymal_d Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -240,10 +240,24 @@ Others (**Experimental**)
240240 ``` bash
241241 # Train
242242 python scripts/reinforcement_learning/rsl_rl/train.py --task=RobotLab-Isaac-Velocity-Rough-Anymal-D-v0 --headless --agent=rsl_rl_with_symmetry_cfg_entry_point --run_name=ppo_with_symmetry_data_augmentation agent.algorithm.symmetry_cfg.use_data_augmentation=true
243- # Train
243+
244+ # Play
244245 python scripts/reinforcement_learning/rsl_rl/play.py --task=RobotLab-Isaac-Velocity-Rough-Anymal-D-v0 --agent=rsl_rl_with_symmetry_cfg_entry_point --run_name=ppo_with_symmetry_data_augmentation agent.algorithm.symmetry_cfg.use_data_augmentation=true
245246 ```
246247
248+ - Training and distilling Anymal D
249+
250+ ``` bash
251+ # Train the teacher agent
252+ python scripts/reinforcement_learning/rsl_rl/train.py --task=RobotLab-Isaac-Velocity-Flat-Anymal-D-v0 --headless
253+
254+ # Distill the teacher agent into a student agent
255+ python scripts/reinforcement_learning/rsl_rl/train.py --task=RobotLab-Isaac-Velocity-Flat-Anymal-D-v0 --headless --agent=rsl_rl_distillation_cfg_entry_point --load_run teacher_run_folder_name
256+
257+ # Play the student agent
258+ python scripts/reinforcement_learning/rsl_rl/play.py --task=RobotLab-Isaac-Velocity-Flat-Anymal-D-v0 --num_envs 64 --agent rsl_rl_distillation_cfg_entry_point
259+ ```
260+
247261> [ !NOTE]
248262> If you want to control a ** SINGLE ROBOT** with the keyboard during playback, add ` --keyboard ` at the end of the play script.
249263>
Original file line number Diff line number Diff line change 1818 "rsl_rl_cfg_entry_point" : f"{ agents .__name__ } .rsl_rl_ppo_cfg:AnymalDFlatPPORunnerCfg" ,
1919 "rsl_rl_with_symmetry_cfg_entry_point" : f"{ agents .__name__ } .rsl_rl_ppo_cfg:AnymalDFlatPPORunnerWithSymmetryCfg" ,
2020 "cusrl_cfg_entry_point" : f"{ agents .__name__ } .cusrl_ppo_cfg:AnymalDFlatTrainerCfg" ,
21+ "rsl_rl_distillation_cfg_entry_point" : (
22+ f"{ agents .__name__ } .rsl_rl_distillation_cfg:AnymalDFlatDistillationRunnerCfg"
23+ ),
2124 "cusrl_with_symmetry_cfg_entry_point" : (
2225 f"{ agents .__name__ } .cusrl_ppo_cfg:AnymalDFlatTrainerCfgWithSymmetryAugmentation"
2326 ),
Original file line number Diff line number Diff line change 1+ # Copyright (c) 2022-2025, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
2+ # All rights reserved.
3+ #
4+ # SPDX-License-Identifier: BSD-3-Clause
5+
6+ from isaaclab .utils import configclass
7+
8+ from isaaclab_rl .rsl_rl import (
9+ RslRlDistillationAlgorithmCfg ,
10+ RslRlDistillationRunnerCfg ,
11+ RslRlDistillationStudentTeacherCfg ,
12+ )
13+
14+
15+ @configclass
16+ class AnymalDFlatDistillationRunnerCfg (RslRlDistillationRunnerCfg ):
17+ num_steps_per_env = 120
18+ max_iterations = 300
19+ save_interval = 50
20+ experiment_name = "anymal_d_flat"
21+ obs_groups = {"policy" : ["policy" ], "teacher" : ["policy" ]}
22+ policy = RslRlDistillationStudentTeacherCfg (
23+ init_noise_std = 0.1 ,
24+ noise_std_type = "scalar" ,
25+ student_obs_normalization = False ,
26+ teacher_obs_normalization = False ,
27+ student_hidden_dims = [512 , 256 , 128 ],
28+ teacher_hidden_dims = [512 , 256 , 128 ],
29+ activation = "elu" ,
30+ )
31+ algorithm = RslRlDistillationAlgorithmCfg (
32+ num_learning_epochs = 2 ,
33+ learning_rate = 1.0e-3 ,
34+ gradient_length = 15 ,
35+ )
Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ def __post_init__(self):
3030 self .observations .policy .base_ang_vel .scale = 0.25
3131 self .observations .policy .joint_pos .scale = 1.0
3232 self .observations .policy .joint_vel .scale = 0.05
33- self .observations .policy .base_lin_vel = None
34- self .observations .policy .height_scan = None
33+ # self.observations.policy.base_lin_vel = None
34+ # self.observations.policy.height_scan = None
3535
3636 # ------------------------------Actions------------------------------
3737 # reduce action scale
You can’t perform that action at this time.
0 commit comments