-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3927 from opensim-org/fix_external-loads-should-k…
…eep-xmldoc Fix external loads should keep xmldoc
- Loading branch information
Showing
7 changed files
with
186 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
OpenSim/Tools/Test/ExternalLoadsInSubdir/external-loads-in-subdir.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<OpenSimDocument Version="30000"> | ||
<ExternalLoads name="PendulumExternalLoads"> | ||
<objects> | ||
<ExternalForce name="single"> | ||
<!--Flag indicating whether the force is disabled or not. Disabled means that the force is not active in subsequent dynamics realizations.--> | ||
<isDisabled>false</isDisabled> | ||
<!--Name of the body the force is applied to.--> | ||
<applied_to_body>new_body</applied_to_body> | ||
<!--Name of the body the force is expressed in (default is ground).--> | ||
<force_expressed_in_body>new_body</force_expressed_in_body> | ||
<!--Name of the body the point is expressed in (default is ground).--> | ||
<point_expressed_in_body>new_body</point_expressed_in_body> | ||
<!--Identifier (string) to locate the force to be applied in the data source.--> | ||
<force_identifier>head_v</force_identifier> | ||
<!--Identifier (string) to locate the point to be applied in the data source.--> | ||
<point_identifier>head_p</point_identifier> | ||
<!--Identifier (string) to locate the torque to be applied in the data source.--> | ||
<!--Name of the data source (Storage) that will supply the force data.--> | ||
<data_source_name>Unassigned</data_source_name> | ||
</ExternalForce> | ||
</objects> | ||
<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>forces-in-subdir.mot</datafile> | ||
</ExternalLoads> | ||
</OpenSimDocument> |
9 changes: 9 additions & 0 deletions
9
OpenSim/Tools/Test/ExternalLoadsInSubdir/forces-in-subdir.mot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
pendulum_swing | ||
version=1 | ||
nRows=2 | ||
nColumns=7 | ||
inDegrees=yes | ||
endheader | ||
time head_vx head_vy head_vz head_px head_py head_pz | ||
0 0 0 0 0 0 0 | ||
1 1000 1000 1000 0 0 0 |
115 changes: 115 additions & 0 deletions
115
OpenSim/Tools/Test/ExternalLoadsInSubdir/model-in-subdir.osim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<OpenSimDocument Version="40600"> | ||
<Model name="model"> | ||
<!--The model's ground reference frame.--> | ||
<Ground name="ground"> | ||
<!--The geometry used to display the axes of this Frame.--> | ||
<FrameGeometry name="frame_geometry"> | ||
<!--Path to a Component that satisfies the Socket 'frame' of type Frame.--> | ||
<socket_frame>..</socket_frame> | ||
<!--Scale factors in X, Y, Z directions respectively.--> | ||
<scale_factors>0.20000000000000001 0.20000000000000001 0.20000000000000001</scale_factors> | ||
</FrameGeometry> | ||
</Ground> | ||
<!--List of bodies that make up this model.--> | ||
<BodySet name="bodyset"> | ||
<objects> | ||
<Body name="new_body"> | ||
<!--The geometry used to display the axes of this Frame.--> | ||
<FrameGeometry name="frame_geometry"> | ||
<!--Path to a Component that satisfies the Socket 'frame' of type Frame.--> | ||
<socket_frame>..</socket_frame> | ||
<!--Scale factors in X, Y, Z directions respectively.--> | ||
<scale_factors>0.20000000000000001 0.20000000000000001 0.20000000000000001</scale_factors> | ||
</FrameGeometry> | ||
<!--List of geometry attached to this Frame. Note, the geometry are treated as fixed to the frame and they share the transform of the frame when visualized--> | ||
<attached_geometry> | ||
<Sphere name="new_body_geom_1"> | ||
<!--Path to a Component that satisfies the Socket 'frame' of type Frame.--> | ||
<socket_frame>..</socket_frame> | ||
<!--Radius of sphere, defaults to 1.0--> | ||
<radius>0.10000000000000001</radius> | ||
</Sphere> | ||
</attached_geometry> | ||
<!--The mass of the body (kg)--> | ||
<mass>1</mass> | ||
<!--The location (Vec3) of the mass center in the body frame.--> | ||
<mass_center>0 0 0</mass_center> | ||
<!--The elements of the inertia tensor (Vec6) as [Ixx Iyy Izz Ixy Ixz Iyz] measured about the mass_center and not the body origin.--> | ||
<inertia>1 1 1 0 0 0</inertia> | ||
</Body> | ||
</objects> | ||
<groups /> | ||
</BodySet> | ||
<!--List of joints that connect the bodies.--> | ||
<JointSet name="jointset"> | ||
<objects> | ||
<PinJoint name="pinjoint"> | ||
<!--Path to a Component that satisfies the Socket 'parent_frame' of type PhysicalFrame (description: The parent frame for the joint.).--> | ||
<socket_parent_frame>ground_offset</socket_parent_frame> | ||
<!--Path to a Component that satisfies the Socket 'child_frame' of type PhysicalFrame (description: The child frame for the joint.).--> | ||
<socket_child_frame>new_body_offset</socket_child_frame> | ||
<!--List containing the generalized coordinates (q's) that parameterize this joint.--> | ||
<coordinates> | ||
<Coordinate name="rz"> | ||
<!--The value of this coordinate before any value has been set. Rotational coordinate value is in radians and Translational in meters.--> | ||
<default_value>1.5707963705062866</default_value> | ||
</Coordinate> | ||
</coordinates> | ||
<!--Physical offset frames owned by the Joint that are typically used to satisfy the owning Joint's parent and child frame connections (sockets). PhysicalOffsetFrames are often used to describe the fixed transformation from a Body's origin to another location of interest on the Body (e.g., the joint center). When the joint is deleted, so are the PhysicalOffsetFrame components in this list.--> | ||
<frames> | ||
<PhysicalOffsetFrame name="ground_offset"> | ||
<!--The geometry used to display the axes of this Frame.--> | ||
<FrameGeometry name="frame_geometry"> | ||
<!--Path to a Component that satisfies the Socket 'frame' of type Frame.--> | ||
<socket_frame>..</socket_frame> | ||
<!--Scale factors in X, Y, Z directions respectively.--> | ||
<scale_factors>0.20000000000000001 0.20000000000000001 0.20000000000000001</scale_factors> | ||
</FrameGeometry> | ||
<!--Path to a Component that satisfies the Socket 'parent' of type C (description: The parent frame to this frame.).--> | ||
<socket_parent>/ground</socket_parent> | ||
<!--Translational offset (in meters) of this frame's origin from the parent frame's origin, expressed in the parent frame.--> | ||
<translation>0 1 0</translation> | ||
<!--Orientation offset (in radians) of this frame in its parent frame, expressed as a frame-fixed x-y-z rotation sequence.--> | ||
<orientation>-0 0 -0</orientation> | ||
</PhysicalOffsetFrame> | ||
<PhysicalOffsetFrame name="new_body_offset"> | ||
<!--The geometry used to display the axes of this Frame.--> | ||
<FrameGeometry name="frame_geometry"> | ||
<!--Path to a Component that satisfies the Socket 'frame' of type Frame.--> | ||
<socket_frame>..</socket_frame> | ||
<!--Scale factors in X, Y, Z directions respectively.--> | ||
<scale_factors>0.20000000000000001 0.20000000000000001 0.20000000000000001</scale_factors> | ||
</FrameGeometry> | ||
<!--Path to a Component that satisfies the Socket 'parent' of type C (description: The parent frame to this frame.).--> | ||
<socket_parent>/bodyset/new_body</socket_parent> | ||
<!--Translational offset (in meters) of this frame's origin from the parent frame's origin, expressed in the parent frame.--> | ||
<translation>-0 0.46722877025604248 -0</translation> | ||
<!--Orientation offset (in radians) of this frame in its parent frame, expressed as a frame-fixed x-y-z rotation sequence.--> | ||
<orientation>-0 0 -0</orientation> | ||
</PhysicalOffsetFrame> | ||
</frames> | ||
</PinJoint> | ||
</objects> | ||
<groups /> | ||
</JointSet> | ||
<!--Controllers that provide the control inputs for Actuators.--> | ||
<ControllerSet name="controllerset"> | ||
<objects /> | ||
<groups /> | ||
</ControllerSet> | ||
<!--Forces in the model (includes Actuators).--> | ||
<ForceSet name="forceset"> | ||
<objects /> | ||
<groups /> | ||
</ForceSet> | ||
<!--Visual preferences for this model.--> | ||
<ModelVisualPreferences name="modelvisualpreferences"> | ||
<!--Model display preferences--> | ||
<ModelDisplayHints> | ||
<!--Flag to indicate whether or not to show frames, default to false.--> | ||
<show_frames>true</show_frames> | ||
</ModelDisplayHints> | ||
</ModelVisualPreferences> | ||
</Model> | ||
</OpenSimDocument> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters