Skip to content

[Feature]: Add filter_link_idx to ContactForceSensor #2771

@jsw7460

Description

@jsw7460

What feature or enhancement are you proposing?

Add filter_link_idx to ContactForceSensor, mirroring the parameter ContactSensor in #2655.

ContactSensor can filter its boolean by counterpart link (blacklist), but ContactForceSensor reports the total contact force with no way to scope it.

Proposal: add filter_link_idx: array-like[int] to gs.sensors.ContactForce with the same semantics as gs.sensors.Contact: contacts whose counterpart link is in the list are excluded from the reported force.

Motivation

Wanted a ContactForceSensor that reports only the contact force from a specific subset of counterpart links (e.g. "force on the foot from the ground, excluding self-contact" or "force on the torso from anything except the robot itself"),

Potential Benefit

Reliable reward functions in RL

What is the expected outcome of the implementation work?

  • gs.sensors.ContactForce accepts filter_link_idx: array-like[int], same semantics as gs.sensors.Contact.
  • Reported force excludes contacts whose counterpart link is in the list, per-contact (correct even when the link touches multiple counterparts simultaneously).

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions