Hi! I'm having a problem where, in using the forward dynamics tool, the joint angles aren't constrained as they should be and as prescribed in coordinate set range. For example:
<Coordinate name="ankle_flx">
<!--Coordinate can describe rotational, translational, or coupled motion. Defaults to rotational.-->
<motion_type>rotational</motion_type>
<!--The value of this coordinate before any value has been set. Rotational coordinate value is in radians and Translational in meters.-->
<default_value>0.87266463</default_value>
<!--The minimum and maximum values that the coordinate can range between. Rotational coordinate range in radians and Translational in meters.-->
<range>-0.52359878 1.04719755</range>
<!--Flag indicating whether or not the values of the coordinates should be limited to the range, above.-->
<clamped>true</clamped>
<!--Flag indicating whether or not the values of the coordinates should be constrained to the current (e.g. default) value, above.-->
<locked>false</locked>
<!--If specified, the coordinate can be prescribed by a function of time. It can be any OpenSim Function with valid second order derivatives.-->
<prescribed_function />
<!--Flag indicating whether or not the values of the coordinates should be prescribed according to the function above. It is ignored if the no prescribed function is specified.-->
<prescribed>false</prescribed>
</Coordinate>
In the GUI, under Coordinates, the angles are constrained according to the range above. However, when I set the default muscle activation of a couple muscles to 0.5 and run a forward simulation using the GUI, the joint angles are no longer constrained and can lead to some really strange results. For example: the ankle can be bent backwards in a non-realistic position out of range of the constraint.
Any information on how I can fix this would be greatly appreciated!
Question about angle constraints violated in simulation
- John Olthoff
- Posts: 14
- Joined: Sun Sep 06, 2015 6:56 pm
Re: Question about angle constraints violated in simulation
Hi John,
The lock/clamped coordinates are only relevant for something like IK, or viewing the model in the GUI. They don't represent true constraints for forward dynamics because they don't produce forces.
You could use a coordinate limiting force to get the behavior you are after.
Rigid joint stops, as a constraint, are on the OpenSim dev roadmap so it should be easier from the next release.
Cheers,
-james
The lock/clamped coordinates are only relevant for something like IK, or viewing the model in the GUI. They don't represent true constraints for forward dynamics because they don't produce forces.
You could use a coordinate limiting force to get the behavior you are after.
Rigid joint stops, as a constraint, are on the OpenSim dev roadmap so it should be easier from the next release.
Cheers,
-james
- John Olthoff
- Posts: 14
- Joined: Sun Sep 06, 2015 6:56 pm
Re: Question about angle constraints violated in simulation
Thanks! That completely clears up my confusion.
Just one more question-- I can see how to do this in a C example I found, but what's the method for doing it in the gui scripting, if at all possible?
Thanks again.
Just one more question-- I can see how to do this in a C example I found, but what's the method for doing it in the gui scripting, if at all possible?
Thanks again.