Add control signal to muscle controller

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Pengfei Liu
Posts: 15
Joined: Tue Sep 20, 2022 8:15 am

Add control signal to muscle controller

Post by Pengfei Liu » Sun Apr 28, 2024 1:52 am

i have extracted time series excitation data from Excle file. however, when i use the PiecewiseLinearFunction to add the data into BIClongController, there is a Error with PiecewiseLinearFunction.
anyone here give me a help, thank a lot.

filename = Excitation.xlsx;
[data, labels] = xlsread(filename);
time = data(:, 1);
BIClongExc = data(:, 5);
//...
BIClong = Thelen2003Muscle();
//...
BIClongController = PrescribedController();
BIClongController.setName('BIClongController');
BIClongController.addActuator(BIClong);
timeseriesExc = PiecewiseLinearFunction(350,time,TRIlongExc);
BIClongController.prescribeControlForActuator('excitationcontrol',timeseriesExc);
osimModel.addController(BIClongController);

MATLAB Error:
No constructor with matching signatures found 'org.opensim.modeling.PiecewiseLinearFunction';
Error Create_Complex_muscle (368);
timeseriesExc = PiecewiseLinearFunction(350,time,BIClongExc);

Tags:


POST REPLY