Forum Replies Created
-
AuthorPosts
-
Hugo
KeymasterHi @bobiko
I am not sure (since I can not test with your meshes) but I think all you need to do is to shift these to lines:
<OglViewport screenPosition="0 0" screenSize="300 300" zNear="0.01" zFar="10" cameraRigid="@Instrument/Instrument/Camera/CameraState.position" drawCamera="1" /> <SpotLight name="LightSource" color="1 1 1" position="@Instrument/Instrument/Camera/CameraState.position" direction="0 -1 0" cutoff="10" exponent="1" fixed="1" />
at the end of the file like:
<Node name="root" dt="0.005" > <RequiredPlugin name="SofaOpenglVisual" /> <RequiredPlugin pluginName="CImgPlugin" /> <RequiredPlugin name="SofaPython" /> <VisualStyle displayFlags="hideBehaviorModels hideCollisionModels hideMapping hideForceFields" /> <LightManager /> <Gravity name="G" gravity="0 -9.81 0" /> <CollisionPipeline name="pipeline" depth="6" verbose="0" /> <BruteForceDetection name="detection" /> <CollisionResponse name="response" response="FrictionContact" /> <LocalMinDistance name="proximity" alarmDistance="0.04" contactDistance="0.02" angleCone="0.0" /> <FreeMotionAnimationLoop/> <LCPConstraintSolver tolerance="1e-5" maxIt="1000" /> <include name="Uterus" href="uterus_fem.xml" /> <include name="Instrument" href="instrument.xml" position="0 -2 0 0 0 0 1.0"/> <Node name="Instrument" > <EulerImplicitSolver name="ODE solver" rayleighStiffness="0.05" rayleighMass="1.0" /> <CGLinearSolver name="linear solver" iterations="50" tolerance="1e-10" threshold="10e-10" /> <MechanicalObject name="instrumentState" template="Rigid3d" position="0 0 0 0 0 0 1.0" /> <UniformMass name="mass" totalMass="0.1" /> <UncoupledConstraintCorrection/> <Node name="VisualModel" > <MeshObjLoader name="VisualLoader" filename="mesh/hysteroscope.obj" /> <OglModel name="InstrumentVisualModel" src="@VisualLoader" /> <RigidMapping name="MM->VM mapping" input="@instrumentState" output="@InstrumentVisualModel" /> </Node> <Node name="CollisionModel" > <MeshObjLoader filename="mesh/hysteroscope_for_collision.obj" name="loader"/> <Mesh src="@loader" name="InstrumentCollisionModel" /> <MechanicalObject src="@loader" name="instrumentCollisionState" /> <LineCollisionModel name="instrument" contactStiffness="10" /> <PointCollisionModel name="instrument" contactStiffness="10" /> <TriangleCollisionModel name="instrument" contactStiffness="10" /> <RigidMapping name="MM->CM mapping" input="@instrumentState" output="@instrumentCollisionState" /> </Node> <VectorSpringForceField object1="@Input/RefModel/instrumentCollisionState" object2="@Instrument/CollisionModel/instrumentCollisionState" stiffness="10" viscosity="0" /> <Node name="Camera" > <MechanicalObject template="Rigid3d" name="CameraState" rx="90"/> <RigidRigidMapping /> </Node> </Node> <OglViewport screenPosition="0 0" screenSize="300 300" zNear="0.01" zFar="10" cameraRigid="@Instrument/Instrument/Camera/CameraState.position" drawCamera="1" /> <SpotLight name="LightSource" color="1 1 1" position="@Instrument/Instrument/Camera/CameraState.position" direction="0 -1 0" cutoff="10" exponent="1" fixed="1" /> </Node>
Let us know if it helps.
Hugo
Hugo
KeymasterHi @jieying
A first important issue that I detect is that you meshes (used for collision) CAN NOT intersect before the simulation starts. If contacts are already present at the first step, it is a ill-posed problem.
Could you re-design a new scenario respecting this constraint?
Hugo
Hugo
KeymasterHi @sayan957
If you compiled the sources of SOFA, you can add the path to the bin/ repository of SOFA in your environment variable. Here is an article describing how to proceed.
If you installed the binary, you had an option to cross in order to set this SOFA environment variable. If you did not cross it, follow the instructions given in the above link.
The simulation scenes (*.scn) can be loaded directly from runSofa with: CTRL+O
To design a scene file, you can get inspired from the existing examples in examples/Components/
Unfortunately, today no Modeler is available to assist in the design of a scene, but you can also give a look at the examples/Tutorials/StepbyStep/Best
Hugo
Hugo
KeymasterHi @sayan957
And thanks for the (very) reactive support @jieying!
Once SOFA is installed, you will need to write your own scene file *.scn (in XML) or *.py (in Python). You can find plenty examples of simulation scenes in examples/Components/
If you are looking at building SoftRobotics simulations, I guess examples are also available in the SoftRobot plugin.Best wishes,
Hugo
Hugo
KeymasterHi @jieying
I am sorry but the link to your scene is actually broken. Could you share it again please?
Hugo
Hugo
KeymasterHi @bobiko
and welcome on the SOFA forum!
ViewPort and SpotLight are two different things:- ViewPort (OglViewPort) is a new point of view in the simulation, as you can see in the scene: examples/Components/visualmodel/OglViewport.scn
- SpotLight is a light with a position and direction of light, asyou can see in the scene: examples/Components/visualmodel/SpotLight.scn
Which of those do you want to use ?
Linking the position with the MechanicalObject (of a rigid body for instance) is the good way to go. If you share you scene, we might be able to help a bit more.Best,
hugo
Hugo
KeymasterHi @shuo
Sorry for the delay.
If you want to do both steps (configuration and compilation) using Qt, it is possible. The steps to follow are given here.You can directly open the project by select the CMakeLists.txt at the SOFA source repository in QtCreator. And follow the steps.
Let us know if you struggle with this.
Best
Hugo
22 July 2019 at 17:44 in reply to: [SOLVED] undefined reference to 'boost::program_options::abstrac_variables_map::operator' #13975Hugo
KeymasterHugo
KeymasterHi @zahra
These are inches if you consider the size of a human liver.
You therefore need to scale it in meters if you want to use the International Unit System (e.g. Newton for forces)Hugo
Hugo
KeymasterHi @shuo
1. CMake is the first step before the compilation. I think you are confusing these two different steps: (i) configuration of the project with CMake and (ii) compilation
2. The CMakeLists.txt referred here corresponds to the CMakeLists located in the sources of SOFA
Best wishes,
Hugo
Hugo
KeymasterHi @zahra
What is the range of the values within your mesh file?
What is the object you are aiming at modeling?Hugo
Hugo
KeymasterHi @eyadshak
In the CMake configuration (I guess using the cmake-gui interface), you need to set the CMake variable for boost. As detailed here in the doc, you can create a new entry
BOOST_ROOT
and specify the path to your boost directory.If you struggle, please specify us your OS and all your versions (SOFA, boost, cmake)
Best
Hugo
Hugo
KeymasterThank you for your question.
SOFA is mainly a framework for solid mechanics. Few codes are actually computing fluid dynamics.
You can find two classes available for this:- examples/Components/behavior/Fluid3D.scn : implementing on an Eulerian grid the work from Dr. Carlson (see thesis here)
- examples/Components/forcefield/SPHFluidForceField.scn: implementing the Navier Stokes equation using SPH
I hope this will help you.
We would be happy to assist you in the implementation of a new model.
Best wishes,Hugo
Hugo
KeymasterHi @ma1991
I come back to your issue.
Apparently you want to mesh this yarn surface (stl) mesh, right ?
Since it is very thin, all meshers will struggle in the meshing process.What do you want exactly to model from this mesh again ?
Where do you want to be accurate in simulation ?Hugo
Hugo
KeymasterHey @eunkyungbae
1. Cool let us know about it
2. I guess you are using these components within a node (a Context) which uses the CUDA templates. No GPU version seems to exist in the open-source repository. Therefore, the instantiation using the template “CudaVecxd” will not work.
For your information, instead of GPU, we have an independent developer working multithreaded approach for constraints. I heard the latest performance results (mixing MT + GPU) were very interesting. Let me know whether you want me to put you in contact.
3. Great to hear.
Best
Hugo
Hugo
KeymasterHi @bence
I am sorry I sent you a reply that apparently never succeeded.
In the open-source core of SOFA, the only possibility to create curved shapes with beam elements is to load a mesh including a curved geometry made of edges.However, in the plugin for catheters (name: BeamAdapter), you have the possibility to describe a curved geometry for such catheter models. To know more about this code, please see the associated Marketplace item.
Best
Hugo
Hugo
KeymasterHey @eunkyungbae
1. Building sofaCUDA Plugin – using CudaVec3d
Major changes occured in the last months in SOFA, affecting SofaCUDA. Which version are you using? master branch? v17.06 branch (as specified)?
CUDA toolkit relies on floats, this explains I guess the issues you are facing.
With the latest version of SOFA, you might need to compile it in FLOAT to have the type compatibility with CUDA.
I really need to recompile SofaCUDA plugin!2. using “UncoupledConstraintCorrection” or “PrecomputedConstraintCorrection” components
This should work. Could you explain the issue?
The details about these classes are given in the doc here.3. using triangle model or point model as collision model
To use the collision models, you should use the writing<TriangleCollisionModel template-="CudaVec3f" />
(or TriangleModel if you use an release version <=18.12) I hope this helps. HugoHugo
KeymasterHey @nicklj
I am no expert from SoftRobot, but I just poked the SoftRobot devs! The community should get back to you!
CheersHugo
Hugo
KeymasterDear @hyunseoklee
Thank you for your question and welcome to the SOFA forum!
It seems you compiled SOFA successfully. However, when you run runSofa, it runs a batch simulation, i.e. without GUI. Was Qt properly found in the configuration (CMake) phase?
When you run for the first time, it is possible that the .ini files (config file for view for instance). But this is not a problem for your simulation.I hope this helps.
BestHugo
Hugo
KeymasterHey @fayad
I tried last week to get back with the Geomagic.
I saw what you meant. I had less than a hour to build and test. From this, I would really go for a TransformEngine recovering as input the Geomagic position, and providing an output position for the right_tip MechanicalObject. Then, you could apply rotation, but a bit of code in needed to enforce a local rotation and not a rotation regarding the reference frame (0,0,0).Hope this helps
Hugo
Hugo
KeymasterHugo
KeymasterHi @eyadshak
Thank you for your interest in SOFA and welcome in the SOFA forum!
You apparently did all good steps and I don’t see the issue:
– your device seems to be well setup
– the name is the same in the scene and in the configurationHave you tried to re-setup and configure your Geomagic device?
I will try the plugin myself next week when I get back from a business trip.Best
Hugo
-
AuthorPosts