How to implement a PrescribedController

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Sören Hufschmidt
Posts: 1
Joined: Wed Jan 23, 2019 3:54 pm

How to implement a PrescribedController

Post by Sören Hufschmidt » Mon Mar 25, 2019 8:43 am

Dear OpenSim Community,

I am currently modelling an upper-limb exoskeleton. Now I want to introduce different moments that affect a single pin joint of my model by editing the xml-file.
To begin, I wanted to add a constant moment (in this case, 1000Nm) to the pin joint that is linked to the coordinate "Armstab_r_coord_0".
Therefore, I tried to define a CoordinateActuator in ForceSet regulated by a Prescribed Controller defined in ControllerSet.

You can find the two xml code snippets in one file attached below.

Regarding the structure of the PrescribedController class, I have the following question:
Why do I need a control storage file, if a control function already has been designed in FunctionSet?

In contrast to the CoordinateActuator, which appears in the navigator window, I cannot see the PrescribedController in the GUI.
In addition to that, I cannot see any changes in the Inverse Kinematics or Inverse Dynamics of my model.
Did I commit a mistake defining the Controller?


Kind regards,
Soeren Hufschmidt
Attachments
Implement_Controller.xml
(2.48 KiB) Downloaded 36 times

Tags:

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

Re: How to implement a PrescribedController

Post by Dimitar Stanev » Thu Mar 28, 2019 2:08 am

When the control storage is used, functions are created to fit the data columns in the control storage. Then these functions are used to actuate the model. When the control storage is not specified the provided functions are used instead.

https://github.com/opensim-org/opensim- ... er.cpp#L99

POST REPLY