Realism of default rigid body properties?

I created a cube primitive in Isaac Gym similar to the franka_cube_ik.py example. Inspecting the RigidBodyProperties after creation I was quite surprised to find the default value for the mass was 240kg, the inertia values along the diagonal are on the order of 10-20, and looking in the AssetOptions used to create the asset the density defaulted to 1000.

A couple points here:

  1. Those are insane values, and I’m confused how the simulation can even run with them. The cube dimensions are roughly 4.5cm, and this suggests it weighs 240kg. How is the robot picking it up? The documentation indicates those values are kg, is it something different? Grams maybe?
  2. The documentation indicates the density on AssetOptions is used when mass/inertia are not set. But the asset is created first and then body properties are set. Does this mean that whenever you create it with gym.create_actor and then do gym.set_rigid_body_properties the mass/inertia you set will then override whatever was being computed based on the density?

Here is more or less what I’m doing, and then I retrieve the RigidBodyProperties and print out the values:

asset_options = gymapi.AssetOptions()
asset_options.fix_base_link = false
obj_asset = gym.create_box(sim, x, y, z, asset_options)

obj_pose = gymapi.Transform()
obj_handle = gym.create_actor(env, obj_asset, obj_pose, "box", 0, 0)
props = gym.get_actor_rigid_body_properties(env, obj_handle)[0]

I think the values make sense if they’re in grams, so does that mean density should be in units g/m^3 and mass is in grams? If that’s true though I don’t understand how the 240g mass got computed for my box with dimensions 0.045m x 0.045m x 0.045m and density 1000g. I’d be curious to know how the mass gets set when you don’t manually set it.

Hi @adamconkey,

I can’t repro this issue on our end. I took your code snippet and substituted the box dimensions as 4.5cm per side:

asset_options = gymapi.AssetOptions()
asset_options.fix_base_link = False
obj_asset = gym.create_box(sim, 0.045, 0.045, 0.045, asset_options)

obj_pose = gymapi.Transform()
obj_handle = gym.create_actor(env, obj_asset, obj_pose, "box", 0, 0)
props = gym.get_actor_rigid_body_properties(env, obj_handle)[0]
print(props.mass)

The mass it prints is 0.091, which is correct in kg. Is it possible that your x, y, and z values were not what you expected?

If the issue persists, please let me know. Perhaps something else is amiss.

Hi @lwawrzyniak, thanks for the response. I’m surprised by this, I’ve been having to specify in grams for the manipulations to make sense (if I use kg the box is too light and the Franka knocks it out of the way when trying to grasp). I will try to get a minimal working example that shows the problem.

I did make a mistake when I was debugging so things are as expected now, however I think the density must be in units of grams/m^3, because the default value is 1000. The documentation says kg/m^3 so that may be one small thing to change.