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.
I want to give external force based on heel contact.
- Kakeru Yamasaki
- Posts: 2
- Joined: Tue Jan 14, 2025 9:12 pm
- Thomas Geijtenbeek
- Posts: 473
- Joined: Wed Mar 12, 2014 8:08 am
Re: I want to give external force based on heel contact.
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.
You can check Tutorial 6c for inspiration, even though your script will probably more straightforward than that.
- Kakeru Yamasaki
- Posts: 2
- Joined: Tue Jan 14, 2025 9:12 pm
Re: I want to give external force based on heel contact.
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!!!
The tutorial was very easy to understand, and I was able to get it working successfully in the end. Thank you very much!!!
- Thomas Geijtenbeek
- Posts: 473
- Joined: Wed Mar 12, 2014 8:08 am