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).
Control strategies for functional electrical stimulation (FES) cycling Public Forum
- Ana de Sousa
- Posts: 62
- Joined: Thu Apr 07, 2016 4:21 pm
- Yuya Miyazaki
- Posts: 16
- Joined: Tue May 11, 2021 8:45 pm
Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum
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.
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.
- Ana de Sousa
- Posts: 62
- Joined: Thu Apr 07, 2016 4:21 pm
Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum
Where is the variable "torque_is_global"?
- Yuya Miyazaki
- Posts: 16
- Joined: Tue May 11, 2021 8:45 pm
Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum
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.
"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.
- Ana de Sousa
- Posts: 62
- Joined: Thu Apr 07, 2016 4:21 pm
Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum
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
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
- Rufaida Hussain
- Posts: 2
- Joined: Wed Jul 28, 2010 1:08 pm
Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum
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
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
- Ana de Sousa
- Posts: 62
- Joined: Thu Apr 07, 2016 4:21 pm
Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum
Hi Rufaida Hussain, this is probably due to your OpenSim version. This version only works for OpenSim 3.3