Skip to content

[Question] Proper way to implement domain randomization on actuator gains? #1604

Description

@sdfzz

Hi,

I'm trying to implement domain randomization on Unitree G1 robot.

To randomize actuator gains, I've added the following to '/manager_based/locomotion/velocity/config/g1/flat_env_cfg.py':

@configclass
class G1Events(EventCfg):    
    actuator_gain = EventTerm(
        func=mdp.randomize_actuator_gains,
        mode="startup",
        params={
            "asset_cfg": SceneEntityCfg("robot", joint_names=".*"),
            "stiffness_distribution_params": (0., 0.),
            "damping_distribution_params": (0., 0.),
            "operation": "add",  
            "distribution": "uniform" 
        },
    )

It is my understanding that this should NOT affect the training since I'm adding zero to actuator stiffness and damping gains.

However, when I run the training, with this added randomization, I get:

Learning iteration 243/3000
Mean reward: -10.49

Without this randomization:

Learning iteration 243/3000
Mean reward: 16.69

So, the new randomization is affecting the training somehow...I've tried this multiple times, and got the same result.

Unless this is a bug, I feel like I'm missing something

Can anyone help?

Any help would be appreciated

Regards,

Steve

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions