Skip to content

[Question] Contact Sensor force not showing x,y directional force #2074

Closed

Description

@hojae-io

Hi,

I'm using contact sensor for my humanoid foot.
But when I retrieve the contact force, I only detect z-directional force and x,y-directional force are nearly 0.
But obviously there should be x,y-directional frictional force exerted on the foot.

I don't know if this is just inherent problem of contact sensor where it can only detect normal force?
Or I'm using incorrectly?

For more information,
the collision geometry of my foot is long-thin cylinder.

And my code is contact_sensor.data.net_forces_w

And I get the value as below:

tensor([[0.0000e+00, 0.0000e+00, 0.0000e+00],
[0.0000e+00, 0.0000e+00, 0.0000e+00],
[0.0000e+00, 0.0000e+00, 0.0000e+00],
[0.0000e+00, 0.0000e+00, 0.0000e+00],
[0.0000e+00, 0.0000e+00, 0.0000e+00],
[7.9538e-05, 0.0000e+00, 6.6721e+02],
[0.0000e+00, 0.0000e+00, 0.0000e+00],
[0.0000e+00, 0.0000e+00, 0.0000e+00],
[0.0000e+00, 0.0000e+00, 0.0000e+00],
[0.0000e+00, 0.0000e+00, 0.0000e+00],
[6.4743e-05, 0.0000e+00, 5.4310e+02],
[0.0000e+00, 0.0000e+00, 0.0000e+00],
[0.0000e+00, 0.0000e+00, 0.0000e+00],
[0.0000e+00, 0.0000e+00, 0.0000e+00],
[0.0000e+00, 0.0000e+00, 0.0000e+00],
[0.0000e+00, 0.0000e+00, 0.0000e+00],
[0.0000e+00, 0.0000e+00, 0.0000e+00],
[0.0000e+00, 0.0000e+00, 0.0000e+00],
[0.0000e+00, 0.0000e+00, 0.0000e+00],
[0.0000e+00, 0.0000e+00, 0.0000e+00],
[0.0000e+00, 0.0000e+00, 0.0000e+00]])

Please let me know if there's better way to detect the 'correct' xyz contact force for foot.

Thank you!

Activity

  1. RandomOakForest commented on Mar 14, 2025

    @RandomOakForest
    Collaborator

    Thank you for posting this. We are reviewing this with the team.

  2. RandomOakForest commented on Mar 14, 2025

    @RandomOakForest
    Collaborator

    Following up, this is an Isaac Sim issue, and the forces are not being updated as expected. We have tagged this for the team to fix.

  3. added
    enhancement
    on Mar 14, 2025
  4. kousheekc commented on Mar 18, 2025

    @kousheekc
    Contributor

    I have a similar problem. I have a contact sensor attached to a RigidObject and I want to not only measure the normal forces caused by an interaction but also the friction forces caused by dragging the rigid object along a surface. Is this the correct approach to use the ContactSensor from IsaacLab?

    In the figure below you will see just the normal force along the world x axis, but the y and z components are 0 even when the RigidObject is dragged along a surface in the appropriate axis.

    Image

  5. Mayankm96 commented on Mar 19, 2025

    @Mayankm96
    Contributor

    As mentioned in the docs, net_forces_w is the net normal contact forces in world frame which is what you see above. The name is confusing because back then this is what PhysX API was calling it and we continued with that name for compatibility.

    We are working on exposing the friction data in the contact sensor (@jtigue-bdai for vis.). However, if you want to directly get access to it, you can do so via:

    sensor.contact_physx_view.get_friction_data(dt)
  6. jtigue-bdai commented on Mar 19, 2025

    @jtigue-bdai
    Collaborator

    One thing to note: get_friction_data gets data in a different output format so you will need to do some combining to get it in the same format at net_forces_w.

  7. hojae-io commented on Mar 20, 2025

    @hojae-io
    Author

    Still, I've tried get_friction_data, but it only has all 0 values.
    Maybe would be nice to add some tutorial how to use get_friction_data method

  8. self-assigned this
    on Mar 21, 2025
  9. hojae-io commented on Mar 26, 2025

    @hojae-io
    Author
    Image

    I would appreciate it if we could access all the contact forces (including normal and friction force as well as point of contact) easily, just like they are being used in Mujoco as in figure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions