Getting contact force of object

Hi,

If I want to get the contact forces of an object that I imported using the URDF importer (there is only one link, link_object), how should I set the parameters like contact_filter_prim_paths_expr?

I have set the parameters for RigidPrimView as shown below, but nothing is being detected by get_contact_force_data.

Is there any solution?

Thank you in advance.

        self.contact_filter_prim_paths_expr = ["/World/Object/*/link_object"]
        # self.contact_filter_prim_paths_expr = ["/World/Object/*/link_object/Xform"]
        # self.contact_filter_prim_paths_expr = ["/World/Object/*/Xform"]

        self._objects = RigidPrimView(prim_paths_expr="/World/Object/*/link_object", name="object_view",
                                      contact_filter_prim_paths_expr=self.contact_filter_prim_paths_expr, max_contact_count=1) 
        scene.add(self._objects)

contact_forces = object_views.get_contact_force_data()

see this documentation page for more details on how to get contact data
https://docs.omniverse.nvidia.com/isaacsim/latest/how_to_guides/environment_setup.html?highlight=rigidContactView#create-rigidcontactview
the contact_filter_prim_paths_expr is a set of prims which you would like to see their contact interaction with the prims selected by prim_paths_expr

2 Likes

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