Forum Replies Created
-
AuthorPosts
-
9 February 2017 at 15:46 in reply to: [SOLVED] Using a Novint Falcon with SOFA on a 64 bits architecture #8539HugoKeymaster
Ok,
To debug it, we should look at SofaHAPIHapticsDevice (line 368):
sofa::helper::ReadAccessor<Data<sofa::helper::vector<sofa::defaulttype::RigidCoord<3,double> > > > x = *this->mState->read(sofa::core::VecCoordId::position()); Transform world_H_virtualTool(x[newToolIndex].getCenter(), x[newToolIndex].getOrientation());
- either, the casting between mState and the accessor (Rigid3d) is not working, i.e. both are not from the same DataTypes.
- or the second line, where the indice newToolIndex would exceed the mState size.
Let me know if you find something.
Best,Hugo
9 February 2017 at 10:56 in reply to: [SOLVED] Rigid flexible body collision/deformation (anatomy modeling) #8533HugoKeymasterHi @jlefley,
Indeed, it would help if you could provide us your scene (xml+python).
Maybe both muscle and bone do not collide because they belong to the same collision group.Best,
Hugo
9 February 2017 at 09:30 in reply to: [SOLVED] Using a Novint Falcon with SOFA on a 64 bits architecture #8532HugoKeymasterHi @benoitlegouis, @aerdemir,
Sorry for not replying on this, but we do not have an Novint haptic interface here.
So impossible for us to test.
Benoit any news ? Did you notice the same issue ?By looking into the code of SofaHAPIHapticsDevice, we can read at line 186:
mState = dynamic_cast<MechanicalState<sofa::defaulttype::Rigid3dTypes> *> (this->getContext()->getMechanicalState());
mState is a pointer to a MechanicalState templated on Rigid type.
This should work.
What message do you get when it crashes?
“SofaHAPIHapticsDevice has no binding MechanicalState” or “[Device] init” (cf lines 187-188)Best,
Hugo
HugoKeymasterYes it seems the link on position is not working well.
Maybe due to the fact the exporter already finds the MechanicalObject.
I will look at it.Still I set the topic as solved since you achieved to recover your vtk files.
Cheers,
Hugo
HugoKeymasterHi Elek,
Sorry I read your scene file too fast.
Some things were not making sense: your MechanicalObject was missing a name (so you can’t recover its data), and the way you load the topology was wrong.Here is a suggestion:
<?xml version="1.0" ?> <Node name="root" dt="0.3" showBoundingTree="0" gravity="0 0 -0.0"> <CollisionPipeline verbose="0" name="CollisionPipeline" /> <BruteForceDetection name="N2" /> <CollisionResponse response="default" name="collision response" /> <DiscreteIntersection /> <Node name="MeshTopology"> <MeshGmshLoader name="GmshLoader" filename="mesh/cylinder.msh" createSubelements="true" /> <TetrahedronSetTopologyContainer name="Container1" src="@GmshLoader" /> <TetrahedronSetGeometryAlgorithms template="Vec3d" name="GeomAlgo" /> <MechanicalObject template="Vec3d" name="dofs" /> <Node name="FastTetrahedronCorotationalForceField"> <CGLinearSolver iterations="500" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" /> <StaticSolver applyIncrementFactor="1" /> <TetrahedronSetTopologyContainer name="Container2" /> <TetrahedronSetGeometryAlgorithms template="Vec3d" drawEdges="1" drawColorEdges="0 1 0" name="GeomAlgo" /> <SimpleTesselatedTetraTopologicalMapping input="@Container1" output="@Container2" /> <MechanicalObject template="Vec3d" name="mecaDOFs" translation="0 0 0" /> <MeshMatrixMass name="mass" lumping="1" printMass="0" massDensity="10000" /> <StandardTetrahedralFEMForceField materialName="NeoHookean" ParameterSet="0.454545 0.4166667" /> <BoxROI template="Vec3d" box="-1.2 -1.2 -0.01 1.2 1.2 0.01" drawBoxes="1" name="fixedPlane2" /> <BoxROI template="Vec3d" box="-1.2 -1.2 0.99 1.2 1.2 1.01" drawBoxes="1" name="pressurePlane2" /> <FixedConstraint indices="@fixedPlane2.indices" /> <ConstantForceField points="@pressurePlane2.indices" totalForce="0.001 0 -0.01" /> <VTKExporter name="vTKExporter" listening="true" position="mecaDOFs.position" pointsDataFields="mecaDOFs.force" filename="test_2a" edges="1" triangles="1" quads="1" tetras="1" exportEveryNumberOfSteps="1" /> </Node> </Node> </Node>
This is working for me.
Best,Hugo
8 February 2017 at 15:56 in reply to: What is the strategy of sub dividing tetrahedron in sofa #8525HugoKeymasterAhah ! Thank you very much !
Wish you all the best and many SOFA achievements !Did my reply help ?
Shall we resolve the topic?HugoKeymasterHi Elek,
The data “pointDataField” should indeed be the one for saving additional data. But why did you use 3 VTKExporters ? Using only the second one should work (using the path pointsDataFields=”dofs.force”) and removing the two others:
... <ConstantForceField points="@pressurePlane2.indices" totalForce="0.001 0 -0.01" /> <StandardTetrahedralFEMForceField materialName="NeoHookean" ParameterSet="0.454545 0.4166667" /> </Node> <VTKExporter name="vTKExporter" listening="true" pointsDataFields="dofs.force" filename="test_2a" edges="1" triangles="1" quads="1" tetras="1" hexas="1" exportEveryNumberOfSteps="1" /> </Node> </Node>
Another trick, could be to export the position with one VTKExporter and to export the forces using a second VTKExporter where position=”dofs.force”.
Hope this helps.
Hugo
HugoKeymasterHi Toan,
- For non-rigid registration (I think that’s what you want to achieve), you can have a look at the registration plugin (applications/plugins) and its examples.
- Cutting is done through topological changes. To do so, you will have to implement your manager for topological change. But there is nice examples based on the component : TopologicalModifier. See examples in examples/Components/topology/TopologicalModifiers.
- For advanced rendering, you need to use shaders. Again, examples are available for this in examples/Components/visualmodel.
Hope this helps.
Cheers,Hugo
HugoKeymasterHi Pun,
Topological change means that elements of the topology does change: a vertice added, removed, a triangle added, removed or subdivided etc.
Cheers,
Hugo
1 February 2017 at 11:49 in reply to: What is the strategy of sub dividing tetrahedron in sofa #8481HugoKeymasterHi Coco,
Hmm I’m no real expert of these topological changes.
As I understand it, when an intersection between the plane and a tetrahedron is detected, points are added at each intersection between the plane and the edges of the tetrahedron. Then, using these new points, new tetrahedron is created.
I’ll also see if anyone can tell us more about it.Best,
Hugo
HugoKeymasterDear Toan,
Do not hesitate to have a look to the video tutorials and to all examples available in sofa_root/examples/Components which show the behaviour of each component. You run also use the Tutorial scene files in sofa_root/examples/Tutorials.
Let us know if it helps.
If you need more support, do not hesitate to describe us what kind of simulation you want to achieve we could help you through the forum or with a specific support.Best,
Hugo
HugoKeymasterHi @pungul,
That’s a good question: the semantic in SOFA was not always clear. SOFA dev teams are currently working on this.
To start with, both Hexa components are focusing on the simulation of linear elasticity in a topology based on linear hexahedra. at my best knowledge, the main difference between the two is that the hexahedral handles topological changes unlike the HexahedronFEMForceField.About the physics, you could have a look at the videos tutorials, especially the step by step.
Let me know if it helps.
Best,Hugo
HugoKeymasterThank you for your feedback Jeremie.
Keep us updated about this nice work! At my best knowledge, SOFA has never been used with speech control. Such a module would be extremely interesting!HugoKeymasterHi Raphael,
Thank you for this feedback.
Till now, we do not support (and did not experience) debian packages.All our releases are created using make install (as you did) and the whole install directory is zipped. Maybe something is going wrong with the tar.gz compression.
For more info about release with SOFA: see the doc. Hope this helps.
Soon, a new release (v16.12) of SOFA will be available. Stay tuned.
Best,Hugo
HugoKeymasterHi manny,
I am sorry, I see nobody was able to answer your problem.
First of all, it appears you are using an old release of SOFA.Second, the rules for mappings changed. Mappings now use data input and output instead of object1 and object2 data.
Third, indeed, it is possible to have two separate mappings have the same input model.
Let me know if this helps. Do not hesitate to keep us update about your progress.
Cheers,Hugo
HugoKeymasterHi Luigi,
How is it doing with your problem? Did you investigate as mentioned the time step and stability of your simulation?
Did you find any further hints?
Did you solve your issue ?Best,
Hugo
HugoKeymasterHugoKeymasterHi Clemens,
First, welcome on the SOFA forum!
Second, did the Igor’s hints and explanations help you?Best,
Hugo
HugoKeymasterHi Juan Jo,
I think something went wrong when copying-pasting your error.
You copied and pasted twice your XML scene.
Thanks for sending your error output,Hugo
23 January 2017 at 14:35 in reply to: [SOLVED] Any resources to vascular modeling with blood flow. #8406HugoKeymasterHi Yash,
Erik is right, some work has been done a long time ago around blood flow in the context of aneurysm. The article mentioned by Erik is the right reference.
Do not hesitate to keep us updated about the progress of your work!
Cheers,Hugo
HugoKeymasterHi Elek,
You are almost done, you just need to specify when the export should occur.
You need to set one of the data:- exportEveryNbSteps,
- exportAtBegin,
- or exportAtEnd
to true !
Have a look the the VTKExporter.cpp
Cheers,Hugo
HugoKeymasterHi Luigi,
You said, the GIF you provided shows the issue?
But it seems that the collision is detected.Isn’t it an issue of time steps / stability ? alarm and contact distance ?
Could you tell us more about your collision pipeline?
what is the collision detection method you are using? what contact manager ? etc.Cheers,
Hugo
HugoKeymasterHi Sophie !
At my best knowledge the component TetrahedronFEMForceField does not allow for K export. Using linear elasticity, you can extract the K matrix from the addDForce function (since you are using an iterative scheme).
Just for your information, we are currently working on developing cleaner, simpler and validated linear elasticity component. This export feature could indeed be included.
Best,
Hugo
HugoKeymasterhi JuanJo,
We are very happy to have active developers ans contributors like you in the community.
We will see how to integrate your work when you’ll release it. We will be very happy to promote it with you!Cheers,
Hugo
HugoKeymasterHi JuanJo,
Very good news! Nice to hear!
I think the easiest way to proceed would be to create your own plugin (in a separate repo github or gitlab) and start developing there your components.
You can find information about how to create a plugin. There, you will be able to add as an extlib of your plugin the different libraries.Do you already know if you would like to release your code under opensource (e.g. LGPL) licence?
Let us know (creating a new topic) if you face any issue !
Cheers,Hugo
-
AuthorPosts