Opensim And Matlab

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
samane amini
Posts: 5
Joined: Wed Apr 22, 2020 11:39 am

Opensim And Matlab

Post by samane amini » Fri Aug 21, 2020 11:57 pm

Hi guys

I want to define controller by model controls that created. I wrote this code:
modelcontrols = Model.getDefaultControls;
Tkr = Vector(1, Tkr);
Model.getActuators.get("knee_motor_r").addInControls(Tkr,modelcontrols)
Model.setDefaultControls(modelcontrols)

Now I try to add this controller to model. first i should derive our controller from Controller. next by addController atach the controller to the model. I define this code:

kk = ControlSetController();
kk.setControlSet(modelcontrols)
kk.setActuators(Model.updActuators());
Model.addController(kk)
but this is wrong. Please guide me

Tags:

POST REPLY