Setting rigit shape properties doesn't work


I am running the following code, but it doesn’t seem to affect the properties of the actor:

ball_options = gymapi.AssetOptions()
ball_options.density = 200
ball_options.thickness = 0.001
ball_asset = self.gym.create_sphere(self.sim, 0.05, ball_options)

rsp = gymapi.RigidShapeProperties()
rsp.restitution = 0
rsp.compliance = 1

---other environment initialisation code here---

ball_actor = self.gym.create_actor(env_ptr, ball_asset, ball_start_pose, "ball", i, 0, 0)
self.gym.set_actor_rigid_shape_properties(env_ptr, ball_actor, [rsp])
a = self.gym.get_actor_rigid_shape_properties(env_ptr, ball_actor)

I am using PhysX and GPU tensors if that helps. When I debug the contents of ‘a’ I can see it’s all 0s instead of having a 1 in ‘compliance’. Any ideas?


Ran into the same problem and created a github issue here.

I had the same problem when I use GPU. I ‘solve’ it by running the physics engine with CPU, and the properties change works.