Estimating GRFs while states tracking
Posted: Mon Feb 05, 2024 1:58 pm
well hi again,
After months of trying, I'm still having a hard time getting moco to work.![Sad :(](./images/smilies/icon_e_sad.gif)
Initially I had some data of stroke gait which included GRFs,IKs, and scaled models (gait 2392). I used these for many studies and then I decided to use moco on the same data, but have been facing some challenges when doing track, inverse is fine.
what am I trying to do : find new motion (new joint trajectories and GRF forces) using experimental data. So basically I generate the muscle activations using moco inverse with inputs of motion,GRF and model. Then I make very small changes to the found activations using inverse so that it represents electrical stimulation. then I use stateTracking and ControlTracking to generate the new motion. Here's the problem: when I add the control Tracking task, it never converges. Statetracking alone works if I use torque driven model, but muscle driven no. The only thing is that I have used foot ground contact models. I even used the muscle driven example in 3Dwalking folder in moco resources to see if the simulation works. That example has the grf forces as input. When I run the original code with grf everything seems fine. But when I use contact model, it doesn't work. So now my question is that if I use the code in 3Dwalking with GRF as input, how can I get the new GRFs? Cause track deviates from the base motion right? so that GRF is not same as the original GRF. How can I get this new GRF? Also Here's how I modeled the contacts:
I have six contacts per foot.
After months of trying, I'm still having a hard time getting moco to work.
![Sad :(](./images/smilies/icon_e_sad.gif)
Initially I had some data of stroke gait which included GRFs,IKs, and scaled models (gait 2392). I used these for many studies and then I decided to use moco on the same data, but have been facing some challenges when doing track, inverse is fine.
what am I trying to do : find new motion (new joint trajectories and GRF forces) using experimental data. So basically I generate the muscle activations using moco inverse with inputs of motion,GRF and model. Then I make very small changes to the found activations using inverse so that it represents electrical stimulation. then I use stateTracking and ControlTracking to generate the new motion. Here's the problem: when I add the control Tracking task, it never converges. Statetracking alone works if I use torque driven model, but muscle driven no. The only thing is that I have used foot ground contact models. I even used the muscle driven example in 3Dwalking folder in moco resources to see if the simulation works. That example has the grf forces as input. When I run the original code with grf everything seems fine. But when I use contact model, it doesn't work. So now my question is that if I use the code in 3Dwalking with GRF as input, how can I get the new GRFs? Cause track deviates from the base motion right? so that GRF is not same as the original GRF. How can I get this new GRF? Also Here's how I modeled the contacts:
Code: Select all
<components>
<SmoothSphereHalfSpaceForce name="Foot_Ground_R1">
<!--Path to a Component that satisfies the Socket 'sphere' of type ContactSphere (description: The sphere participating in this contact.).-->
<socket_sphere>/contactgeometryset/right_one</socket_sphere>
<!--Path to a Component that satisfies the Socket 'half_space' of type ContactHalfSpace (description: The half-space participating in this contact.).-->
<socket_half_space>/contactgeometryset/ground</socket_half_space>
<!--The stiffness constant (i.e., plain strain modulus), default is 1 (N/m^2)-->
<stiffness>1000000</stiffness>
<!--The dissipation coefficient, default is 0 (s/m).-->
<dissipation>1.5</dissipation>
<!--The coefficient of static friction, default is 0.-->
<static_friction>0.80000000000000004</static_friction>
<!--The coefficient of dynamic friction, default is 0.-->
<dynamic_friction>0.80000000000000004</dynamic_friction>
<!--The coefficient of viscous friction, default is 0.-->
<viscous_friction>0.0</viscous_friction>
<!--The transition velocity, default is 0.01 (m/s).-->
<transition_velocity>0.20000000000000001</transition_velocity>
<!--The parameter that determines the smoothness of the transition of the tanh used to smooth the Hertz force. The larger the steeper the transition but the worse for optimization, default is 300.-->
<hertz_smoothing>300</hertz_smoothing>
<!--The parameter that determines the smoothness of the transition of the tanh used to smooth the Hunt-Crossley force. The larger the steeper the transition but the worse for optimization, default is 50.-->
<hunt_crossley_smoothing>50</hunt_crossley_smoothing>
</SmoothSphereHalfSpaceForce>
Code: Select all
<ContactSphere name="right_one">
<!--Path to a Component that satisfies the Socket 'frame' of type PhysicalFrame (description: The frame to which this geometry is attached.).-->
<socket_frame>/bodyset/calcn_r</socket_frame>
<!--Location of geometry center in the PhysicalFrame.-->
<location>0.0019011578840796601 -0.021859 -0.00382630379623308</location>
<!--Orientation of geometry in the PhysicalFrame (body-fixed XYZ Euler angles).-->
<orientation>1 0 0</orientation>
<!--Default appearance for this Geometry-->
<Appearance>
<!--The color, (red, green, blue), [0, 1], used to display the geometry. -->
<color>0 1 1</color>
<!--Visuals applied to surfaces associated with this Appearance.-->
<SurfaceProperties>
<!--The representation (1:Points, 2:Wire, 3:Shaded) used to display the object.-->
<representation>1</representation>
</SurfaceProperties>
</Appearance>
<!--Radius of the sphere (default: 0).-->
<radius>0.032000000000000001</radius>
</ContactSphere>
I have six contacts per foot.