# Incorrect forces are returned by RigidPrimView.get\_net\_contact\_forces()

**URL:** <https://forums.developer.nvidia.com/t/incorrect-forces-are-returned-by-rigidprimview-get-net-contact-forces/260686>\
**Category:** Isaac Sim\
**Created:** [July 22, 2023, 2:04am UTC](https://forums.developer.nvidia.com/t/incorrect-forces-are-returned-by-rigidprimview-get-net-contact-forces/260686 "2023-07-22T02:04:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jake.levy](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@jake.levy](https://forums.developer.nvidia.com/u/jake.levy)\
**Post date:** [July 22, 2023, 2:04am UTC](https://forums.developer.nvidia.com/t/incorrect-forces-are-returned-by-rigidprimview-get-net-contact-forces/260686/1 "2023-07-22T02:04:51Z")

</div>

I modified the “Hello World” Isaac Example to give the cube a mass of 1.0 kg and to add a RigidPrimView that I can call get\_net\_contact\_forces() on, following advice from [here](https://forums.developer.nvidia.com/t/would-isaac-sim-support-contact-force-tensor-on-rigid-bodies/235909/4). Gravity is set to 9.81 m/s^2, so the contact force should be 9.81 N. However 1.635e-01 N is reported by Isaac Sim. Code and output below.

```py
class HelloWorld(BaseSample):
    def __init__ (self) -> None:
        super(). __init__ ()
        return

    def setup_scene(self):

        world = self.get_world()
        world.scene.add_default_ground_plane()
        fancy_cube = world.scene.add(
            DynamicCuboid(
                prim_path="/World/random_cube",
                name="fancy_cube", 
                position=np.array([0, 0, 1.0]), 
                scale=np.array([0.5015, 0.5015, 0.5015]),
                color=np.array([0, 0, 1.0]),
                mass=1.0
            ))
        self._cube_contact = RigidPrimView(
            prim_paths_expr="/World/random_cube",
            name="cube_vew",
            reset_xform_properties=False,
            track_contact_forces=True,
            prepare_contact_sensors=True,
        )
        world.scene.add(self._cube_contact)
        return

    async def setup_post_load(self):
        self._world = self.get_world()
        self._cube = self._world.scene.get_object("fancy_cube")
        self._world.add_physics_callback("sim_step", callback_fn=self.print_cube_info) 
        return

    def print_cube_info(self, step_size):
        print(self._cube_contact.get_net_contact_forces())

```

![image](https://global.discourse-cdn.com/nvidia/original/4X/d/6/7/d67944446f1492136d2916157df7a5df2db32468.png)

---

<div class="post-metadata">

**Author:** ![jake.levy](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@jake.levy](https://forums.developer.nvidia.com/u/jake.levy)\
**Post date:** [July 22, 2023, 4:50pm UTC](https://forums.developer.nvidia.com/t/incorrect-forces-are-returned-by-rigidprimview-get-net-contact-forces/260686/2 "2023-07-22T16:50:02Z")

</div>

I figured this out. `get_net_contact_forces()` returns a contact impulse and you have to set the parameter `dt` to convert it to a force. For example:

```py
contact_force = my_rigid_prim_view.get_net_contact_forces(dt=sim_dt)

```

---

<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:** [August 5, 2023, 4:50pm UTC](https://forums.developer.nvidia.com/t/incorrect-forces-are-returned-by-rigidprimview-get-net-contact-forces/260686/3 "2023-08-05T16:50:50Z")

</div>

Closed on August 5, 2023, 4:50pm UTC

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