error for unregistered Objects in OpenSim 4.2:

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Musa Audu
Posts: 43
Joined: Mon Nov 24, 2008 11:30 am

error for unregistered Objects in OpenSim 4.2:

Post by Musa Audu » Wed May 26, 2021 5:56 am

Hi,
I obseve that the new OpenSim 4.2 GUI considers an unregistered object as an error that aborts loading a model (.osim) file that contains that object. This is not the case for OpenSim 4.0 where one is only given a warning of the form:

Object::newInstanceOfType(): object type 'MyController' is not a registered Object!
Object type MyController not recognized

For some who are using the GUI mainly for visualization, it would help if the version 4.2 also warns about unregistered objects rather than making it an error that prevents loading the model file altogether; or is there a workaround other than having to register all new objects?
Thank you.
MLA

Tags:

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

Re: error for unregistered Objects in OpenSim 4.2:

Post by Ayman Habib » Fri May 28, 2021 9:52 pm

Hello Dr. Audu, and thanks for reporting.

The change in behavior was to address an issue that was reported by another user/developer where loading some types failed silently and caused the user long hours of debugging, other users may just ignore these warnings and report wrong results. The tradeoff is thus between allowing models to load and just warn on which could lead to incorrect results vs. failing completely and forcing users to register their plugin types. We tried to make the registration process rather simple so the downside is small compared to the upside (being able to error-check, load and save models, modify models in GUI, upgrade to the latest format etc.)

If for some reason the registration process is more cumbersome than we believe, we'd appreciate if you can explain the difficulty so we can review/simplify the process if needed.

Hope this helps,
-Ayman

POST REPLY