I’m working with Isaac Sim 4.2.0 and have successfully simulated the trajectory of a DynamicSphere (RigidBody) launched from the origin(0.0, 0.0, 0.0) with a specific initial velocity (with y and z components), saving the position data at each step to a .npy file using the SimulationApp paradigm.
Now, I need to incorporate air resistance. I come across the Force Field - Drag documentation and another user topic related to Wind Force Fields.
My question revolves around integrating this Force Field using Python scripting within my existing SimulationApp-based setup. I’m trying to avoid the very low-level prim manipulation shown in some PhysX examples (like extsPhysics/omni.physx.forcefields/omni/physxforcefields/scripts/tests.py) and stick closer to the omni.isaac.core and examples utilities if possible.
I attempted to add the Force Field prim and configure its schema (ForceFieldSchema) in my script, but the resulting .npy trajectories are identical to those without the force field, indicating it’s not being applied.
I suspect setting up the equivalent scene via the GUI might work correctly, but I need the programmatic control and the ability to easily save trajectory data step-by-step to a .npy file, which is already working in my script.
Could someone provide guidance or point me towards an example of correctly adding and enabling a ForceFieldDrag (or any force field) programmatically within a SimulationApp workflow so that it affects rigid bodies? Is there a specific step I might be missing? I have attached the python script that I am using for your reference (zipped).
projectile_drag_force_field.py.zip (3.6 KB)
Thanks for any assistance!
Isaac Sim Version
4.2.0
Operating System
Ubuntu 22.04
GPU Information
- Model: RTX 4500 Ada Generation
- Driver Version: 535.183.01