# How to apply force on Rigid Body/Joints using Standalone python scripting

**URL:** <https://forums.developer.nvidia.com/t/how-to-apply-force-on-rigid-body-joints-using-standalone-python-scripting/251959>\
**Category:** Isaac Sim\
**Tags:** physx\
**Created:** [May 2, 2023, 11:38am UTC](https://forums.developer.nvidia.com/t/how-to-apply-force-on-rigid-body-joints-using-standalone-python-scripting/251959 "2023-05-02T11:38:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksu1rng](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/ksu1rng/32/241153_2.png) [@ksu1rng](https://forums.developer.nvidia.com/u/ksu1rng)\
**Post date:** [May 2, 2023, 11:38am UTC](https://forums.developer.nvidia.com/t/how-to-apply-force-on-rigid-body-joints-using-standalone-python-scripting/251959/1 "2023-05-02T11:38:09Z")

</div>

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!

```auto
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](https://forums.developer.nvidia.com/uploads/short-url/sw5HFVq6mrbuezrvvUQQsBFvHKK.usd) (8.3 KB)

---

<div class="post-metadata">

**Author:** ![AlesBorovicka](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/alesborovicka/32/21824_2.png) [@AlesBorovicka](https://forums.developer.nvidia.com/u/AlesBorovicka)\
**Post date:** [May 2, 2023, 1:34pm UTC](https://forums.developer.nvidia.com/t/how-to-apply-force-on-rigid-body-joints-using-standalone-python-scripting/251959/2 "2023-05-02T13:34:32Z")

</div>

Hi,  
you should be able to use standard USD schema python code to do this. All physics demos are written and python, you can inspect the code. Open Window-\>Simulation-\>Physics-\>Demos, there each demo does have a python snippet code to showcase the feature.  
Additionally you can check the doxygen documentation for UsdPhysics:  
[https://openusd.org/release/api/usd\_physics\_page\_front.html](https://openusd.org/release/api/usd_physics_page_front.html)

Or for PhysxSchema:  
[http://omniverse-docs.s3-website-us-east-1.amazonaws.com/omni\_usd\_schema\_physics/104.2/index.html#purpose\_and\_scope](http://omniverse-docs.s3-website-us-east-1.amazonaws.com/omni_usd_schema_physics/104.2/index.html#purpose_and_scope)

In general in python all works the same way as USD as all are USD schemas build on top of USD.

You can also check the omni.physx programmer guide, that does have examples for UsdPhysics, PhysxSchema python usage:  
[http://omniverse-docs.s3-website-us-east-1.amazonaws.com/omni\_physics/104.2/source/extensions/omni.physx/docs/index.html](http://omniverse-docs.s3-website-us-east-1.amazonaws.com/omni_physics/104.2/source/extensions/omni.physx/docs/index.html)

Regards,  
Ales

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [May 16, 2023, 1:35pm UTC](https://forums.developer.nvidia.com/t/how-to-apply-force-on-rigid-body-joints-using-standalone-python-scripting/251959/3 "2023-05-16T13:35:30Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
