4.5.0
4.2.0
4.1.0
4.0.0
4.5.0
2023.1.1
2023.1.0-hotfix.1
Other (please specify):
Operating System
Ubuntu 22.04
Ubuntu 20.04
Windows 11
Windows 10
Other (please specify):
GPU Information
Model: RTX 6000 Ada
Driver Version: 575.57.08
Topic Description: How to affect objects with force fields?
Detailed Description
I’ve opened up one of the demos from the Force Fields extension. I’m trying to apply the force to new objects I add to the scene, but it doesn’t seem to be working.
Open Physics Demo Scenes → Force Fields → Explode demo
Add a sphere
On the sphere, Add → Physics → Colliders Preset
Press play
Sphere simply drops from gravity, is not affected by the force field :(
Screenshots or Videos
By the way, the USD file is sideways and everything is scaled by 100. I guess it was created before Isaac Sim changed the convention to Z-up and meters.
@ajong USD orientation aside, which appears to be what the source code has defined for the demo, what you will need to make the manually created sphere be influenced by the forces in the scene is to make sure you have the following:
Collider
Rigid Body
Mass
you can add the first two through Add > Physics > Rigid Body with Colliders Preset, and only when you have either collider or rigidbody, mass will show up in the Add > Physics menu. you were really close!
and once you have mass, you will want to set the Density to 1.0 if you wish to have the same behavior as the boxes in the demo.
after you have the above defined, you should be able to run the simulation to see the sphere get sucked up before ‘exploded’ along with the rest of the boxes.
manually? not at all. Below is a snippet to set density programmatically:
import isaacsim.core.utils.stage as stage_utils
from isaacsim.core.prims import SingleRigidPrim
# create a Cube at the given path
stage_utils.get_current_stage().DefinePrim("/World/Xform", "Xform")
stage_utils.get_current_stage().DefinePrim("/World/Xform/Cube", "Cube")
# wrap the prim as rigid prim
prim = SingleRigidPrim("/World/Xform/Cube")
prim.set_density(1.0)
here’s a bit more context on issacsim.core.prim API for SingleRigidPrim: