I want to give external force based on heel contact.

SCONE is a software tool for predictive simulations of biomechanical movement. It uses OpenSim for modeling and simulation, and performs optimization using various control strategies, including feed-forward control, proprioceptic feedback control, and bal
POST REPLY
User avatar
Kakeru Yamasaki
Posts: 2
Joined: Tue Jan 14, 2025 9:12 pm

I want to give external force based on heel contact.

Post by Kakeru Yamasaki » Tue Jan 14, 2025 11:14 pm

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. :| :|

User avatar
Thomas Geijtenbeek
Posts: 473
Joined: Wed Mar 12, 2014 8:08 am

Re: I want to give external force based on heel contact.

Post by Thomas Geijtenbeek » Wed Jan 15, 2025 1:22 am

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.

User avatar
Kakeru Yamasaki
Posts: 2
Joined: Tue Jan 14, 2025 9:12 pm

Re: I want to give external force based on heel contact.

Post by Kakeru Yamasaki » Mon Jan 20, 2025 9:04 pm

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!!!

User avatar
Thomas Geijtenbeek
Posts: 473
Joined: Wed Mar 12, 2014 8:08 am

Re: I want to give external force based on heel contact.

Post by Thomas Geijtenbeek » Tue Jan 21, 2025 6:28 am

Thank you!

POST REPLY