RRA with weld constraint

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Renate van Zandwijk
Posts: 5
Joined: Mon Apr 12, 2010 11:23 am

RRA with weld constraint

Post by Renate van Zandwijk » Tue Mar 19, 2013 2:32 pm

Hello,

I have a problem with RRA. I have a cycling model with weldconstraints between the pedals and the feet. When I try to run RRA, the execution fails before it does any time step. In the output (see below) I cannot find the reason why RRA doesnot want to run. I tried to run RRA without the weldconstraints; then it runs without any problems, but the outcomes are, as expected, not correct. The ID is running normally with the weldconstraints.

I first added one constraint back, but straight away, RRA failed.

Is there anything that I have to add for the constraints to my tracking or actuators file to get RRA running?

Btw, I have many joints locked, since I first want to verify if my model can run in 2D, before I add another dimension.

Thank you,
Renate


===============================================================
Adding force object set from C:\Documents and Settings\van Zandwijk\My Documents\My Dropbox\Cycling model\Gait2392_Simbody-used\Ricks data\RRA_Actuators_0312includecrankandpedal.xml
Running tool Cycling_subject_knee3D.
Old version storage/motion file encountered
Storage: file=C:\Documents and Settings\van Zandwijk\My Documents\My Dropbox\Cycling model\Gait2392_Simbody-used\Ricks data\forces0229invForces.mot (nr=63 nc=16)
.. assuming rotations in Degrees.
Storage: file=C:\Documents and Settings\van Zandwijk\My Documents\My Dropbox\Cycling model\Gait2392_Simbody-used\Ricks data\IK031813_crank_and_pedal_angle.mot (nr=63 nc=34)
Coordinate.setValue: WARN- coordinate pelvis_tx is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate pelvis_ty is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate pelvis_tz is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate hip_adduction_r is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate hip_rotation_r is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate knee_internal_rotation_r is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate knee_adduction_r is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate subtalar_angle_r is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate hip_adduction_l is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate hip_rotation_l is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate knee_internal_rotation_l is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate knee_adduction_l is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate subtalar_angle_l is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate crank_x is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate crank_y is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate crank_z is locked. Unable to change its value.
ExternalLoads: WARNING ExternalForce 'left' is not expressed in ground and will not be transformed.
ExternalLoads: WARNING ExternalForce 'right' is not expressed in ground and will not be transformed.


taskSet size = 9



WARN- a desired points file was not specified.



Loading desired kinematics from file C:\Documents and Settings\van Zandwijk\My Documents\My Dropbox\Cycling model\Gait2392_Simbody-used\Ricks data\IK031813_crank_and_pedal_angle.mot ...

Loading q's from file C:\Documents and Settings\van Zandwijk\My Documents\My Dropbox\Cycling model\Gait2392_Simbody-used\Ricks data\IK031813_crank_and_pedal_angle.mot.
Storage: file=C:\Documents and Settings\van Zandwijk\My Documents\My Dropbox\Cycling model\Gait2392_Simbody-used\Ricks data\IK031813_crank_and_pedal_angle.mot (nr=63 nc=34)
Found 63 q's with time stamps ranging
from 0.00163093 to 0.949881.


Note- not filtering the desired kinematics.

MODEL: Cycling_subject_knee3D

ANALYSES (2)
analysis[0] = Un-named analysis.
analysis[1] = Un-named analysis.

BODIES (16)
body[0] = ground (mass: 0) (inertia: 0 0 0 0 0 0 0 0 0)
body[1] = pelvis (mass: 11.777) (inertia: 0.1028 0 0 0 0.0871 0 0 0 0.0579)
body[2] = femur_r (mass: 9.3014) (inertia: 0.1339 0 0 0 0.0351 0 0 0 0.1412)
body[3] = tibia_r (mass: 3.7075) (inertia: 0.0504 0 0 0 0.0051 0 0 0 0.0511)
body[4] = talus_r (mass: 0.1) (inertia: 0.001 0 0 0 0.001 0 0 0 0.001)
body[5] = calcn_r (mass: 1.25) (inertia: 0.0014 0 0 0 0.0039 0 0 0 0.0041)
body[6] = toes_r (mass: 0.2166) (inertia: 0.0001 0 0 0 0.0002 0 0 0 0.001)
body[7] = femur_l (mass: 9.3014) (inertia: 0.1339 0 0 0 0.0351 0 0 0 0.1412)
body[8] = tibia_l (mass: 3.7075) (inertia: 0.0504 0 0 0 0.0051 0 0 0 0.0511)
body[9] = talus_l (mass: 0.1) (inertia: 0.001 0 0 0 0.001 0 0 0 0.001)
body[10] = calcn_l (mass: 1.25) (inertia: 0.0014 0 0 0 0.0039 0 0 0 0.0041)
body[11] = toes_l (mass: 0.2166) (inertia: 0.0001 0 0 0 0.0002 0 0 0 0.001)
body[12] = torso (mass: 34.2366) (inertia: 1.4745 0 0 0 0.7555 0 0 0 1.4314)
body[13] = crank (mass: 3) (inertia: 2.6 0 0 0 0.001 0 0 0 2.6)
body[14] = Left_Pedal (mass: 1) (inertia: 0.1028 0 0 0 0.0871 0 0 0 0.0579)
body[15] = Right_Pedal (mass: 1) (inertia: 0.1028 0 0 0 0.0871 0 0 0 0.0579)

ACTUATORS (15)
actuator[0] = FX
actuator[1] = FY
actuator[2] = FZ
actuator[3] = MX
actuator[4] = MY
actuator[5] = MZ
actuator[6] = hip_flexion_r
actuator[7] = knee_angle_r
actuator[8] = ankle_angle_r
actuator[9] = hip_flexion_l
actuator[10] = knee_angle_l
actuator[11] = ankle_angle_l
actuator[12] = crank_angle
actuator[13] = pedal_tilt_l
actuator[14] = pedal_tilt_r
numStates = 66
numCoordinates = 33
numSpeeds = 33
numActuators = 15
numBodies = 16
numConstraints = 2

STATES (66)
y[0] = pelvis_tilt
y[1] = pelvis_list
y[2] = pelvis_rotation
y[3] = pelvis_tx
y[4] = pelvis_ty
y[5] = pelvis_tz
y[6] = hip_flexion_r
y[7] = hip_adduction_r
y[8] = hip_rotation_r
y[9] = knee_angle_r
y[10] = knee_internal_rotation_r
y[11] = knee_adduction_r
y[12] = ankle_angle_r
y[13] = subtalar_angle_r
y[14] = mtp_angle_r
y[15] = hip_flexion_l
y[16] = hip_adduction_l
y[17] = hip_rotation_l
y[18] = knee_angle_l
y[19] = knee_internal_rotation_l
y[20] = knee_adduction_l
y[21] = ankle_angle_l
y[22] = subtalar_angle_l
y[23] = mtp_angle_l
y[24] = lumbar_extension
y[25] = lumbar_bending
y[26] = lumbar_rotation
y[27] = crank_angle
y[28] = crank_x
y[29] = crank_y
y[30] = crank_z
y[31] = pedal_tilt_l
y[32] = pedal_tilt_r
y[33] = pelvis_tilt_u
y[34] = pelvis_list_u
y[35] = pelvis_rotation_u
y[36] = pelvis_tx_u
y[37] = pelvis_ty_u
y[38] = pelvis_tz_u
y[39] = hip_flexion_r_u
y[40] = hip_adduction_r_u
y[41] = hip_rotation_r_u
y[42] = knee_angle_r_u
y[43] = knee_internal_rotation_r_u
y[44] = knee_adduction_r_u
y[45] = ankle_angle_r_u
y[46] = subtalar_angle_r_u
y[47] = mtp_angle_r_u
y[48] = hip_flexion_l_u
y[49] = hip_adduction_l_u
y[50] = hip_rotation_l_u
y[51] = knee_angle_l_u
y[52] = knee_internal_rotation_l_u
y[53] = knee_adduction_l_u
y[54] = ankle_angle_l_u
y[55] = subtalar_angle_l_u
y[56] = mtp_angle_l_u
y[57] = lumbar_extension_u
y[58] = lumbar_bending_u
y[59] = lumbar_rotation_u
y[60] = crank_angle_u
y[61] = crank_x_u
y[62] = crank_y_u
y[63] = crank_z_u
y[64] = pedal_tilt_l_u
y[65] = pedal_tilt_r_u
Coordinate.setValue: WARN- coordinate pelvis_tx is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate pelvis_ty is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate pelvis_tz is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate hip_adduction_r is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate hip_rotation_r is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate knee_internal_rotation_r is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate knee_adduction_r is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate subtalar_angle_r is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate hip_adduction_l is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate hip_rotation_l is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate knee_internal_rotation_l is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate knee_adduction_l is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate subtalar_angle_l is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate crank_x is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate crank_y is locked. Unable to change its value.
Coordinate.setValue: WARN- coordinate crank_z is locked. Unable to change its value.

Note: requested COM adjustment time range 0.1 - 0.3 clamped to nearest available data times 0.0916488 - 0.298314

Computing average residuals between 0.0916488 and 0.298314

Computing average residuals between 0.0916488 and 0.298314

Constructing function set for tracking desired kinematics...

No Actuation analysis found in analysis set -- adding one
No Kinematics analysis found in analysis set -- adding one
Using the generalized coordinates specified in C:\Documents and Settings\van Zandwijk\My Documents\My Dropbox\Cycling model\Gait2392_Simbody-used\Ricks data\IK031813_crank_and_pedal_angle.mot to set the initial configuration.

Using IPOPT optimizer algorithm.

Setting optimizer print level to 0.
Setting optimizer convergence tolerance to 1e-005.
Setting optimizer maximum iterations to 2000.

Setting cmc controller to not use verbose printing.
CMC.computeControls: t = 0.1



================================================================
================================================================
Using CMC to track the specified kinematics
Integrating from 0.1 to 0.3

User avatar
Ajay Seth
Posts: 136
Joined: Thu Mar 15, 2007 10:39 am

Re: RRA with weld constraint

Post by Ajay Seth » Wed Mar 20, 2013 2:20 pm

A couple of checkpoints:
1) You have the majority of the coordinates in your model locked (OpenSim is warning you about them). Have you verified that the model can satisfy the weld constraints at the pedals and have all those cooordinates locked? If the model is failing to satisfy the constraints it will fail to run.
2) The goal of RRA is typically to adjust model mass and find kinematics to achieve more consistency with measured external forces. You can use RRA like a computed torque controller to track kinematics but uncheck the options to adjust the model and make sure you have sufficient dofs to satisfy the constraints. You will also need to add a reserve actuator for every unlocked coordinate.

User avatar
Renate van Zandwijk
Posts: 5
Joined: Mon Apr 12, 2010 11:23 am

Re: RRA with weld constraint

Post by Renate van Zandwijk » Thu Mar 21, 2013 9:54 am

Thank you Ajay for your response. I thought that locking the joints would not be a problem, since I could run the motion with the joints that were free. But know I unlocked the hip joints in the other direction and RRA is running.

Renate

User avatar
Ajay Seth
Posts: 136
Joined: Thu Mar 15, 2007 10:39 am

Re: RRA with weld constraint

Post by Ajay Seth » Thu Mar 21, 2013 2:02 pm

When you were playing the motion with many joints locked, did you have the constraints on the feet turned on? If so, were you getting warnings in the the message window that the assembly was failing and constraints could not be satisfied? Playback of a motion file simply sets the state the model at every instant which includes the pose and not like a forward simulation where the constraints have to satisfied as part of the system of DAEs being solved by forward integration and constraint projection. In other words play back can violate the constraints (although it does its best not too) but during integration of the system equation (which RRA does) it is fails if cannot meet the set accuracy. My guess is that RRA on the first step is failing since it cannot find a solution with the unlocked q's that satisfies the constraints to the necessary constraint tolerance. If you want lock the coordinates of the leg then perhaps you need point constraint with the pedal to provide enough play.

POST REPLY