Questions about weld constraint

Simbody is useful for internal coordinate and coarse grained molecule modeling, large scale mechanical models like skeletons, and anything else that can be modeled as bodies interconnected by joints, acted upon by forces, and restricted by constraints.
POST REPLY
User avatar
Zu Xueying
Posts: 7
Joined: Wed Apr 21, 2021 5:59 am

Questions about weld constraint

Post by Zu Xueying » Thu Jul 01, 2021 2:21 am

Hello, all!
I tried to add a weld constraint to my model, but if I write the code like this:

Code: Select all

<ConstraintSet name="constraintset">
			<objects>
				<WeldConstraint name="tuigan1_qiufu">
					<frame1name>qiufu1_offset</frame1name>
					<frame2name>tuigan1_offset</frame2name>
					
				</WeldConstraint>
			</objects>
		</ConstraintSet>
Then there will be an error message:
Failed to connect Socket 'frame1' of type PhysicalFrame (details: Connectee for Socket 'frame1' of type PhysicalFrame in WeldConstraint at /constraintset/tuigan1_qiufu is unspecified. If this model was built programmatically, perhaps finalizeConnections() was not called before printing.
Thrown at Component.h:3344 in finalizeConnection().).
In Object 'tuigan1_qiufu' of type WeldConstraint.
Thrown at Component.cpp:313 in finalizeConnections().
And if I write the code like this :

Code: Select all

<ConstraintSet name="constraintset">
			<objects>
				<WeldConstraint name="tuigan1_qiufu">
					<frame1name>qiufu1_offset</frame1name>
					<frame2name>tuigan1_offset</frame2name>
					<frames>
						<PhysicalOffsetFrame name="tuigan1_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/tuigan1</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.021250000000000002 0.00080000000000000004</translation>
							<!--Orientation offset (in radians) of this frame in its parent frame, expressed as a frame-fixed x-y-z rotation sequence.-->
							<orientation>3.1416927000000001 0 0</orientation>
						</PhysicalOffsetFrame>
						<PhysicalOffsetFrame name="qiufu1_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/qiufu1</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.02 0</translation>
							<!--Orientation offset (in radians) of this frame in its parent frame, expressed as a frame-fixed x-y-z rotation sequence.-->
							<orientation>1.5708 0 0</orientation>
						</PhysicalOffsetFrame>
					</frames>
			</WeldConstraint>
			</objects>
		</ConstraintSet>
Then the model cannot be shown in Opensim. I wonder why did this happen and how should I correct the code.
Thanks for your help!

User avatar
Michael Sherman
Posts: 812
Joined: Fri Apr 01, 2005 6:05 pm

Re: Questions about weld constraint

Post by Michael Sherman » Thu Jul 01, 2021 8:11 am

This looks like an OpenSim question. Please post it to the OpenSim forum here rather than the Simbody forum.

User avatar
Zu Xueying
Posts: 7
Joined: Wed Apr 21, 2021 5:59 am

Re: Questions about weld constraint

Post by Zu Xueying » Fri Jul 02, 2021 12:36 am

Sorry I didn't notice that

POST REPLY