Search found 97 matches

by Samane Amini
Mon Aug 08, 2022 5:24 am
Forum: SCONE
Topic: Muscle force
Replies: 5
Views: 149

Muscle force

Hello According to the following muscle force formulation, I would like to get muscle properties. fff.PNG where fL is the active-force-length curve, fV is the force-velocity curve, and fPE is the passive-force-length. However, there aren't these properties in LuaMuscle :https://scone.software/doku.p...
by Samane Amini
Sun Aug 07, 2022 6:49 am
Forum: SCONE
Topic: attempt to a nil value
Replies: 1
Views: 65

attempt to a nil value

I would like to get some info from muscle: active_fiber_force() active_force_length_multiplier() passive_fiber_force() ... Scripting the following code shows this error "attempt to a nil value ": F = model:find_muscle("rect_fem_r"):active_fiber_force() Would you pls guide me on how to get it? Kind r...
by Samane Amini
Fri Aug 05, 2022 8:32 am
Forum: SCONE
Topic: momentum
Replies: 1
Views: 100

momentum

Hello
I would like to get momentum generated by a muscle like this:

gastroc_r.ankle_angle_r.momentum

and also momentum arm.

how to get these in Lua script controller.

And do you why the following code doesn't worked?

T = model:find_muscle("gastroc_r")
Tr = T:active_fiber_force()

Thanks
by Samane Amini
Fri Jul 15, 2022 3:59 am
Forum: SCONE
Topic: reset time
Replies: 5
Views: 706

Re: reset time

Thanks Thomas for current simulation time, I used t=model:time() in update function. But How to get the pervious time or initializing time in int function? it doesn't work with t0 = model:time() in int function. Would you please tell me how to script the update function to restart the time from zero?
by Samane Amini
Thu Jul 14, 2022 4:09 am
Forum: SCONE
Topic: reset time
Replies: 5
Views: 706

reset time

Hello guys

I was wondering how can reset time at each subphase like swing or stance?

I defined a scriptcontroller that works with time. Due to time getting up, I want to apply it from t =0 at each swing or stance.

Do you know how to do it?
by Samane Amini
Thu Jul 14, 2022 3:50 am
Forum: OpenSim
Topic: Phase Percent
Replies: 1
Views: 193

Phase Percent

Hello guys

I have a polynomial torque based on phase gait and I would like to apply it on a joint based on the phase gait not time.
Do you know how to define a commend input against phase (percent)?

For example, it would work with GRF? or there is function of phase gait?

Thanks
by Samane Amini
Tue Jul 12, 2022 7:08 am
Forum: SCONE
Topic: How to define CoordinateActuator
Replies: 1
Views: 249

How to define CoordinateActuator

Hello everyone To apply a torque profile to the ankle joint, I've got the following ScriptControllr.lua: qq4.PNG in fact, I've added ankle_motor_r as an actuator to OpenSim model like this: qq2.PNG But the scenario doesn't work. it means it couldn't find the ankle_motor_r that I defined. Do you know...
by Samane Amini
Mon Jul 11, 2022 4:11 am
Forum: SCONE
Topic: Invalid Senario
Replies: 3
Views: 194

Re: Invalid Senario

Hi again I edited the code to this form: Controllers { Controller { type = GaitStateController ConditionalControllers { ConditionalController { states = Swing CompositeController { FeedForwardController{ symmetric = 1 Function { type = Polynomial degree = 0 coefficient0 { init_mean = 0.05 init_std =...
by Samane Amini
Sat Jul 09, 2022 1:20 pm
Forum: SCONE
Topic: Invalid Senario
Replies: 3
Views: 194

Re: Invalid Senario

Hi Thomas

I've changed to this form:
Captursse.PNG
Captursse.PNG (17.87 KiB) Viewed 162 times
But it doesn't work. Would you please give me an exact true example for CompositeController that have a function?
by Samane Amini
Sat Jul 09, 2022 9:47 am
Forum: SCONE
Topic: Invalid Senario
Replies: 3
Views: 194

Invalid Senario

Hi I am going to optimize polynomial coefficients. I define the controller as follows: ConditionalController { states = Swing CompositeController { type = FeedForwardController symmetric = 1 Function { type = Polynomial target = ankle_angle_r degree = 2 coefficient0 = ~1<-3,3> coefficient1 = ~2<-2,2...