Assembly error when adding new solids

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
dani mendez
Posts: 24
Joined: Tue Aug 07, 2018 1:40 am

Assembly error when adding new solids

Post by dani mendez » Thu Jun 27, 2019 5:26 am

Good afternoon, I added different solids to the Dynamic Arm Simulator model.
The problem is that when doing the IK study the following error message appears:

InverseKinematicsTool Failed: AssemblySolver::assemble() Failed: SimTK Exception thrown at assembler.cpp:871:
Method Assembler::assemble() failed because:
Optimizer failed with message: SimTK Exception thrown at interiorpointoptimizer.cpp:264:
Optimizer failed: Ipopt: Maximum iterations exceeded (status -1)
Assembly error tolerance achieved: 0.08713462847292025 required: 1.0000000000000002e-06.


The definition of the different bodies is the following:

<Body name="placa_humerus_r">
<!--List of components that this component owns and serializes.-->
<components>
<PhysicalOffsetFrame name="placa_humerus_r_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>
<!--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="placa_humerus_r_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.00089999999999999998 0.0012999999999999999 0.0011000000000000001</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>0 0 1</color>
</Appearance>
<!--Name of geometry file.-->
<mesh_file>placa_v02.stl</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.040000000000000001 -0.32000000000000001 0.029999999999999999</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.6000000000000001 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>
<!--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 />
<!--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.20000000000000001</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="placa_ulna_r">
<!--List of components that this component owns and serializes.-->
<components>
<PhysicalOffsetFrame name="placa_ulna_r_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>
<!--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="placa_ulna_r_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.00089999999999999998 0.0011000000000000001 0.0011000000000000001</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 0</color>
</Appearance>
<!--Name of geometry file.-->
<mesh_file>placa_v02.stl</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.050000000000000003 -0.23999999999999999 -0.050000000000000003</translation>
<!--Orientation offset (in radians) of this frame in its parent frame, expressed as a frame-fixed x-y-z rotation sequence.-->
<orientation>-3.1415899999999999 1.54159 -2.8500000000000001</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>
<!--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 />
<!--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.20000000000000001</mass>
<!--The location (Vec3) of the mass center in the body frame.-->
<mass_center>0 0.10000000000000001 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="abrazadera_r">
<!--List of components that this component owns and serializes.-->
<components>
<PhysicalOffsetFrame name="abrazadera_r_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>
<!--Scale factors in X, Y, Z directions respectively.-->
<scale_factors>0.20000000000000009 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="abrazadera_r_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.00089999999999999998 0.0011000000000000001 0.00090000000000000008</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 0</color>
</Appearance>
<!--Name of geometry file.-->
<mesh_file>abrazadera.stl</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.02 -0.20000000000000001 -0.040000000000000001</translation>
<!--Orientation offset (in radians) of this frame in its parent frame, expressed as a frame-fixed x-y-z rotation sequence.-->
<orientation>-2.8999999999999999 0.0015926499999999999 -3.1415899999999999</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>
<!--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 />
<!--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.20000000000000001</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>



And the unions between the bodies are the following:

<WeldJoint name="placa_r_humerus">
<!--Path to a Component that satisfies the Socket 'parent_frame' of type PhysicalFrame (description: The parent frame for the joint.).-->
<socket_parent_frame>humerus_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>placa_humerus_r_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="humerus_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/humerus_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 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="placa_humerus_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/placa_humerus_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 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>
<CustomJoint name="placa_r_humerus_y_r_ulna">
<!--Path to a Component that satisfies the Socket 'parent_frame' of type PhysicalFrame (description: The parent frame for the joint.).-->
<socket_parent_frame>placa_humerus_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>placa_ulna_r_offset</socket_child_frame>
<!--List containing the generalized coordinates (q's) that parameterize this joint.-->
<coordinates>
<Coordinate name="placas">
<!--The value of this coordinate before any value has been set. Rotational coordinate value is in radians and Translational in meters.-->
<default_value>2.6000000000000001</default_value>
<!--The minimum and maximum values that the coordinate can range between. Rotational coordinate range in radians and Translational in meters.-->
<range>0.34906599999999999 2.6000000000000001</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>
<!--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="placa_humerus_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/placa_humerus_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.0050000000000000001 -0.28999999999999998 0.0050000000000000001</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="placa_ulna_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/placa_ulna_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 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">
<!--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="rotation2">
<!--Names of the coordinates that serve as the independent variables of the transform function.-->
<coordinates>placas</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="rotation3">
<!--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">
<!--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>
<TransformAxis name="translation2">
<!--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="translation3">
<!--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.-->
<Constant name="function">
<value>0</value>
</Constant>
</TransformAxis>
</SpatialTransform>
</CustomJoint>
<WeldJoint name="placa_r_ulna_y_abrazadera_r">
<!--Path to a Component that satisfies the Socket 'parent_frame' of type PhysicalFrame (description: The parent frame for the joint.).-->
<socket_parent_frame>abrazadera_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>placa_ulna_r_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="abrazadera_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/abrazadera_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 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="placa_ulna_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/placa_ulna_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 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="abrazadera_r_y_ulna_r">
<!--Path to a Component that satisfies the Socket 'parent_frame' of type PhysicalFrame (description: The parent frame for the joint.).-->
<socket_parent_frame>ulna_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>abrazadera_r_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="ulna_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/ulna_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 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="abrazadera_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/abrazadera_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 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>
</objects>
<groups />
</JointSet>

Does anyone know how I can reduce the assembly error?

Thank you
Attachments
Sin título.png
Sin título.png (159.64 KiB) Viewed 428 times

Tags:

User avatar
Ton van den Bogert
Posts: 164
Joined: Thu Apr 27, 2006 11:37 am

Re: Assembly error when adding new solids

Post by Ton van den Bogert » Thu Jun 27, 2019 7:30 am

Dani,

Did you get the same error before you added those new solids? If you did, it may reflect the fact that the DAS model is not suitable for your IK analysis. If the error showed up after adding those solids, consider whether you were adding kinematic degrees of freedom.

The DAS model has 11 DOF and some of them can't be solved from a typical marker set with IK. In that case, though, I would have expected IPOPT to give you an error such as "Jacobian singularity" rather than "too many iterations". It could be a near-singularity, perhaps.

The proper way to deal with this is to remove degrees of freedom. One IK trick that can also be used is to attach a marker to more than one bone. For instance, the clavicle usually has no markers so it's axial rotation can't be determined. But if you "attach" the acromion, or a thorax marker to the clavicle, that will make the problem solvable. Another IK trick is to add a low-weighted regularization term (such as sum of squared joint angles) to the IK objective function, so when there are insufficient markers, those joint angles that will be driven to zero.

The DAS model was created for forward dynamic simulation, and thereis (to my knowledge) no experience with IK on this model. The model will need some modifications, probably, to make IK work. In dynamics, there is no problem. There is a ligament force that controls the clavicle rotation. Also there is a contact model that prevents the scapula from penetrating the thorax. Those forces are not modeled in the .osim file but in the C-MEX function that simulates the dynamics.

Our vision is to solve the kinematics by doing a dynamic trajectory optimization that tracks data and also minimizes muscle effort. That way, the scapula motion (which can't be seen with markers) is optimized, rather than assumed. And we get the kinematics, forces, and muscle controls all at the same time. And you can track anything, markers, IMU, EMG, etc. So far, we are having trouble solving that problem because of the strong nonlinearities in the dynamics (especially the contact model).

This summer, we're going to put the C-MEX source code, and associated Matlab code, on Github to better support users. Hopefully soon we have a working trajectory optimization. In the meantime, I would be happy to give advice on making the IK work.

Ton van den Bogert

User avatar
Ayman Habib
Posts: 2235
Joined: Fri Apr 01, 2005 12:24 pm

Re: Assembly error when adding new solids

Post by Ayman Habib » Thu Jun 27, 2019 2:29 pm

Thanks Ton for the great explanation and help.

In general assembly errors in OpenSim are thrown when a tight tolerance is specified but the assembly fails to meet this tolerance. Typically this happens when a Weld or some type of Constraint is added to a model. If this is the case (Constraint was added) you can disable the constraints one at a time to find the offending one.

Hope this helps,
-Ayman

User avatar
Ton van den Bogert
Posts: 164
Joined: Thu Apr 27, 2006 11:37 am

Re: Assembly error when adding new solids

Post by Ton van den Bogert » Thu Jun 27, 2019 2:40 pm

My explanation was not related to the actual problem, then.

Maybe my comments can be helpful when other problems occur in IK work with this model.

Ton

User avatar
dani mendez
Posts: 24
Joined: Tue Aug 07, 2018 1:40 am

Re: Assembly error when adding new solids

Post by dani mendez » Thu Jul 04, 2019 1:42 am

Thanks for your answers, I am trying to eliminate the weldjoint and use less restrictive customjoint, to see if I reduce the assembly error.

POST REPLY