Page 1 of 1

eventhandler with python

Posted: Wed Aug 05, 2020 9:21 am
by ostr1969
is there any way to implement eventhandler in python opensim integration?

Re: eventhandler with python

Posted: Thu Aug 06, 2020 9:45 am
by aymanh
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

Re: eventhandler with python

Posted: Sat Aug 08, 2020 5:00 am
by ostr1969
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