eventhandler with python

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
barak ostraich
Posts: 42
Joined: Thu Apr 12, 2018 12:17 am

eventhandler with python

Post by barak ostraich » Wed Aug 05, 2020 9:21 am

is there any way to implement eventhandler in python opensim integration?

Tags:

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: eventhandler with python

Post by Ayman Habib » Thu Aug 06, 2020 9:45 am

Hello

I don't believe the eventhandler classes of simbody are exposed through bindings, let us know what you're trying to do and we can try to help you out or expose the event-handlers if possible and the use case seems common.

Best regards,
-Ayman

User avatar
barak ostraich
Posts: 42
Joined: Thu Apr 12, 2018 12:17 am

Re: eventhandler with python

Post by barak ostraich » Sat Aug 08, 2020 5:00 am

i have an actuator i wrote that is changing its optimal force according to angular velocity and angle.
i wrote this in cpp version and it works. the eventhandler can plot various properties of the actuator while integrating.
further on, the event handler can help me stop the analysis when the ground forces are negative.

i need to enable this function for python users.
i do succeed in enabling the custom actuator by adding it to the swig warping.
but i dont know how to add the ability to stop integrating on force event.
also ploting while integrating can be usefull.

i will be glad to introduce this work to python
thanks
barak

POST REPLY