-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
I would like to have the name of the segment on which a rigid contact is placed.
We have hacked it by doing :
def rigid_contact_segment(self, contact_index) -> str:
"""
Returns the name of the segment on which this specific rigid contact is.
"""
for segment in self.model.segments():
if segment.id() == self.model.rigidContact(contact_index).parentId():
return segment.name().to_string()
raise RuntimeError(f"The segment for the rigid contact index {contact_index} was not found.")However, when there is a contact on the root segment, the ids do not match leading to fall on the RuntimeError.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels