Forum Replies Created
-
AuthorPosts
-
23 June 2017 at 17:59 in reply to: [SOLVED] A Problem About How to Move A Fixed Rigid Object in C++ Project? #9349HugoKeymaster
Hi wq57fan,
The Modeler is considered as deprecated. Moreover, be careful, you write that you want to make a fixed rigid body fall under gravity, this won’t obviously happen if your object is fixed !
To make a rigid body fall, you can write :
<Node name="RigidBody"> <EulerImplicit /> <CGLinearSolver iterations="50" tolerance="1e-09" threshold="1e-09" /> <MeshGmshLoader name="meshLoader" filename="mesh/liver.msh" /> <MechanicalObject template="Rigid" src="@ meshLoader" /> <UniformMass totalMass="1" /> </Node>
About making your haptic tool move, I would advise you to have a look to the example scene associated to the Geomagic plugin : applications/plugins/Geomagic/scenes/Geomagic-FEMLiver.scn.
Let us know if this helps.
Hugo
HugoKeymasterHi Yannie,
To use Python scripts in a simulation written in C++, indeed, you need to do is to instantiate the C++ class PythonScriptController. Your C++ application must therefore have a dependency on the SofaPython plugin (explicit in CMakeList.txt).
HTH,Hugo
HugoKeymasterHi Cristóbal,
No, it isn’t common.
Could you send us the scene you wrote (mainly the loader, mechanicalobject, topo and writestate) ? I will test it locally.Cheers,
Hugo
HugoKeymasterHi Lujain,
The scene you are running is depending on a private plugin “SofaMiscForceFieldDev” (due to the use of the component
RotationFinder
). Since the plugin is not found, the component creation fails. This scene therefore does not make sens, since a scene in SOFA public should have no dependencies on any private plugin. I will fix this asap.Thanks for the notice Lujain 😉
Best,Hugo
HugoKeymasterHi Lujain,
I did not create myself the scene and files, but it seems from the different example scenes that these files are surface meshes corresponding to different configuration of a femur. Most the example scenes use the
femur_f
as the target of the registration process.Your own meshes (vtu) are surface of volumetric meshes ?
The meshes in these registration examples are surface meshes, you could use surface vtu meshes in the same way using a VTKLoader instead of the ObjLoader.HTH,
Hugo
19 June 2017 at 18:07 in reply to: auto-resetting problem when doing grasp using BilateralInteractionConstraint #9338HugoKeymasterHi ruiliang
Pretty strange that the numerical damping of the solver impacts your two constraints. Rayleigh damping coefficients are numerical damping and should be zero by default. Removing this damping will therefore make your object “softer”. All you need is to adjust the elasticity to match the expected behaviour.
Hugo
10 June 2017 at 12:18 in reply to: [SOLVED] extracting the visual mesh and the force applied by mouse #9312HugoKeymasterHey Zahra,
1. Goooood !
2. Hmmm I did not really use it for a very long time. Maybe try with another exporter (VRKExporter) and specifying the field of position you want to export.
3. either in the GUI, there is an update button that should allow you to see the updated values (of forces for instance). Another solution would be to activate the flag verbose of your solver (I know it does exist for the EulerImplicit) it will print the position, velocity and force vector !Cheers
Hugo
HugoKeymasterHi Noura,
Good for the first step.
I’m sorry I don’t really follow what simulation you want to achieve (two mapped objects that collide sounds strange to me).Could you explain us more in details ? maybe some illustration would help.
Cheers,
Hugo
9 June 2017 at 19:42 in reply to: [SOLVED] Building SOFA with both plugins: LeapMotion and Sensable (Phantom Omni) #9308HugoKeymaster9 June 2017 at 18:50 in reply to: [SOLVED] extracting the visual mesh and the force applied by mouse #9307HugoKeymasterHey Zahra,
1. Indeed you need a surface mesh. But it is still not working because you need to give the OglModel a OBJ mesh not a msh one.
2. Yes, I would advise to keep the ObjExporter .. try and tell me if it works. Saving a obj as a gmsh is not big deal.
3. The forces should appear in the MechanicalObject. Are you sure the vector is well updated in the GUI ?
Best
Hugo
8 June 2017 at 19:18 in reply to: [SOLVED] Building SOFA with both plugins: LeapMotion and Sensable (Phantom Omni) #9303HugoKeymasterHi Wendy,
First, to handle Geomagic haptic devices, I would advise to use the latest Geomagic plugin.
About the LeapMotion problem, this is due to a move of files! Thank you for letting us know. You can fix it locally by changing in LeapMotionDriver.cpp :
<SofaBaseVisual/VisualTransform.h>
with
<SofaGeneralVisual/VisualTransform.h>
I will fix this for the upcoming release 17.06.
Best,Hugo
HugoKeymasterHi Wendy,
For the LeapMotion plugin in SOFA, everything is explained in the README.txt in applications/plugins/LeapMotion :
–> install the driver LeapMotion: https://www.leapmotion.com/setup (SDK)Cheers,
Hugo
HugoKeymasterHi wendyarch,
It looks like you created twice the topic : https://www.sofa-framework.org/community/forum/topic/building-sofa-with-both-plugins-leapmotion-and-sensable-phantom-omni/
Shall we close this one ?
Hugo
HugoKeymasterIt’s possible to close the topic when you reply (there is a checkbox just above the “Submit” button). But let me close it for you. Looking forward to seeing your achievements!
Cheers.
Hugo
HugoKeymasterHi Guncha,
Wha, I have no experience in developing your own device, sorry about it. But we would be happy to see your work coupled with SOFA.
If you got all your answers do not hesitate to close the topic.
CheersHugo
7 June 2017 at 04:41 in reply to: [SOLVED] C++ code in TetrahedralCorotationalFEMForceField.cpp/.h/.inl #9288HugoKeymasterHi Lujain,
In the corotational approach, the part of the deformation due to the rotation must be removed to compute the stress in each tetra. To do so, this rotation component is computed at each tetra, in the tetrahedron frame. In the tetrahedron frame, the first vertices is the origin frame. Therefore, there is no displacement related to the rotation in its frame.
See Fig. 1 in the paper of Nesme.
Hope this helps,
Hugo
7 June 2017 at 04:25 in reply to: auto-resetting problem when doing grasp using BilateralInteractionConstraint #9287HugoKeymasterHi,
Could you maybe provide us a part of your scene that displays your use of the BilateralConstraint ? This might help.
HugoKeymasterHey Noura,
Then the appropriate mapping should be the
RigidMapping
.
Let me know if it does the job,Hugo
6 June 2017 at 21:53 in reply to: auto-resetting problem when doing grasp using BilateralInteractionConstraint #9283HugoKeymasterHi Ruilang,
That’s very strange indeed. I never used two haptic interfaces in the same time. Maybe other users did .. otherwise you could later on (if no reply) point this out on GitHub. Sorry not to be able to help more 🙁
Hugo
HugoKeymasterHey Guncha,
I asked myself to other colleagues because I did not use it myself. One of our senior research explained me that it’s a very good 6-dof haptic device but its only drawback is that it’s “bloody expensive”. But it is a high quality device. FYI this researcher is currently coupling an Omega with SOFA.
Hope this helps.
Hugo
HugoKeymasterHi Wong,
This is indeed not directly related to SOFA.
For mesh editing, you have several options:
– Blender : complicated but powerful
– MeshLab : simple but not always very stable, but it’s good
– Paraview : more for visualisation but allows for some modifications of the mesh
– GMesh : is a mesh creator and editorThat’s the one I know, hope this helps.
But let us know if you find anything else, let us know.Cheers,
Hugo
1 June 2017 at 10:47 in reply to: [SOLVED] What is the appropriate way to perform actions at the simulation steps ? #9245HugoKeymasterHi Noura,
This is indeed the appropriate way.
Do not forget to set the parameterf_listening
at true, this enables to listen to all events.Cheers,
Hugo
HugoKeymasterHey Lujain
Everything is working fine in your scene.
You can see the fixed constraints applied:Rosalie seems to give you all the information you need: use SurfacePressureForceField or your own surface force field.
I hope this helps. For more advanced development support, you can request this as service to the consortium.
Best,
Hugo
HugoKeymasterHey Guncha,
Thank you for your interest in SOFA, many things have been investigated in the coupling with haptics. I am more familiar with Geomagic Touch, but I know their Premium Phantom (6-dofs). My experience with the Touch was pretty good, easy to deal with in SOFA at least, but it is not as advanced as you would like (not 5-dofs). Falcon was also used in SOFA, but I did not. Maybe other users could help. Moog is also a company providing high quality haptic tools.
Hope this helps.
BestHugo
30 May 2017 at 16:53 in reply to: [SOLVED] extracting the visual mesh and the force applied by mouse #9229HugoKeymasterHey Zahra,
Let me answer point by point:
1. there is no reason imposing that the behavior and visual meshes must have the same extension. Both can use any format. What is important is that:
- visual model: requires a surface mesh
- behavior model : if volumetric object (3D cases), requires a volumetric mesh.
The .msh extension should work. Could you share the piece of XML code displaying your visual model ?
2. to export the visual model, use the OBJExporter. (the semantic of this class is actually not appropriate, it should be VisualModelExporter)
3. the force resulting from the interaction will appear in the “force” vector the MechanicalObject of the liver.
Hope this helps.
Cheers,Hugo
-
AuthorPosts