Skip to content

How to reset one particular object's state at runtime using the Python API #367

Discussion options

You must be logged in to vote

Thank you for your insight @yuvaltassa! Following the mocap bodies topic, I eventually found the solution suitable for my use case despite that it is not relevant to mocap in the end.

The "... second regular body and connect it to the mocap body with a weld equality constraint" inspired me to create a fixed body in the world and use that as an anchor of the operational body, such that by dynamically disabling the weld constraint, I could move the later with a robot, whereas by enabling that, the later will rapidly go back to the original pose defined by the anchor body.

Hereby I include some code that hopefully could be helpful for those who come across a similar problem:

The XML file:

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by DrawZeroPoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants