Forum Replies Created
-
AuthorPosts
-
HugoKeymaster
Thank you for your reminder @trannguyenle.
Did you or will you have some time for an update of the ROSConnector @faichele?Hugo
HugoKeymasterHey @anluong
Sorry I am jumping in.. what did you mean by “applying a bending force on your material, that could be done by changing dynamically its rest position” @olivier-goury ?
Hugo
HugoKeymasterI close this topic since I replied to you @rmartinez in the other thread, while @mckysd5 ‘s question is solved.
Hugo
4 December 2020 at 22:53 in reply to: Having trouble opening scene editor in SOFA on windows 10 #17937HugoKeymasterDear @rmartinez
Thank you for your interest in SOFA and welcome on the SOFA forum.
Sorry for the delay of this reply. The SOFA Week occured last week and kept us busy for some time! We will soon get back on track with a normal rhythm.In SOFA, we have a script allowing for translating your xml script into a python (2.7) one. It is located in the SofaPython plugin. It is called scn2python.py. But at best, you can learn to understand and make this translation yourself.
I am not sure to understand your question on the AnimationLoop component. An AnimationLoop is a component ordering each simulation step. However, it is not computing anything. It is therefore a quite passive component. And the GUI component does not show much indeed. Doc on the AnimationLoop can be found here.
I don’t know in details the SoftRobot robot tutorial. Maybe @damien-marchaluniv-lille1-fr could help you on this.
I hope this helps.
Best wishes,Hugo
HugoKeymasterHi @bill757
I will base my example still on the scene examples/Components/mapping/ArticulatedSystemMapping.scn, here note the use of the TorsionForceField :
<Node> <EulerImplicitSolver name="cg odesolver" printLog="false" rayleighStiffness="0.1" rayleighMass="0.1" /> <CGLinearSolver iterations="100" name="linear solver" threshold="1e-20" tolerance="1e-20" /> <Node name="restarticulation"> <MechanicalObject name="rest" template="Vec1d" position="0 0 0 0" /> <FixedConstraint indices="0 1 2 3" /> </Node> <Node name="articulation"> <MechanicalObject name="Articulations" template="Vec1d" position="0 0 0 0" /> <Node> <MechanicalObject template="Rigid3d" name="DOFs" position="0 0 0 0 0 0 1 1 0 0 0 0 0 1 3 0 0 0 0 0 1 5 0 0 0 0 0 1 7 0 0 0 0 0 1" /> <BeamFEMForceField name="FEM" radius="0.1" youngModulus="1e8" poissonRatio="0.45"/> <MeshTopology name="lines" lines="0 1 1 2 2 3 3 4 " /> <UniformMass template="Rigid3d" name="mass" vertexMass="0.1 0.1 [1 0 0,0 1 0,0 0 1]" /> <FixedConstraint template="Rigid3d" name="fixOrigin" indices="0" /> <TorsionForceField indices="2" torque="00" axis="0 0 1"/> <ArticulatedSystemMapping input1="@../Articulations" output="@DOFs" /> <Node name="Collision"> <MechanicalObject template="Vec3d" position="-1 -0.5 -0.5 -1 0.5 -0.5 -1 0.5 0.5 -1 -0.5 0.5 1 -0.5 -0.5 1 0.5 -0.5 1 0.5 0.5 1 -0.5 0.5 -1 -0.5 -0.5 -1 0.5 -0.5 -1 0.5 0.5 -1 -0.5 0.5 1 -0.5 -0.5 1 0.5 -0.5 1 0.5 0.5 1 -0.5 0.5 -1 -0.5 -0.5 -1 0.5 -0.5 -1 0.5 0.5 -1 -0.5 0.5 1 -0.5 -0.5 1 0.5 -0.5 1 0.5 0.5 1 -0.5 0.5 -1 -0.5 -0.5 -1 0.5 -0.5 -1 0.5 0.5 -1 -0.5 0.5 1 -0.5 -0.5 1 0.5 -0.5 1 0.5 0.5 1 -0.5 0.5" /> <MeshTopology lines="0 1 1 2 2 3 3 0 1 5 5 4 4 0 5 6 6 7 7 4 2 6 7 3 8 9 9 10 10 11 11 8 9 13 13 12 12 8 13 14 14 15 15 12 10 14 15 11 16 17 17 18 18 19 19 16 17 21 21 20 20 16 21 22 22 23 23 20 18 22 23 19 24 25 25 26 26 27 27 24 25 29 29 28 28 24 29 30 30 31 31 28 26 30 31 27" triangles="3 1 0 3 2 1 3 6 2 3 7 6 7 5 6 7 4 5 4 1 5 4 0 1 5 1 2 2 6 5 4 7 3 4 3 0 11 9 8 11 10 9 11 14 10 11 15 14 15 13 14 15 12 13 12 9 13 12 8 9 13 9 10 10 14 13 12 15 11 12 11 8 19 17 16 19 18 17 19 22 18 19 23 22 23 21 22 23 20 21 20 17 21 20 16 17 21 17 18 18 22 21 20 23 19 20 19 16 27 25 24 27 26 25 27 30 26 27 31 30 31 29 30 31 28 29 28 25 29 28 24 25 29 25 26 26 30 29 28 31 27 28 27 24" /> <TriangleCollisionModel /> <LineCollisionModel /> <RigidMapping rigidIndexPerPoint="0 8 8 8 8" /> </Node>
Is this what you need?
Hugo
HugoKeymasterDear @shahramshokouhfar,
I answer also on the forum on top of your email.
SOFA indeed integrates the API for topological change. This can be noticed in all scenes in the folder : examples/Components/topology/TopologicalModifiers/.
There you will find several volumetric mesh example.Moreover, having the topology correctly updated when a cut occur is more advanced than element removal / adding. For industrial purposes, a good strategy could be a collaboration with consulting company like InfinyTech3D, who made nice demonstration simulation at our last SOFA Symposium. Let me know if such a connection if of interest.
Best wishes,
Hugo
HugoKeymasterHugoKeymasterHi @shan
I checked in the SoftRobot plugin.
I do not have this warning. What is your SOFA version and the SoftRobot version?Hugo
HugoKeymasterHugoKeymasterdid you requested the installation of the QtWebEngine at the Qt install?
It is detailed here in the doc.Best
Hugo
HugoKeymasterHi @shan
Could you please replace in your scene the part:
cylinder.createObject('Mesh', src='@loader', name='cylinderMesh') cylinder.createObject('MechanicalObject', name='DOF', template='Vec3d', translation=[0.0,0.0,0.0], rotation=[0.0,0.0,0.0])
with:
cylinder.createObject('TetrahedronSetTopologyContainer', name='topo') cylinder.createObject('MechanicalObject', name='DOF', template='Vec3d', position='@loader.position') cylinder.createObject('TetrahedronSetTopologyModifier', name='modifier')
It should work. Since some topology information is missing, it has to be computed by SOFA. But to do so, a Modifier must be added.
Best
Hugo
HugoKeymasterLast week to register for the SOFA Week! +105 registered participants among which 22% of them are industrial partners and 20 speakers scheduled!
REGISTER NOW!Do not hesitate to apply for the SOFA open-source awards: a competition open for all!
Looking forward to meeting you online!
–
The SOFA Consortium staffHugoKeymasterThank you so much @younesssss for being so responsive!
30 October 2020 at 23:25 in reply to: [SOLVED] Kinematic constraints between rigid bodies (list of available joints) #17507HugoKeymasterI think the scene examples/Components/mapping/ArticulatedSystemMapping.scn shows how several rigid frames can articulated. You can define the kinematics between them (rotational, translational joints).
I think the doc page could be useful as well.Best wishes,
Hugo
HugoKeymasterDear @shahramshokouhfar
You can take a look at the scene examples/Components/topology/Tetra2TriangleTopologicalMapping.scn which uses at line 22 an include. This way, you can actually include other xml files.
Best wishes,
Hugo
HugoKeymasterHi @mckysd5
The error
By not providing “FindSofaFramework.cmake” in CMAKE_MODULE_PATH
shows that you did not specify a CMake entry providing the path to SOFA, despite your are relying on SOFA (find_package).Best wishes,
Hugo
HugoKeymasterHi @momo2000
How did you estimated the mechanical properties of your ElasticMaterialObject?
I will poke @younesssss which knows way more about this tutorial than I do. Youness could you help Momo on this please?Best
Hugo
HugoKeymasterHi @shan
how did you generate this mesh? is this from SoftRobots plugin? It looks like a problem in the mesh topology.
Best
Hugo
HugoKeymasterHi @amackeith
you are reminding me that I need to compile SofaCUDA on my new desktop!
What is your SOFA version?
Is there any error/warning message provided?Best wishes,
Hugo
30 October 2020 at 15:24 in reply to: [SOLVED] Question about variable meaning in collision component #17498HugoKeymasterHey @wzdy4444
Good question, it’s nice to see you digging in the code.
CollisionElement in SOFA is implementing : CollisionElementIterator. From the API documentation, you can read that : you can think of a CollisionElementIterator as a glorified pointer to a collision element. It is only there to create a reference to it, not to actual contain its data. Classes derived from TCollisionElementIterator does not store any data, but just provide methods allowing to access the additionnal data stored inside the derived CollisionModel. For instance, the Cube class adds the minVect() / maxVect() methods to retrieve the corners of the cube, however this data is not stored inside Cube, instead it is stored inside the CubeData class within CubeModel.CollisionModel is the model describing the kind of primitives which will be used for the collision: line (edge), triangle, quad, tet, capsule, cylinder etc.
To see how collision information is stored, you can have a look to the ContactListener for instance. You will notice how maps are created, storing information relate to object1 and object2 involved in the collision.
Best wishes,
Hugo
HugoKeymasterHugoKeymasterHi @amackeith
Would you like to take images at each time steps?
Or would you like your Python script to save an image only at very specific moments?I doubt that with Python 2.7 you will be able to trigger keyboard event, I never tried it myself. Could you give it a try?
The usual keyboard pressed “v” key does not suit your need I guess?
Hugo
HugoKeymasterHi @bill757
Thank you for your question and welcome on the forum!
Looking at the example scene examples/Components/mapping/ArticulatedSystemMapping.scn, you can for instance access the DOF of the Vec1d MechanicalObject in the node “restarticulation”. This MechanicalObject contains the rotation angle of this articulated chain.
I think this is what you are looking for.
Best wishes,Hugo
-
AuthorPosts