Page 1 of 1
I want to give external force based on heel contact.
Posted: Tue Jan 14, 2025 11:14 pm
by kakeru58
Based on tutorial 4C, I want to use GaitStateController to give a perturbation to a person when the heel of the right foot is placed on the ground.
However, I don't know how to achieve it using GaitStateController (or any other function). If anyone has a good idea, please let me know.
![Neutral :|](./images/smilies/icon_neutral.gif)
Re: I want to give external force based on heel contact.
Posted: Wed Jan 15, 2025 1:22 am
by tgeijten
The easiest way to do that is via a ScriptController. You can use the contact_force() method on the foot body to detect the heel-strike events, and then use the add_external_force() method on the pelvis to add the perturbation force.
You can check Tutorial 6c for inspiration, even though your script will probably more straightforward than that.
Re: I want to give external force based on heel contact.
Posted: Mon Jan 20, 2025 9:04 pm
by kakeru58
Thank you for your reply!!
The tutorial was very easy to understand, and I was able to get it working successfully in the end. Thank you very much!!!
Re: I want to give external force based on heel contact.
Posted: Tue Jan 21, 2025 6:28 am
by tgeijten
Thank you!