Rigid Body Mass#

Code

RB.007

Validator

Compatibility

openusd

Tags

💎

Summary#

Rigid bodies or their descendent collision shapes should have a mass specification.

Description#

Rigid bodies or their descendent collision shapes must have a mass specification using the physics:mass attribute. The mass unit is specified in kilograms per unit.

Why is it required?#

  • If mass is not specified, simulators will compute mass automatically. This is often inaccurate as objects are modelled without internal details. Specifying mass allows for more accurate simulation.

Examples#

# Invalid: No mass specified

def Xform "RobotHead" () {
   prepend apiSchemas = ["PhysicsRigidBodyAPI"]

   def Mesh "Head" (
      prepend apiSchemas = ["PhysicsCollisionAPI"]
   ) {
   }

   # Valid: Mass specified
   def Cube "Jaw" (
      prepend apiSchemas = ["PhysicsCollisionAPI"]
   ) {
      physics:mass = 1.0
   }
}

# Valid: Mass specified on Rigid Body
def Xform "RobotBody" () {
   prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"]
   physics:mass = 1.0

   def Mesh "Body" (
      prepend apiSchemas = ["PhysicsCollisionAPI"]
   ) {
   }
  
   def Cube "Leg" (
      prepend apiSchemas = ["PhysicsCollisionAPI"]
   ) {      
   }
}

How to comply#

  • Add the physics:mass attribute to the rigid body.

For More Information#