Skip to content

Commit

Permalink
Remove kinematics_for_external_loads property (#2770)
Browse files Browse the repository at this point in the history
* Remove kinematics_for_external_loads property from ExternalLoads object and remove usage in AbstractTool and DynamicsTool. Also update XMLDocument version number

* Update externalForces file to latest format and remove reference to external_loads_kinematics

* Fix IAA to handle externalForce.expressedInBody being "ground" which is not in the BodySet

* Remove kinematics_for_external_loads property from ExternalLoads object and remove usage in AbstractTool and DynamicsTool. Also update XMLDocument version number

* Update externalForces file to latest format and remove reference to external_loads_kinematics

* Fix IAA to handle externalForce.expressedInBody being "ground" which is not in the BodySet

* Remove kinematics_for_external_loads property from ExternalLoads object and remove usage in AbstractTool and DynamicsTool. Also update XMLDocument version number

* Update externalForces file to latest format and remove reference to external_loads_kinematics

* Fix IAA to handle externalForce.expressedInBody being "ground" which is not in the BodySet

* Use log methods instead of cout

* Port bugfix to IAA from already reviewed PR 2691

* Fix comment

* log_warn instead of cout

* Update standard for SO test case to account for removal of Kinematics of external loads option

* Update std for InducedAcceleration test case

* Fix testCMCWithControlConstraintsGait2354 by updating standard and using a dedicated std file rather than a file shared with other tests

* Fix indentation that failed ci build on linux

* Undo XMLDocument version upgrade to keep backward compatibility of Model files

Co-authored-by: Christopher Dembia <cld72@cornell.edu>
  • Loading branch information
aymanhab and chrisdembia authored Sep 1, 2020
1 parent 30e5914 commit cbf3590
Show file tree
Hide file tree
Showing 14 changed files with 510 additions and 511 deletions.
113 changes: 30 additions & 83 deletions Applications/Analyze/test/externalForces.xml
Original file line number Diff line number Diff line change
@@ -1,91 +1,38 @@
<?xml version="1.0" encoding="UTF-8" ?>
<OpenSimDocument Version="20201">
<ExternalLoads name="">
<OpenSimDocument Version="40000">
<ExternalLoads name="default">
<objects>
<PrescribedForce name="RightForce">
<ExternalForce name="RightForce">
<!--Name of the body the force is applied to.-->
<body>calcn_r</body>
<!--Flag indicating whether the point (specified in pointFunctions) is in
global frame-->
<pointIsGlobal>false</pointIsGlobal>
<!--Flag indicating whether the quantities (specified in
force/torqueFunctions) is in global frame-->
<forceIsGlobal>true</forceIsGlobal>
<!--Three functions describing the force to be applied.-->
<FunctionSet name="forceFunctions">
<objects>
<NaturalCubicSpline name="ground_force_vx" />
<NaturalCubicSpline name="ground_force_vy" />
<NaturalCubicSpline name="ground_force_vz" />
</objects>
<groups />
</FunctionSet>
<!--Three functions describing the location at which the force is applied-->
<FunctionSet name="pointFunctions">
<objects>
<NaturalCubicSpline name="ground_force_px" />
<NaturalCubicSpline name="ground_force_py" />
<NaturalCubicSpline name="ground_force_pz" />
</objects>
<groups />
</FunctionSet>
<!--Three functions describing the torque the PrescribedForce applies-->
<FunctionSet name="torqueFunctions">
<objects>
<NaturalCubicSpline name="ground_torque_x" />
<NaturalCubicSpline name="ground_torque_y" />
<NaturalCubicSpline name="ground_torque_z" />
</objects>
<groups />
</FunctionSet>
</PrescribedForce>
<PrescribedForce name="LeftForce">
<applied_to_body>calcn_r</applied_to_body>
<!--Name of the body the force is expressed in (default is ground).-->
<force_expressed_in_body>ground</force_expressed_in_body>
<!--Name of the body the point is expressed in (default is ground).-->
<point_expressed_in_body>ground</point_expressed_in_body>
<!--Identifier (string) to locate the force to be applied in the data source.-->
<force_identifier>ground_force_v</force_identifier>
<!--Identifier (string) to locate the point to be applied in the data source.-->
<point_identifier>ground_force_p</point_identifier>
<!--Identifier (string) to locate the torque to be applied in the data source.-->
<torque_identifier>ground_torque_</torque_identifier>
</ExternalForce>
<ExternalForce name="LeftForce">
<!--Name of the body the force is applied to.-->
<body>calcn_l</body>
<!--Flag indicating whether the point (specified in pointFunctions) is in
global frame-->
<pointIsGlobal>false</pointIsGlobal>
<!--Flag indicating whether the quantities (specified in
force/torqueFunctions) is in global frame-->
<forceIsGlobal>true</forceIsGlobal>
<!--Three functions describing the force to be applied.-->
<FunctionSet name="forceFunctions">
<objects>
<NaturalCubicSpline name="l_ground_force_vx" />
<NaturalCubicSpline name="l_ground_force_vy" />
<NaturalCubicSpline name="l_ground_force_vz" />
</objects>
<groups />
</FunctionSet>
<!--Three functions describing the location at which the force is applied-->
<FunctionSet name="pointFunctions">
<objects>
<NaturalCubicSpline name="l_ground_force_px" />
<NaturalCubicSpline name="l_ground_force_py" />
<NaturalCubicSpline name="l_ground_force_pz" />
</objects>
<groups />
</FunctionSet>
<!--Three functions describing the torque the PrescribedForce applies-->
<FunctionSet name="torqueFunctions">
<objects>
<NaturalCubicSpline name="l_ground_torque_x" />
<NaturalCubicSpline name="l_ground_torque_y" />
<NaturalCubicSpline name="l_ground_torque_z" />
</objects>
<groups />
</FunctionSet>
</PrescribedForce>
<applied_to_body>calcn_l</applied_to_body>
<!--Name of the body the force is expressed in (default is ground).-->
<force_expressed_in_body>ground</force_expressed_in_body>
<!--Name of the body the point is expressed in (default is ground).-->
<point_expressed_in_body>ground</point_expressed_in_body>
<!--Identifier (string) to locate the force to be applied in the data source.-->
<force_identifier>l_ground_force_v</force_identifier>
<!--Identifier (string) to locate the point to be applied in the data source.-->
<point_identifier>l_ground_force_p</point_identifier>
<!--Identifier (string) to locate the torque to be applied in the data source.-->
<torque_identifier>l_ground_torque_</torque_identifier>
</ExternalForce>
</objects>
<!--Storage file (.sto) containing the Forces, Torques and locations of
the external loads.-->
<groups />
<!--Storage file (.sto) containing (3) components of force and/or torque and point of application.Note: this file overrides the data source specified by the individual external forces if specified.-->
<datafile>subject01_walk1_grf.mot</datafile>
<!--Motion file (.mot) or storage file (.sto) containing the model
kinematics corresponding to the external loads.-->
<external_loads_model_kinematics_file>subject01_walk1_ik.mot</external_loads_model_kinematics_file>
<!--Low-pass cut-off frequency for filtering the model kinematics
corresponding to the external loads. A negative value results in no
filtering. The default value is -1.0, so no filtering.-->
<lowpass_cutoff_frequency_for_load_kinematics>6</lowpass_cutoff_frequency_for_load_kinematics>
</ExternalLoads>
</OpenSimDocument>

Large diffs are not rendered by default.

Loading

0 comments on commit cbf3590

Please sign in to comment.