Skip to content

Custom friction settings not taking effect during training, resulting in high unintended wheel-ground friction #96

Description

@Lisalsj

Hi team,

First, thank you for your excellent work on this project. I'm currently using the walk-these-ways framework and implementing a wheeled low-profile robot that relies on low friction under the trunk/wheel to enable sliding-based locomotion.

To achieve this, I added a custom function to set friction values differently for specific body parts (e.g., high for feet, low for trunk/wheel). The function is called set_material_properties() and is defined as follows:

def set_material_properties(self):  
    for env_id in range(self.num_envs):  
        actor_handle = self.actor_handles[env_id]  
        props = self.gym.get_actor_rigid_shape_properties(self.envs[env_id], actor_handle)  

        for i, prop in enumerate(props):  
            body_name = self.gym.get_actor_rigid_body_names(self.envs[env_id], actor_handle)[i]  

            if "foot" in body_name.lower():  
                prop.friction = 4.0            
            elif "calf" in body_name:
                prop.friction = 4.0
            elif "wheel" in body_name:
                prop.friction = 0.0  # intended to slide
            else:  
                prop.friction = 0.0  # e.g., trunk

        self.gym.set_actor_rigid_shape_properties(self.envs[env_id], actor_handle, props)

I called this function at the end of both create_envs() and create_sim() (in a modified version of LeggedRobot).

Despite setting the wheel friction to 0.0, I observe that when the wheel touches the ground, there is significant friction, making it nearly impossible to glide using the wheel (contrary to the intended behavior).

more information:
Cfg.domain_rand.randomize_friction = False

        static_friction = 1
        dynamic_friction = 1

May I ask how friction is computed between the terrain and the robot’s body or feet?
If different friction values are assigned to various parts of the robot, how can we ensure that these settings take effect properly during simulation?

Thanks
Image

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