How to update inertia tensor causing unstability

Hello, I am trying to model a morphing drone with Isaac Gym.

I am using the below function inside the pre_physics_step.

self.gym.set_actor_rigid_body_properties(env_handle, actor_handle, rb_props, False)

Although I am not changing the value(updating to the same value), whenever it sets the props, the simulation becomes unstable, and the drone shakes.

Even If I get the properties and immediately set them with the acquired value, as below, it still happens.

rb_props = self.gym.get_actor_rigid_body_properties(env_handle, actor_handle)
self.gym.set_actor_rigid_body_properties(env_handle, actor_handle, rb_props, False)

Q1. What is the property “flags”, under isaacgym.gymapi.RigidBodyProperties? It is not written in the doc. The default value is 0. It is about “isaacgym.gymapi.BodyFlags”, but no more info about what it is.

Q2. Is there a more clever way to set the inertia tensor while the simulation is running?

Before Update: inertia tensor values
x: 0.05000000074505806, 0.0, 0.0
y: 0.0, 0.05000000074505806, 0.0
z: 0.0, 0.0, 0.05000000074505806
Before Update: inv inertia tensor values
x: 20.0, 0.0, 0.0
y: 0.0, 20.0, 0.0
z: 0.0, 0.0, 20.0
Before Update: com
com:  Vec3(0.000000, 0.000000, 0.000000)
Before Update: Mass, InvMass
mass:  1.899999976158142
invMass:  0.5263158082962036
Before Update: flags
flags:  0
After Update: inertia tensor values
x: 0.05000000074505806, 0.0, 0.0
y: 0.0, 0.05000000074505806, 0.0
z: 0.0, 0.0, 0.05000000074505806
After Update: inv inertia tensor values
x: 20.0, 0.0, 0.0
y: 0.0, 20.0, 0.0
z: 0.0, 0.0, 20.0
After Update: com
com:  Vec3(0.000000, 0.000000, 0.000000)
After Update: Mass, InvMass
mass:  1.899999976158142
invMass:  0.5263158082962036
After Update: flags
flags:  0

found this helpful.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.