Manager() Logs Suppression

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Vinay Kumar
Posts: 34
Joined: Thu Nov 08, 2018 6:50 am

Manager() Logs Suppression

Post by Vinay Kumar » Wed Jan 22, 2020 4:11 am

Hello everyone.

Is there a way to suppress the message "Integration failed due to the following reason: EventHandlerRequestedTermination" from appearing into the terminal. It is a custom event created by me.

Thank you.

Tags:

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

Re: Manager() Logs Suppression

Post by Ayman Habib » Wed Jan 22, 2020 10:46 am

Hello,

If this message comes from an exception being thrown then I don't think you'd want to suppress it! I'm not aware of a mechanism to suppress messages in simbody at the moment, we're working on one for OpenSim but it would not help here since this comes from the lower level simbody library.

Hope this helps,
-Ayman

User avatar
Christopher Dembia
Posts: 506
Joined: Fri Oct 12, 2012 4:09 pm

Re: Manager() Logs Suppression

Post by Christopher Dembia » Wed Jan 22, 2020 1:38 pm

I'm surprised that an EventHandler requesting to stop integration would be considered a failure. Are you sure you are using the EventHandler correctly?

User avatar
Vinay Kumar
Posts: 34
Joined: Thu Nov 08, 2018 6:50 am

Re: Manager() Logs Suppression

Post by Vinay Kumar » Wed Jan 22, 2020 7:54 pm

Dear Ayman Habib and Christopher Dembia, thank you for the clarification
chrisdembia wrote:
Wed Jan 22, 2020 1:38 pm
I'm surprised that an EventHandler requesting to stop integration would be considered a failure. Are you sure you are using the EventHandler correctly?
I wanted to stop the simulation once a coordinate goes outside its range. Inspired by the Sky Higher Jump examplehttps://simtk-confluence.stanford.edu:8 ... ource+Code, I wrote the following code https://github.com/vinaym815/OpenSimExa ... ure.cpp#L8. How would you suggest I modify it to avoid the error message?

Kind regards
Vinay

User avatar
Christopher Dembia
Posts: 506
Joined: Fri Oct 12, 2012 4:09 pm

Re: Manager() Logs Suppression

Post by Christopher Dembia » Wed Jan 22, 2020 10:02 pm

Ah sorry I think that is the correct way to terminate.

User avatar
Thomas Uchida
Posts: 1792
Joined: Wed May 16, 2012 11:40 am

Re: Manager() Logs Suppression

Post by Thomas Uchida » Thu Jan 23, 2020 3:22 am

Would redirecting cout to stringstream work, as is done here: https://github.com/opensim-org/opensim- ... el.cpp#L58?

POST REPLY