Joints in code not building in GUI

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Alex Smith
Posts: 2
Joined: Wed Apr 17, 2019 2:55 am

Joints in code not building in GUI

Post by Alex Smith » Tue Aug 13, 2019 7:20 am

Hi guys,

I'm currently trying to implement a biomimetic knee brace into a model for some analysis, but I'm having problems with the joints building in the GUI. I occasionally get an error message thrown when opening
BodyModel_SimReadyActual_1.osim
Body Model file
(641.46 KiB) Downloaded 23 times
, (See
Error_1.PNG
Error Message
Error_1.PNG (9.92 KiB) Viewed 523 times
) but mostly it opens fine.

The weld joints connecting the brace to the femur and tibia are created correctly, but the CustomJoint "brace_outer" between the brace bodies is absent. If anyone has any suggestions or can offer a solution that would be amazing! I'm not all that confident with coding, so it's more than likely something simple I'm missing.

I've separated out the relevant bodies and joints from the code and put them here, for the joint between the brace bodies I have effectively just copied the knee joint and altered the parent and child bodies:

Bodies:

Code: Select all

<Body name="r_Brace_Fem_Outer">
					<!--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>
						<Mesh name="r_Brace_Fem_Outer_geom_1">
							<!--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.001 0.001 0.001</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>Femoral_End_R.STL</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>0.23674551227033083</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.018939640981626468 0.0047349102454066171 0.018939640981626468 0 0 0</inertia>
				</Body>
				<Body name="r_Brace_Tib_Outer">
					<!--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>
						<Mesh name="r_Brace_Tib_Outer_geom_1">
							<!--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.001 0.001 0.001</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>Tibial_Head_R.STL</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>0.47349102454066166</mass>
					<!--The location (Vec3) of the mass center in the body frame.-->
					<mass_center>0.080000000000000002 -0.050000000000000003 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.0047349102454066171 0.011837275613516541 0.013257748687138526 0 0 0</inertia>
				</Body>
				<Body name="r_Brace_Fem_Inner">
					<!--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>
						<Mesh name="r_Brace_Fem_Inner_geom_1">
							<!--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.001 0.001 0.001</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>Femoral_End_L.STL</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>0.23674551227033083</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.018939640981626468 0.0047349102454066171 0.018939640981626468 0 0 0</inertia>
				</Body>
				<Body name="r_Brace_Tib_Inner">
					<!--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>
						<Mesh name="r_Brace_Tib_Inner_geom_1">
							<!--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.001 0.001 0.001</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>Tibial_Head_L.STL</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>0.47349102454066166</mass>
					<!--The location (Vec3) of the mass center in the body frame.-->
					<mass_center>0.080000000000000002 -0.050000000000000003 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.0047349102454066171 0.011837275613516541 0.013257748687138526 0 0 0</inertia>
				</Body>
Joints:

Code: Select all

<WeldJoint name="r_Brace_Fem_O">
					<!--Path to a Component that satisfies the Socket 'parent_frame' of type PhysicalFrame (description: The parent frame for the joint.).-->
					<socket_parent_frame>femur_r_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>r_Brace_Fem_Outer_offset</socket_child_frame>
					<!--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="femur_r_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/femur_r</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.29999999999999999 0.068834400000000004</translation>
							<!--Orientation offset (in radians) of this frame in its parent frame, expressed as a frame-fixed x-y-z rotation sequence.-->
							<orientation>0 3.1415899999999999 0</orientation>
						</PhysicalOffsetFrame>
						<PhysicalOffsetFrame name="r_Brace_Fem_Outer_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/r_Brace_Fem_Outer</socket_parent>
							<!--Translational offset (in meters) of this frame's origin from the parent frame's origin, expressed in the parent frame.-->
							<translation>-0.0050000000000000001 0.14499999999999999 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>
				</WeldJoint>
				<WeldJoint name="r_Brace_Tib_O">
					<!--Path to a Component that satisfies the Socket 'parent_frame' of type PhysicalFrame (description: The parent frame for the joint.).-->
					<socket_parent_frame>tibia_r_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>r_Brace_Tib_Outer_offset</socket_child_frame>
					<!--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="tibia_r_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/tibia_r</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.13500000000000001 0.070000000000000007</translation>
							<!--Orientation offset (in radians) of this frame in its parent frame, expressed as a frame-fixed x-y-z rotation sequence.-->
							<orientation>0 1.5705 0</orientation>
						</PhysicalOffsetFrame>
						<PhysicalOffsetFrame name="r_Brace_Tib_Outer_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/r_Brace_Tib_Outer</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.13200000000000001 0.0074999999999999997</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>
				</WeldJoint>
				<WeldJoint name="r_Brace_Fem_I">
					<!--Path to a Component that satisfies the Socket 'parent_frame' of type PhysicalFrame (description: The parent frame for the joint.).-->
					<socket_parent_frame>femur_r_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>r_Brace_Fem_Inner_offset</socket_child_frame>
					<!--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="femur_r_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/femur_r</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.2982824 -0.068834400000000004</translation>
							<!--Orientation offset (in radians) of this frame in its parent frame, expressed as a frame-fixed x-y-z rotation sequence.-->
							<orientation>0 3.1415899999999999 0</orientation>
						</PhysicalOffsetFrame>
						<PhysicalOffsetFrame name="r_Brace_Fem_Inner_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/r_Brace_Fem_Inner</socket_parent>
							<!--Translational offset (in meters) of this frame's origin from the parent frame's origin, expressed in the parent frame.-->
							<translation>-0.0050000000000000001 0.14499999999999999 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>
				</WeldJoint>
				<WeldJoint name="r_Brace_Tib_I">
					<!--Path to a Component that satisfies the Socket 'parent_frame' of type PhysicalFrame (description: The parent frame for the joint.).-->
					<socket_parent_frame>tibia_r_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>r_Brace_Tib_Inner_offset</socket_child_frame>
					<!--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="tibia_r_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/tibia_r</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.13200000000000001 -0.070000000000000007</translation>
							<!--Orientation offset (in radians) of this frame in its parent frame, expressed as a frame-fixed x-y-z rotation sequence.-->
							<orientation>0 1.5705 0</orientation>
						</PhysicalOffsetFrame>
						<PhysicalOffsetFrame name="r_Brace_Tib_Inner_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/r_Brace_Tib_Inner</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.13200000000000001 0.0074999999999999997</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>
				</WeldJoint>
				<CustomJoint name="brace_outer">
					<!--Path to a Component that satisfies the Socket 'parent_frame' of type PhysicalFrame (description: The parent frame for the joint.).-->
					<socket_parent_frame>r_Brace_Fem_Outer_offset_2</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>r_Brace_Tib_Outer_offset_2</socket_child_frame>
					<!--List containing the generalized coordinates (q's) that parameterize this joint.-->
					<coordinates>
						<Coordinate name="brace_angle_outer">
							<!--The value of this coordinate before any value has been set. Rotational coordinate value is in radians and Translational in meters.-->
							<default_value>0</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>-2.0943950999999998 0.17453293</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 />
						</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="r_Brace_Fem_Outer_offset_2">
							<!--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/r_Brace_Fem_Outer</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 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="r_Brace_Tib_Outer_offset_2">
							<!--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/r_Brace_Tib_Outer</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 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>
					<!--Defines how the child body moves with respect to the parent as a function of the generalized coordinates.-->
					<SpatialTransform>
						<!--3 Axes for rotations are listed first.-->
						<TransformAxis name="rotation1">
							<!--Names of the coordinates that serve as the independent variables         of the transform function.-->
							<coordinates>brace_angle_outer</coordinates>
							<!--Rotation or translation axis for the transform.-->
							<axis>0 0 1</axis>
							<!--Transform function of the generalized coordinates used to        represent the amount of displacement along a specified axis.-->
							<LinearFunction name="function">
								<coefficients> 1 0</coefficients>
							</LinearFunction>
						</TransformAxis>
						<TransformAxis name="rotation2">
							<!--Names of the coordinates that serve as the independent variables         of the transform function.-->
							<coordinates></coordinates>
							<!--Rotation or translation axis for the transform.-->
							<axis>0 1 0</axis>
							<!--Transform function of the generalized coordinates used to        represent the amount of displacement along a specified axis.-->
							<Constant name="function">
								<value>0</value>
							</Constant>
						</TransformAxis>
						<TransformAxis name="rotation3">
							<!--Names of the coordinates that serve as the independent variables         of the transform function.-->
							<coordinates></coordinates>
							<!--Rotation or translation axis for the transform.-->
							<axis>1 0 0</axis>
							<!--Transform function of the generalized coordinates used to        represent the amount of displacement along a specified axis.-->
							<Constant name="function">
								<value>0</value>
							</Constant>
						</TransformAxis>
						<!--3 Axes for translations are listed next.-->
						<TransformAxis name="translation1">
							<!--Names of the coordinates that serve as the independent variables         of the transform function.-->
							<coordinates>brace_angle_outer</coordinates>
							<!--Rotation or translation axis for the transform.-->
							<axis>1 0 0</axis>
							<!--Transform function of the generalized coordinates used to        represent the amount of displacement along a specified axis.-->
							<MultiplierFunction name="function">
								<function>
									<SimmSpline name="function">
										<x> -2.0944 -1.74533 -1.39626 -1.0472 -0.698132 -0.349066 -0.174533 0.197344 0.337395 0.490178 1.52146 2.0944</x>
										<y> -0.0032 0.00179 0.00411 0.0041 0.00212 -0.001 -0.0031 -0.005227 -0.005435 -0.005574 -0.005435 -0.00525</y>
									</SimmSpline>
								</function>
								<scale>1.14724</scale>
							</MultiplierFunction>
						</TransformAxis>
						<TransformAxis name="translation2">
							<!--Names of the coordinates that serve as the independent variables         of the transform function.-->
							<coordinates>brace_angle_outer</coordinates>
							<!--Rotation or translation axis for the transform.-->
							<axis>0 1 0</axis>
							<!--Transform function of the generalized coordinates used to        represent the amount of displacement along a specified axis.-->
							<MultiplierFunction name="function">
								<function>
									<SimmSpline name="function">
										<x> -2.0944 -1.22173 -0.523599 -0.349066 -0.174533 0.159149 2.0944</x>
										<y> -0.4226 -0.4082 -0.399 -0.3976 -0.3966 -0.395264 -0.396</y>
									</SimmSpline>
								</function>
								<scale>1.14724</scale>
							</MultiplierFunction>
						</TransformAxis>
						<TransformAxis name="translation3">
							<!--Names of the coordinates that serve as the independent variables         of the transform function.-->
							<coordinates></coordinates>
							<!--Rotation or translation axis for the transform.-->
							<axis>0 0 1</axis>
							<!--Transform function of the generalized coordinates used to        represent the amount of displacement along a specified axis.-->
							<MultiplierFunction name="function">
								<function>
									<Constant name="function">
										<value>0</value>
									</Constant>
								</function>
								<scale>1.14724</scale>
							</MultiplierFunction>
						</TransformAxis>
					</SpatialTransform>
				</CustomJoint>

Tags:

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: Joints in code not building in GUI

Post by jimmy d » Wed Aug 28, 2019 2:44 pm

Possibly, the reason may be that you are reusing frames for the different joints-- tibia_r_offset frame is created for the knee joint and then you reuse the same frame for r_brace_tib_0. I think it would be better to make a new frame specifically for this joint and call it something like 'tibia_r_brace_offset'. That way, when you start adding translations and orientations of frames you know exactly which frame is being acted on.

User avatar
Alex Smith
Posts: 2
Joined: Wed Apr 17, 2019 2:55 am

Re: Joints in code not building in GUI

Post by Alex Smith » Fri Aug 30, 2019 2:39 am

jimmy wrote:
Wed Aug 28, 2019 2:44 pm
Possibly, the reason may be that you are reusing frames for the different joints-- tibia_r_offset frame is created for the knee joint and then you reuse the same frame for r_brace_tib_0. I think it would be better to make a new frame specifically for this joint and call it something like 'tibia_r_brace_offset'. That way, when you start adding translations and orientations of frames you know exactly which frame is being acted on.
Hi James, thanks for having a look! I've tried using various different names for the new frames already, and the error message (as pictured) is still consistent regardless.
I appreciate the help

Alex

POST REPLY