ExpressionBasedCoordinateForce

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Jonathan Mortensen
Posts: 32
Joined: Wed Jul 06, 2016 1:33 pm

ExpressionBasedCoordinateForce

Post by Jonathan Mortensen » Tue Sep 13, 2016 11:52 am

Hi everyone, I am having a problem with the ExpressionBasedCoordinateForce. When I try to add it to my model.osim file I get the error:

'ExpressionBasedCoordinateForce' is not a registered Object!
Object type ExpressionBasedCoordinateForce not recognized

Is this object no longer working for OpenSim? Any help would be great.

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: ExpressionBasedCoordinateForce

Post by Dimitar Stanev » Tue Sep 13, 2016 11:25 pm

Hi,

If you are adding this through the C++ API, then you need to register the force so it can be recognized by OpenSim.

Code: Select all

OpenSim::Object::registerType(OpenSim::ExpressionBasedCoordinateForce());
Best

User avatar
Jonathan Mortensen
Posts: 32
Joined: Wed Jul 06, 2016 1:33 pm

Re: ExpressionBasedCoordinateForce

Post by Jonathan Mortensen » Wed Sep 14, 2016 10:42 am

Is there a way to do this just by editing the xml file? I would like to add it straight into my model and run it in the GUI.

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: ExpressionBasedCoordinateForce

Post by Dimitar Stanev » Thu Sep 15, 2016 1:00 am

I am not sure if it is possible, through GUI. Maybe through scripting. If you want to use it through the GUI maybe you can implement a very simple plugin that registers the ExpressionBasedCoordinateForce. See the examples in the sdk folder.

Best

POST REPLY