Hello,
I am trying to create a very basic simulation of a point mass where I want to move the mass in a circle of constant radius.
To achieve this, I followed these steps:
- I created a scene in USD file format using the GUI option.
- I applied the Physics API (Mass, Force, and Rigid Body) to the sphere (prims) via the GUI.
My question:
I know that I can use the GUI option to set different variable values such as mass, linear velocity, and force. However, I want to set these variables through Python scripting. I couldn’t find the documentation for this. I am attaching the code and USD file for reference.
I hope this helps!
pointMass_path = str(_ROOT_DIR) + "/usd/point_mass/point_mass.usd"
my_world = World(stage_units_in_meters = 1.0,
physics_prim_path = "/World/physicsScene")
my_world.scene.add_default_ground_plane()
add_reference_to_stage(usd_path = pointMass_path,
prim_path="/World/object1")
my_world.reset()
while 1:
my_world.step(render=True)
simulation_app.close()
point_mass.usd (8.3 KB)