Forum Replies Created
-
AuthorPosts
-
HugoKeymaster
This was indeed an issue @amazier
This was fixed in PR #1302.Since the v19.12 branch is a release branch, it is frozen when released. Starting from v20.06, a new policy will be applied: backporting all fixes to the previous release. So that the community, you all guys, can rely confidently on a robust and stable release.
Best
Hugo
HugoKeymasterHi @n-herzig
Welcome on the SOFA forum!
You seem to be using the sources of SOFA, namely the v19.12 branch. This is a release branch. These branches are frozen when released. Starting from v20.06, a new policy will be applied: backporting all fixes to the previous release.For Qt install, I guess you made sure to enable Charts and WebEngine components ,right?
This problem might come from missing symbol export for Windows. I will ask devs about it.Best,
Hugo
HugoKeymasterHi @acerakit
Welcome on the SOFA forum!
I am actually myself not used to the ROS environment.
To create your scenario, you need to describe your scene with a graph including two subnodes, one for each of your objects (gripper/object) and define their solvers, physics etc.
Check out the tutorial in examples/Tutorials/. Are you in any way familiar with physics simulation?There is unfortunately no existing video tutorial on how to send/receive ROS messages.
Regarding the SofaROSConnector, you need to compile it with SOFA. Then, you will be able to couple ROS and SOFA.
Best wishes,
Hugo
HugoKeymasterHi @amazier and thanks for the report.
(almost) Full log was:
[12/14] Linking CXX shared library lib/libFlexible.so.0.1 FAILED: lib/libFlexible.so.0.1 : && /usr/bin/g++-9 -fPIC -Wall -W -O3 -DNDEBUG -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 ....... -Wl,-rpath-link,/home/arnaud/dev/sofa/build/lib && : /usr/bin/ld: applications/plugins/Flexible/CMakeFiles/Flexible.dir/deformationMapping/LinearMapping_affine.cpp.o: in function sofa::core::objectmodel::TClassInfo<sofa::component::visualmodel::visualmodelimpl>::dynamicCast(sofa::core::objectmodel::Base*) const': LinearMapping_affine.cpp:(.text._ZNK4sofa4core11objectmodel10TClassInfoINS_9component11visualmodel15VisualModelImplEE11dynamicCastEPNS1_4BaseE[_ZNK4sofa4core11objectmodel10TClassInfoINS_9component11visualmodel15VisualModelImplEE11dynamicCastEPNS1_4BaseE]+0xf): undefined reference to typeinfo for sofa::component::visualmodel::VisualModelImpl' /usr/bin/ld: applications/plugins/Flexible/CMakeFiles/Flexible.dir/deformationMapping/LinearMapping_affine.cpp.o: in function sofa::core::objectmodel::TClassInfo</sofa::component::visualmodel::visualmodelimpl><sofa::component::visualmodel::visualmodelimpl>::get()': LinearMapping_affine.cpp:(.text._ZN4sofa4core11objectmodel10TClassInfoINS_9component11visualmodel15VisualModelImplEE3getEv[_ZN4sofa4core11objectmodel10TClassInfoINS_9component11visualmodel15VisualModelImplEE3getEv]+0x46): undefined reference to typeinfo for sofa::component::visualmodel::VisualModelImpl' /usr/bin/ld: applications/plugins/Flexible/CMakeFiles/Flexible.dir/engine/ComputeWeightEngine.cpp.o: in function sofa::core::objectmodel::TClass<sofa::component::visualmodel::VisualModelImpl, std::pair<sofa::core::visual::VisualModel, sofa::component::visualmodel::Vec3State> >::dynamicCast(sofa::core::objectmodel::Base*) const': ComputeWeightEngine.cpp:(.text._ZNK4sofa4core11objectmodel6TClassINS_9component11visualmodel15VisualModelImplESt4pairINS0_6visual11VisualModelENS4_9Vec3StateEEE11dynamicCastEPNS1_4BaseE[_ZNK4sofa4core11objectmodel6TClassINS_9component11visualmodel15VisualModelImplESt4pairINS0_6visual11VisualModelENS4_9Vec3StateEEE11dynamicCastEPNS1_4BaseE]+0xf): undefined reference to typeinfo for sofa::component::visualmodel::VisualModelImpl' /usr/bin/ld: applications/plugins/Flexible/CMakeFiles/Flexible.dir/engine/ComputeWeightEngine.cpp.o: in function sofa::core::objectmodel::TClass<sofa::component::visualmodel::VisualModelImpl, std::pair<sofa::core::visual::VisualModel, sofa::component::visualmodel::Vec3State> >::isInstance(sofa::core::objectmodel::Base*) const': ComputeWeightEngine.cpp:(.text._ZNK4sofa4core11objectmodel6TClassINS_9component11visualmodel15VisualModelImplESt4pairINS0_6visual11VisualModelENS4_9Vec3StateEEE10isInstanceEPNS1_4BaseE[_ZNK4sofa4core11objectmodel6TClassINS_9component11visualmodel15VisualModelImplESt4pairINS0_6visual11VisualModelENS4_9Vec3StateEEE10isInstanceEPNS1_4BaseE]+0x28): undefined reference to typeinfo for sofa::component::visualmodel::VisualModelImpl' /usr/bin/ld: applications/plugins/Flexible/CMakeFiles/Flexible.dir/engine/ComputeWeightEngine.cpp.o: in function sofa::core::objectmodel::TClass<sofa::component::visualmodel::VisualModelImpl, std::pair<sofa::core::visual::VisualModel, sofa::component::visualmodel::Vec3State> >::TClass()': ComputeWeightEngine.cpp:(.text._ZN4sofa4core11objectmodel6TClassINS_9component11visualmodel15VisualModelImplESt4pairINS0_6visual11VisualModelENS4_9Vec3StateEEEC2Ev[_ZN4sofa4core11objectmodel6TClassINS_9component11visualmodel15VisualModelImplESt4pairINS0_6visual11VisualModelENS4_9Vec3StateEEEC5Ev]+0x3f): undefined reference to typeinfo for sofa::component::visualmodel::VisualModelImpl' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed.
This may come from some missing dependency, thus undefined ref.
I will have a look at it.Hugo
HugoKeymasterYes @amir,
Please take a look at the scene TetrahedronHyperelasticityFEMForceField.scn
I am sure it will help.
Best
Hugo
HugoKeymasterHi @majanao
Welcome on the SOFA forum!
The only issue here comes from your mesh. It seems wrongly imported: the number of nodes in the mesh given in the Gmsh file header does not mach the actual number of points apparently.Could you share this mesh with us?
Hugo
HugoKeymasterHi @anluong
Nodes cannot be directly added in runSofa.
runSofa is the GUI of SOFA and not a scene editor. A project is ongoing to have an editor for SOFA, and a first deliverable should be available end of this summer.
To modify the scene, please open the scene file (xml or python) and add the nodes and components you’d like.Best
Hugo
11 June 2020 at 17:11 in reply to: [SOLVED] reversing the direction of mesh normals and changing their color #16597HugoKeymasterHi @zahra
What I meant is that depending on which component does the flip of normals, different functions will be called (Loader, GeometryAlgorithms). Usually loaders can do it, but it’s always better to give as input of a MeshLoader a mesh with the good orientation.
As said above, some loaders have this flipNormals option working (VTK, Obj for instance). But the Gmsh does not. I will make a pull-request in this direction. It will be available in a few days in the master branch of SOFA.
Best,
Hugo
HugoKeymasterHi @jjcasmar
Good question! You can see in the modules SofaPreconditioner (SOFA/modules/SofaPreconditioner) some precond are available. See especially the ShewchukPCGLinearSolver. It has to be used with a linear solver to compute this preconditioner with the CG.
Best
Hugo
HugoKeymasterHugoKeymasterMy scene is:
<?xml version="1.0"?> <Node name="root" dt="0.01" gravity="0 0 -9.81"> <RequiredPlugin name="SofaOpenglVisual"/> <VisualStyle displayFlags="showBehaviorModels showForceFields showCollisionModels" /> <DefaultPipeline depth="6" verbose="0" draw="0" /> <BruteForceDetection name="N2" /> <MinProximityIntersection name="Proximity" alarmDistance="0.03" contactDistance="0.02" /> <DefaultContactManager name="Response" response="default" /> <FreeMotionAnimationLoop /><!-- this is necessary in BilateralInteractionConstraint--> <LCPConstraintSolver tolerance="1e-3" maxIt="1000"/> <Node name="RigidNeedle"> <EulerImplicitSolver rayleighStiffness="0.01" rayleighMass="0.1" /> <CGLinearSolver iterations="25" threshold="0.00000001" /> <MechanicalObject template="Rigid3d" translation="0 0 0" rotation="0 0 0" scale3d="3 3 3"/> <UniformMass /> <!-- <FixedConstraint name="FixedConstraint" indices="0" /> --> <LinearSolverConstraintCorrection /> <!-- this is necessary in BilateralInteractionConstraint--> <Node name="Collision"> <MeshObjLoader name="loader" filename="suture_needle.obj"/> <MeshTopology src="@loader"/> <MechanicalObject src="@loader" scale3d="1 1 1"/> <TriangleCollisionModel contactStiffness="200"/> <LineCollisionModel contactStiffness="@[-1].contactStiffness"/> <PointCollisionModel contactStiffness="@[-1].contactStiffness" /> <RigidMapping/> </Node> <Node name="Visual" tags="Visual"> <OglModel name="Visual" src="@../Collision/loader" color="gray" scale3d="1 1 1" /> <RigidMapping input="@.." output="@Visual" /> </Node> <Node name="Constraints"> <MechanicalObject name="DOFs" template="Rigid3d" position="0 0 -0.1 0 0 0 0" /> <RigidRigidMapping index="0" /> </Node> </Node> <Node name="Suture"> <EulerImplicitSolver rayleighStiffness="0" printLog="false" rayleighMass="0.1" /> <BTDLinearSolver template="BTDMatrix6d" printLog="false" verbose="false" /> <MechanicalObject template="Rigid3d" name="DOFs" position="0 0 0 0 0 0 1 1 0 0 0 0 0 1 2 0 0 0 0 0 1 3 0 0 0 0 0 1 4 0 0 0 0 0 1 5 0 0 0 0 0 1 6 0 0 0 0 0 1 7 0 0 0 0 0 1" /> <MeshTopology name="lines" lines="0 1 1 2 2 3 3 4 4 5 5 6 6 7" /> <!--FixedConstraint name="FixedConstraint" indices="0" /--> <UniformMass vertexMass="1 1 0.01 0 0 0 0.1 0 0 0 0.1" printLog="false" /> <BeamFEMForceField name="FEM" radius="0.1" youngModulus="20000000" poissonRatio="0.49"/> <LinearSolverConstraintCorrection /><!-- this is necessary in BilateralInteractionConstraint--> <Node name="Collision"> <CylinderGridTopology name="coli" nx="6" ny="6" nz="7" length="7" radius=".3" axis="1 0 0" /> <MechanicalObject /> <BeamLinearMapping isMechanical="true" /> <TriangleCollisionModel /> </Node> <Node name="Visual"> <CylinderGridTopology name="vis" nx="6" ny="6" nz="7" length="7" radius=".3" axis="1 0 0" /> <OglModel color='gray'/> <BeamLinearMapping isMechanical="false" /> </Node> </Node> <BilateralInteractionConstraint template="Rigid3d" object1="@RigidNeedle/Constraints/DOFs" object2="@Suture/DOFs" first_point="0" second_point="0" /> </Node>
Can you let me know if it works?
In my case I get an error, but the simulation runs:[ERROR] [MechanicalObject(mObject1)] Invalid vOp operation 1 (null(V_DERIV),0(0),0(0),1)
Hugo
11 June 2020 at 16:21 in reply to: [SOLVED] Target “Qt5::Xml” not found (cmake-gui/Win10/VS2017x64) #16592HugoKeymasterOK we will take a look.
Do not hesitate to reopen the topic.Hugo
HugoKeymasterHey @jake
What kind of elements are contained in the VTK mesh?
It seems from theERROR: unsupported cell type 13
that the format of cell is not supported by SOFA.Could you elaborate on the object you are looking to model? maybe sharing the mesh?
Hugo
11 June 2020 at 16:00 in reply to: [SOLVED] Question about tutorial for TopologyVolumeDifferentMesh #16590HugoKeymasterThe two first meshes (stored in MeshTopology or regular CylinderGridTopology) are two static approaches. It allows obviously the object to deform during the simulation, but can not support topological changes: e.g. points added, triangle removed, edges duplicated etc. The last third mesh handles it.
Depending on your use case, you can use one of the other approach.
About the Forcefields, note that a component Forcefield corresponds to an internal or external force acting on your object. Several Forcefields can thus be defined. In this case, the simultaneous use of MeshSpringForceField & TetrahedronFEMForceField is strange I must say, since it mixes a elasticity implemented respectively on springs and over finite elements.
I hope this helps.
BestHugo
11 June 2020 at 15:34 in reply to: [SOLVED] Compilation error when SOFA_DUMP_VISITOR_INFO is toggled #16588HugoKeymasterHi @marcomag
Thanks for reporting this issue.
I just compiled with this option (basically recompiled SOFA!) and I got the same error.The problem comes from the absence of a dependency on tinyxml. I created the PR #1415 which fixes it. Could you give it a try? If it solves your issue as well I let you close this topic.
Thanks for your valuable remark.
Hugo
HugoKeymasterHi @alexftw
In the BeamAdapter plugin, the beam model is always aligned along the x axis as you noticed. In your scene, I guess you are following the structure of the scene given in examples of the plugin. You should therefore have a MechanicalObject defining the reference starting position (a Rigid frame) and an InterventionalRadiologyController linking against this MechanicalObject. Is it correct?
In this case, to rotate the beam model, all you have to do is to rotate the rigid frame. The rotation will be propagated on the beam model.
Best wishes,
Hugo
HugoKeymasterHi @golnaz
I apologize for the very late reply, also due to the fact this topic is not really part of my skills.
For such articulation description, there is in SOFA the ArticulatedSystemMapping. It is a way to describe articulations:
* you can see an example scene here
* and the documentation is hereYou could thus create a pivot between rigid parts of your robot.
I hope this helps.Best wishes,
Hugo
HugoKeymaster1. The component SparseLDLSolver seems to be well created in your simulation. You compiled it successfully (your problem is therefore different than the other topic) and it seems to be well created as well in the scene. Only the factorization fails on your side. I can not reproduce the error.
2. the error your are showing :
[ERROR] [TetrahedronSetTopologyContainer(container)] Cannot find edge 1 [172, 184] in triangle 0 [ERROR] [TetrahedronSetTopologyContainer(container)] Cannot find edge 1 [172, 184] in triangle 0 [WARNING] [TetrahedronSetTopologyContainer(container)] TrianglesAroundEdge buffer can't be created as EdgesInTriangle buffer creation failed. [ERROR] [TetrahedronSetTopologyContainer(container)] Cannot find triangle 0 [155, 152, 226] in tetrahedron 0 [ERROR] [TetrahedronSetTopologyContainer(container)] Cannot find triangle 0 [155, 152, 226] in tetrahedron 0 [WARNING] [TetrahedronSetTopologyContainer(container)] TetrahedraAroundTriangle buffer can't be created as trianglesInTetrahedron buffer creation failed. [ERROR] [TetrahedronFEMForceField(FEM)] object must have a tetrahedric topology. The component is inactivated. To remove this error message please add a tetrahedric topology component to your scene. [WARNING] [SurfacePressureConstraint(SurfacePressureConstraint)] The field named 'visualization' is now deprecated. To remove this warning message, the field 'visualization' should be replaced by the field 'drawPressure'. [WARNING] [SurfacePressureConstraint(SurfacePressureConstraint)] The field named 'showVisuScale' is now deprecated. To remove this warning message, the field 'showVisuScale' should be replaced by the field 'drawScale'.
it comes from a simulation you are running and messages are clear: you do not have a tetrahedral topology available to compute a linear elastic model on it. And you are using data (showVisuScale, visualization) which are deprecated.
Volumetric model: volumetric elements (tetrahedral or hexahedral mesh)
Yes I would therefore use a tetrehdral mesh here since you are aiming at simulating the volumetric behavior of the finger robot.Best
Hugo
11 June 2020 at 11:10 in reply to: [SOLVED] Target “Qt5::Xml” not found (cmake-gui/Win10/VS2017x64) #16583HugoKeymasterHi @sukhraj
Unfortunately there is discount for students. Our administration lacks somehow flexibility. Things could change a bit next year. Note that all funds gathered by SOFA get back for the open-source, always!
Moreover, if anyone of you can not afford such the training costs, do not hesitate to contact me in PM though I would be glad to help.
Best,
Hugo
HugoKeymasterLast week to register for the 9th June training session!
Best,
Hugo
HugoKeymasterHugoKeymasterHi @michelodu
I don’t know exactly the code they are referring to. What I know is that Ali’s research team, led by Pr. Francois Faure was based on a limited amount of plugins:
– Flexible (for the physics)
– Compliant (for constraint)
– image plugin (for medical image manipulation)You can start having a look there. Maybe their paper tells more about it?
Hugo
1 June 2020 at 15:43 in reply to: [SOLVED] reversing the direction of mesh normals and changing their color #16504HugoKeymasterHi @zahra
Yes please look at the option flipNormals in MeshLoaders and in TetrahedronSetGeometryAlgorithms. But it depends on the code. Let me know if it works for you.
The color of the normals depends on which class draws them. If the OglModel does, you can have a look at OglModel.cpp (line 577), color is white. Same for TriangleModel (CollisionModel). Only the TriangleSetGeometryAlgorithms (line 2493) changes the color depending on the orientation. I hope this helps.
Best,
Hugo
HugoKeymasterThanks.
I close your topic then.NB: it has recently been decided that a new stable branch would now derive from the last stable release (v20.06) and include all fixes and patches, in order for you to work in best conditions. Stay tuned.
Hugo
-
AuthorPosts