Home › Forum › SOFA › Using SOFA › Objects not colliding using ‘UncoupledConstraintCorrection’
Tagged: Linux_ubuntu, python3, SOFA_2106, SoftRobots Plugin, ubuntu
- This topic has 2 replies, 2 voices, and was last updated 3 years, 1 month ago by Hugo.
-
AuthorPosts
-
13 September 2021 at 06:42 #20347BManBlocked
Hi there,
I have been using the SoftRobots plugin and followed an example which uses the ‘ShewchukPCGLinearSolver’, FreeMotionAnimationLoop’ and ‘GenericConstraintSolver’
I have three separate objects with their own DoFs that need to collide with each other. However, they are not colliding at all even with themselves it seems.
I originally did not have an ‘UncoupledConstraintCorrection’ which I believe was the cause of the lack of collision. Upon adding one in, however, I start to see strange results. Depending on the location in the code that I place it, I see different results also.
node.addObject('EulerImplicitSolver', rayleighMass="0.2", rayleighStiffness="0.2") node.addObject('ShewchukPCGLinearSolver', iterations="150", tolerance="1e-5", preconditioners="phPreconditioner", use_precond="1", update_step="1") node.addObject('MeshTopology', name="phMeshTopology", src="@../phBodyLoader") node.addObject('MechanicalObject', template="Vec3d", name="phOverallDof", showObject="0", showObjectScale="3") node.addObject('TetrahedronFEMForceField', name="phFem", youngModulus="70", poissonRatio="0.4", method="large") node.addObject('UniformMass', totalMass="80") # Constrain Top of object 1 node.addObject('BoxROI', name="phConstraintPoints1", box="-60 113 -60 60 115 60", drawBoxes="1") node.addObject('FixedConstraint', indices="@phConstraintPoints1.indices") # Constrain Bottom of object 1 node.addObject('BoxROI', name="phConstraintPoints2", box="-50 15.5 -50 50 17 50", drawBoxes="1") node.addObject('FixedConstraint', indices="@phConstraintPoints2.indices") node.addObject('UncoupledConstraintCorrection') node.addObject('SparseLDLSolver', name="phPreconditioner") node.addObject('LinearSolverConstraintCorrection', solverName="phPreconditioner")
Is there a better place to put ‘UncoupledConstraintCorrection’ or anything I may have not considered?
Thank you so much
Brandon
25 September 2021 at 02:54 #20424BManBlockedHi there,
Just following up to see if anyone has any clue as to why UncoupledConstraintCorrection may not be working, or if there are any other collision methods I should try with the set up I have?
Thanks
Brandon
6 October 2021 at 16:05 #20526HugoKeymasterhey @bmanz
I must apologize for the delay of my reply.
Thanks for your question, Brandon.First could you share the full scene with the meshes so that we can give it a try?
When solving constraints, you only need one ConstraintCorrection. Here you seem to have two for one single object: UncoupledConstraintCorrection and LinearSolverConstraintCorrection. Moreover, the latter needs to be connected to the solver, actually solving the system. In your case, it is the ShewchukPCGLinearSolver on top of the simulation while the SparseLDLSolver is only used for computing a preconditonner of the system matrix.
In a first step, you could try:
– to remove the ShewchukPCGLinearSolver and set the SparseLDLSolver instead (below the Euler integration scheme)
– to remove the UncoupledConstraintCorrection
– and keep only the LinearSolverConstraintCorrectionAgain, having the full scene and meshes would help.
Best wishes,Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.