defining coordinate constraints using multiple independent coordinates
Posted: Mon Oct 22, 2018 9:31 am
We read that openSim 4.0 can define a constraint using 2 independent coordinates. Is this true? If so how do we add 2 independent coordinates in the xml?
Below is a simple example of using 1 independent coordinate. How would we go about adding another independent coordinate? Would we still use the CoordinateCouplerConstraint or would it be another type of constraint?
<CoordinateCouplerConstraint name="Constraint_Name">
<!--Flag indicating whether the constraint is disabled or not. Disabled means that the constraint is not active in subsequent dynamics realization-->
<isDisabled>false</isDisabled>
<!--Constraint function of generalized coordinates (to be specified) used to evaluate the constraint errors and their derivatives, and must valid to at least 2nd order. Constraint function must evaluate to zero when coordinates satisfy constraint-->
<coupled_coordinates_function>
<SimmSpline>
<x> 0 1 2</x>
<y> 0 1 2</y>
</SimmSpline>
</coupled_coordinates_function>
<!--List of names of the independent coordinates (restricted to 1 for now).-->
<independent_coordinate_names>independent_1</independent_coordinate_names>
<!--Name of the dependent coordinate.-->
<dependent_coordinate_name>dependent</dependent_coordinate_name>
<!--Scale factor for the function.-->
<scale_factor>1</scale_factor>
</CoordinateCouplerConstraint>
Thank you for your time.
Below is a simple example of using 1 independent coordinate. How would we go about adding another independent coordinate? Would we still use the CoordinateCouplerConstraint or would it be another type of constraint?
<CoordinateCouplerConstraint name="Constraint_Name">
<!--Flag indicating whether the constraint is disabled or not. Disabled means that the constraint is not active in subsequent dynamics realization-->
<isDisabled>false</isDisabled>
<!--Constraint function of generalized coordinates (to be specified) used to evaluate the constraint errors and their derivatives, and must valid to at least 2nd order. Constraint function must evaluate to zero when coordinates satisfy constraint-->
<coupled_coordinates_function>
<SimmSpline>
<x> 0 1 2</x>
<y> 0 1 2</y>
</SimmSpline>
</coupled_coordinates_function>
<!--List of names of the independent coordinates (restricted to 1 for now).-->
<independent_coordinate_names>independent_1</independent_coordinate_names>
<!--Name of the dependent coordinate.-->
<dependent_coordinate_name>dependent</dependent_coordinate_name>
<!--Scale factor for the function.-->
<scale_factor>1</scale_factor>
</CoordinateCouplerConstraint>
Thank you for your time.