raisimTech / raisimLib

Visit www.raisim.com
http://www.raisim.com
Other
341 stars 91 forks source link

addArticulatedSystem exits program when urdf is not found? #430

Closed costashatz closed 1 year ago

costashatz commented 1 year ago

I am trying to load some files and when I give as input a non existent path, raisim exits the program with the following message:

[2023:02:09:17:11:43 ArticulatedSystem.cpp:374] test.urdf does not exist

Is this the normal behavior? I would like to catch such cases and handle them accordingly. Forcefully exiting the whole executable doesn't make sense. How can I do that? Thanks.

jhwangbo commented 1 year ago

There are two ways. You can first check if the file exists seperately and therminate. Or, you can set the fatal beahvior according to this https://raisim.com/sections/LoggingSystem.html The fatal behavior is exit by default but you can always override it. I also often override to throw so that I can catch it for debugging

costashatz commented 1 year ago

Thanks a lot for the fast reply.