Page 2 of 2

Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum

Posted: Wed Jul 21, 2021 4:31 pm
by anacsousa
No worries! Glad to help.

"Does it mean that I can change the value of "gear_load" in the actuator field to control the resistance of the pedal?"
Yes and no.

Yes, you can control the resistance of cycling (or cycling pedal, I don't know if that is what you mean).
No, it is not on the pedals, but on the crank (I just wanted to clarify the location).

Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum

Posted: Sun Jul 25, 2021 8:15 pm
by zakky
Thank you for reply ana.

We are looking into the effects of gear loading on rehabilitation.
What is "torque_is_global"? How does it affect the system?

I use a translator.
kind regards.

Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum

Posted: Tue Jul 27, 2021 3:38 pm
by anacsousa
Where is the variable "torque_is_global"?

Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum

Posted: Wed Jul 28, 2021 10:39 pm
by zakky
Thank you for reply ana.

"torque_is_global" is located on line 3750 of "FesCyclingmodel.osim".
Also, does the "axis" in line 3752 represent the direction of the force?

Thank you for replying so many times.

Kind regards.

Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum

Posted: Thu Jul 29, 2021 4:41 pm
by anacsousa
That is the final opensim model that will be used by opensim. It follows a specific structure that you can see here:
https://simtk.org/api_docs/opensim/api_ ... uator.html

You can directly edit the .osim file, but I created using other functions from the API, as you can see here:
https://github.com/anacsousa1/opensim-f ... Orthosis.m

The createModel_passiveOrthosis.m loads the basic model 'FESCyclingModel.osim', creates a torque called 'gear', and applies it on the model and then prints the model that will be used.

I suggest further reading on this topic, there is a tutorial about it:
https://simtk-confluence.stanford.edu/d ... +in+Matlab

Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum

Posted: Sat Jun 04, 2022 11:54 am
by rufaida
Dear all
I am trying to run the RUNME_BB matlab file. I am using opensim 4.3 and matlab 2021a
But I faced the following error
Unrecognized function or variable 'getStateValues'.

Error in cycling_control_v2 (line 65)
thisStateArray = osimModel.getStateValues(osimState);

Error in OpenSimPlantFunction (line 83)
controlVector = controlsFuncHandle(osimModel,osimState);

Error in
IntegrateOpenSimPlant>@(t,x)OpenSimPlantFunction(t,x,controlsFuncHandle,osimModel,osimState)
(line 101)
plantHandle = @(t,x) OpenSimPlantFunction(t, x, controlsFuncHandle,
osimModel, osimState);

Error in odearguments (line 90)
f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.

Error in ode15s (line 152)
odearguments(FcnHandlesUsed, solver_name, ode, tspan, y0, options,
varargin);

Error in IntegrateOpenSimPlant (line 106)
[T, Y] = integratorFunc(plantHandle, timeSpan, InitStates, ...

Error in cycling_script (line 163)
motionData = IntegrateOpenSimPlant(cyclingModel, controlFunctionHandle,
timeSpan, ...

Error in RUNME_BB (line 44)
cycling_script;

Kindly How could I solve this problem

Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum

Posted: Tue Jun 13, 2023 6:48 am
by anacsousa
Hi Rufaida Hussain, this is probably due to your OpenSim version. This version only works for OpenSim 3.3