Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Setting Friction Parameters for an Actor #800

Open
SumeetBatra opened this issue Jan 14, 2025 · 1 comment
Open

Problem with Setting Friction Parameters for an Actor #800

SumeetBatra opened this issue Jan 14, 2025 · 1 comment

Comments

@SumeetBatra
Copy link

Hi all. Following the tutorial you all provided, I'm trying to do some simple physics domain randomizations of the cube in the PickCube task like so:

        for obj in self.cube._objs:
            # modify cube friction
            dyn_friction_range = self.domain_rand_cfg['cube']['dyn_friction_range']
            static_friction_range = self.domain_rand_cfg['cube']['static_friction_range']
            for shape in obj.components[1].collision_shapes:
                shape.physical_material.dynamic_friction += np.random.uniform(
                dyn_friction_range[0], dyn_friction_range[1])
                shape.physical_material.static_friction += np.random.uniform(
                static_friction_range[0], static_friction_range[1])

However when I do this, it seems that setting the friction values for one object in self.cube._objs sets the same values for all the actor objects. Is this a bug or am I doing something wrong? Thanks!

@StoneT2000
Copy link
Member

This sounds like a bug. Could you help print the object id

# something like this
print(id(shape), id(shape.physical_material))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants