<?xml version="1.0" encoding="UTF-8" ?>
<OpenSimDocument Version="40000">
	<Model name="double_pendulum">
		<!--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>
				<!--Path to an output (channel) to satisfy the one-value Input 'transform' of type SimTK::Transform (description: The transform that positions the Geometry in Ground so it can be positioned. Note, either the Geometry is attached to a Frame OR the input transform can be supplied, but not both. ).-->
				<input_transform></input_transform>
				<!--Scale factors in X, Y, Z directions respectively.-->
				<scale_factors>0.20000000000000001 0.20000000000000001 0.20000000000000001</scale_factors>
			</FrameGeometry>
			<!--Set of wrap objects fixed to this body that GeometryPaths can wrap over.This property used to be a member of Body but was moved up with the introduction of Frames.-->
			<WrapObjectSet name="wrapobjectset">
				<objects />
				<groups />
			</WrapObjectSet>
		</Ground>
		<!--Acceleration due to gravity, expressed in ground.-->
		<gravity>0 -9.8066499999999994 0</gravity>
		<!--Credits (e.g., model author names) associated with the model.-->
		<credits>Ajay Seth, Ayman Habib</credits>
		<!--Publications and references associated with the model.-->
		<publications>For testing</publications>
		<!--Units for all lengths.-->
		<length_units>meters</length_units>
		<!--Units for all forces.-->
		<force_units>N</force_units>
		<!--List of bodies that make up this model.-->
		<BodySet name="bodyset">
			<objects>
				<Body name="rod1">
					<!--List of components that this component owns and serializes.-->
					<components>
						<PhysicalOffsetFrame name="rod1_geom_frame_1">
							<!--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>
								<!--Path to an output (channel) to satisfy the one-value Input 'transform' of type SimTK::Transform (description: The transform that positions the Geometry in Ground so it can be positioned. Note, either the Geometry is attached to a Frame OR the input transform can be supplied, but not both. ).-->
								<input_transform></input_transform>
								<!--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>
								<Mesh name="rod1_geom_1">
									<!--Path to a Component that satisfies the Socket 'frame' of type Frame.-->
									<socket_frame>..</socket_frame>
									<!--Path to an output (channel) to satisfy the one-value Input 'transform' of type SimTK::Transform (description: The transform that positions the Geometry in Ground so it can be positioned. Note, either the Geometry is attached to a Frame OR the input transform can be supplied, but not both. ).-->
									<input_transform></input_transform>
									<!--Scale factors in X, Y, Z directions respectively.-->
									<scale_factors>0.02 0.5 0.02</scale_factors>
									<!--Default appearance attributes for this Geometry-->
									<Appearance>
										<!--The opacity used to display the geometry between 0:transparent, 1:opaque.-->
										<opacity>1</opacity>
										<!--The color, (red, green, blue), [0, 1], used to display the geometry. -->
										<color>1 1 1</color>
									</Appearance>
									<!--Name of geometry file.-->
									<mesh_file>cylinder.vtp</mesh_file>
								</Mesh>
							</attached_geometry>
							<!--Path to a Component that satisfies the Socket 'parent' of type C (description: The parent frame to this frame.).-->
							<socket_parent>..</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.25 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>
					</components>
					<!--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>
						<!--Path to an output (channel) to satisfy the one-value Input 'transform' of type SimTK::Transform (description: The transform that positions the Geometry in Ground so it can be positioned. Note, either the Geometry is attached to a Frame OR the input transform can be supplied, but not both. ).-->
						<input_transform></input_transform>
						<!--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>
						<Mesh name="rod1_geom_2">
							<!--Path to a Component that satisfies the Socket 'frame' of type Frame.-->
							<socket_frame>..</socket_frame>
							<!--Path to an output (channel) to satisfy the one-value Input 'transform' of type SimTK::Transform (description: The transform that positions the Geometry in Ground so it can be positioned. Note, either the Geometry is attached to a Frame OR the input transform can be supplied, but not both. ).-->
							<input_transform></input_transform>
							<!--Scale factors in X, Y, Z directions respectively.-->
							<scale_factors>0.10000000000000001 0.10000000000000001 0.10000000000000001</scale_factors>
							<!--Default appearance attributes for this Geometry-->
							<Appearance>
								<!--The opacity used to display the geometry between 0:transparent, 1:opaque.-->
								<opacity>1</opacity>
								<!--The color, (red, green, blue), [0, 1], used to display the geometry. -->
								<color>1 1 1</color>
							</Appearance>
							<!--Name of geometry file.-->
							<mesh_file>sphere.vtp</mesh_file>
						</Mesh>
					</attached_geometry>
					<!--Set of wrap objects fixed to this body that GeometryPaths can wrap over.This property used to be a member of Body but was moved up with the introduction of Frames.-->
					<WrapObjectSet name="wrapobjectset">
						<objects />
						<groups />
					</WrapObjectSet>
					<!--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>0 0 0 0 0 0</inertia>
				</Body>
				<Body name="rod2">
					<!--List of components that this component owns and serializes.-->
					<components>
						<PhysicalOffsetFrame name="rod2_geom_frame_1">
							<!--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>
								<!--Path to an output (channel) to satisfy the one-value Input 'transform' of type SimTK::Transform (description: The transform that positions the Geometry in Ground so it can be positioned. Note, either the Geometry is attached to a Frame OR the input transform can be supplied, but not both. ).-->
								<input_transform></input_transform>
								<!--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>
								<Mesh name="rod2_geom_1">
									<!--Path to a Component that satisfies the Socket 'frame' of type Frame.-->
									<socket_frame>..</socket_frame>
									<!--Path to an output (channel) to satisfy the one-value Input 'transform' of type SimTK::Transform (description: The transform that positions the Geometry in Ground so it can be positioned. Note, either the Geometry is attached to a Frame OR the input transform can be supplied, but not both. ).-->
									<input_transform></input_transform>
									<!--Scale factors in X, Y, Z directions respectively.-->
									<scale_factors>0.02 0.5 0.02</scale_factors>
									<!--Default appearance attributes for this Geometry-->
									<Appearance>
										<!--The opacity used to display the geometry between 0:transparent, 1:opaque.-->
										<opacity>1</opacity>
										<!--The color, (red, green, blue), [0, 1], used to display the geometry. -->
										<color>1 1 1</color>
									</Appearance>
									<!--Name of geometry file.-->
									<mesh_file>cylinder.vtp</mesh_file>
								</Mesh>
							</attached_geometry>
							<!--Path to a Component that satisfies the Socket 'parent' of type C (description: The parent frame to this frame.).-->
							<socket_parent>..</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.25 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>
					</components>
					<!--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>
						<!--Path to an output (channel) to satisfy the one-value Input 'transform' of type SimTK::Transform (description: The transform that positions the Geometry in Ground so it can be positioned. Note, either the Geometry is attached to a Frame OR the input transform can be supplied, but not both. ).-->
						<input_transform></input_transform>
						<!--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>
						<Mesh name="rod2_geom_2">
							<!--Path to a Component that satisfies the Socket 'frame' of type Frame.-->
							<socket_frame>..</socket_frame>
							<!--Path to an output (channel) to satisfy the one-value Input 'transform' of type SimTK::Transform (description: The transform that positions the Geometry in Ground so it can be positioned. Note, either the Geometry is attached to a Frame OR the input transform can be supplied, but not both. ).-->
							<input_transform></input_transform>
							<!--Scale factors in X, Y, Z directions respectively.-->
							<scale_factors>0.10000000000000001 0.10000000000000001 0.10000000000000001</scale_factors>
							<!--Default appearance attributes for this Geometry-->
							<Appearance>
								<!--The opacity used to display the geometry between 0:transparent, 1:opaque.-->
								<opacity>1</opacity>
								<!--The color, (red, green, blue), [0, 1], used to display the geometry. -->
								<color>1 1 1</color>
							</Appearance>
							<!--Name of geometry file.-->
							<mesh_file>sphere.vtp</mesh_file>
						</Mesh>
					</attached_geometry>
					<!--Set of wrap objects fixed to this body that GeometryPaths can wrap over.This property used to be a member of Body but was moved up with the introduction of Frames.-->
					<WrapObjectSet name="wrapobjectset">
						<objects />
						<groups />
					</WrapObjectSet>
					<!--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>0 0 0 0 0 0</inertia>
				</Body>
			</objects>
			<groups />
		</BodySet>
		<!--List of joints that connect the bodies.-->
		<JointSet name="jointset">
			<objects>
				<PinJoint name="pin1">
					<!--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>rod1_offset</socket_child_frame>
					<!--List containing the generalized coordinates (q's) that parameterize this joint.-->
					<coordinates>
						<Coordinate name="q1">
							<!--The value of this coordinate before any value has been set. Rotational coordinate value is in radians and Translational in meters.-->
							<default_value>-0.78539815999999996</default_value>
							<!--The speed value of this coordinate before any value has been set. Rotational coordinate value is in rad/s and Translational in m/s.-->
							<default_speed_value>0</default_speed_value>
							<!--The minimum and maximum values that the coordinate can range between. Rotational coordinate range in radians and Translational in meters.-->
							<range>-1.5707963300000001 1.5707963300000001</range>
							<!--Flag indicating whether or not the values of the coordinates should be limited to the range, above.-->
							<clamped>false</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>
					</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>
								<!--Path to an output (channel) to satisfy the one-value Input 'transform' of type SimTK::Transform (description: The transform that positions the Geometry in Ground so it can be positioned. Note, either the Geometry is attached to a Frame OR the input transform can be supplied, but not both. ).-->
								<input_transform></input_transform>
								<!--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.1000000000000001 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="rod1_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>
								<!--Path to an output (channel) to satisfy the one-value Input 'transform' of type SimTK::Transform (description: The transform that positions the Geometry in Ground so it can be positioned. Note, either the Geometry is attached to a Frame OR the input transform can be supplied, but not both. ).-->
								<input_transform></input_transform>
								<!--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/rod1</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.5 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>
				<PinJoint name="pin2">
					<!--Path to a Component that satisfies the Socket 'parent_frame' of type PhysicalFrame (description: The parent frame for the joint.).-->
					<socket_parent_frame>/bodyset/rod1</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>rod2_offset</socket_child_frame>
					<!--List containing the generalized coordinates (q's) that parameterize this joint.-->
					<coordinates>
						<Coordinate name="q2">
							<!--The value of this coordinate before any value has been set. Rotational coordinate value is in radians and Translational in meters.-->
							<default_value>-1.0471975499999999</default_value>
							<!--The speed value of this coordinate before any value has been set. Rotational coordinate value is in rad/s and Translational in m/s.-->
							<default_speed_value>0</default_speed_value>
							<!--The minimum and maximum values that the coordinate can range between. Rotational coordinate range in radians and Translational in meters.-->
							<range>-1.5707963300000001 1.5707963300000001</range>
							<!--Flag indicating whether or not the values of the coordinates should be limited to the range, above.-->
							<clamped>false</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>
					</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="rod2_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>
								<!--Path to an output (channel) to satisfy the one-value Input 'transform' of type SimTK::Transform (description: The transform that positions the Geometry in Ground so it can be positioned. Note, either the Geometry is attached to a Frame OR the input transform can be supplied, but not both. ).-->
								<input_transform></input_transform>
								<!--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/rod2</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.5 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>
		</JointSet>
		<!--Controllers that provide the control inputs for Actuators.-->
		<ControllerSet name="controllerset">
			<objects />
			<groups />
		</ControllerSet>
		<!--Constraints in the model.-->
		<ConstraintSet name="constraintset">
			<objects />
			<groups />
		</ConstraintSet>
		<!--Forces in the model (includes Actuators).-->
		<ForceSet name="forceset">
			<objects>
				<CoordinateActuator name="Torq1">
					<!--Flag indicating whether the force is applied or not. If true the forceis applied to the MultibodySystem otherwise the force is not applied.NOTE: Prior to OpenSim 4.0, this behavior was controlled by the 'isDisabled' property, where 'true' meant that force was not being applied. Thus, if 'isDisabled' is true, then 'appliesForce` is false.-->
					<appliesForce>true</appliesForce>
					<!--Minimum allowed value for control signal. Used primarily when solving for control values.-->
					<min_control>-Inf</min_control>
					<!--Maximum allowed value for control signal. Used primarily when solving for control values.-->
					<max_control>Inf</max_control>
					<!--Name of the generalized coordinate to which the actuator applies.-->
					<coordinate>q1</coordinate>
					<!--The maximum generalized force produced by this actuator.-->
					<optimal_force>1</optimal_force>
				</CoordinateActuator>
				<CoordinateActuator name="Torq2">
					<!--Flag indicating whether the force is applied or not. If true the forceis applied to the MultibodySystem otherwise the force is not applied.NOTE: Prior to OpenSim 4.0, this behavior was controlled by the 'isDisabled' property, where 'true' meant that force was not being applied. Thus, if 'isDisabled' is true, then 'appliesForce` is false.-->
					<appliesForce>true</appliesForce>
					<!--Minimum allowed value for control signal. Used primarily when solving for control values.-->
					<min_control>-Inf</min_control>
					<!--Maximum allowed value for control signal. Used primarily when solving for control values.-->
					<max_control>Inf</max_control>
					<!--Name of the generalized coordinate to which the actuator applies.-->
					<coordinate>q2</coordinate>
					<!--The maximum generalized force produced by this actuator.-->
					<optimal_force>1</optimal_force>
				</CoordinateActuator>
			</objects>
			<groups />
		</ForceSet>
		<!--Markers in the model.-->
		<MarkerSet name="markerset">
			<objects />
			<groups />
		</MarkerSet>
		<!--Geometry to be used in contact forces.-->
		<ContactGeometrySet name="contactgeometryset">
			<objects />
			<groups />
		</ContactGeometrySet>
	</Model>
</OpenSimDocument>
