Forum Replies Created
-
AuthorPosts
-
10 January 2022 at 16:27 in reply to: [SOLVED] Change point indices when using PartialLinearMovementConstraint #21341HugoKeymaster
Hi @ericcui
I close this topic since the question got a reply there: https://www.sofa-framework.org/community/forum/topic/access-object-data-on-the-fly-sofapython3/
Best
Hugo
HugoKeymasterHi @ericcui
My apologies for this late reply.
Have you tried to first click in the view of SOFA? To properly listen and take into account the events like keyboard interactions, we must first click in the view of the runSofa application. Let me know if this helps.
Else, everything looks correct to me. No other errors in the command prompt?
Best wishes,
Hugo
9 January 2022 at 18:40 in reply to: [SOLVED] Access constraint forces from a different class #21334HugoKeymasterGreat @akthetimes
All my apologies for the delay!
Thanks for closing the topic, do not hesitate to keep us updated!Best
Hugo
HugoKeymasterHey @ztjsofa
Could you make a screenshot of the full screen to see what you see?
It will help, thanks.Hugo
12 December 2021 at 16:44 in reply to: [SOLVED] Change point indices when using PartialLinearMovementConstraint #2112610 December 2021 at 22:12 in reply to: [SOLVED] Access constraint forces from a different class #21121HugoKeymasterHey @akthetimes
This depends on where/what is your code supposed to be implemented?
What is this C++ code you want to write?Best
Hugo
HugoKeymasterDear @ericcui
Indeed since the recent versions of SOFA (v21.06 and more recent) the way to access a data is using
tissue_box.indices
. ThegetObject
is a deprecated approach.Best wishes,
Hugo
HugoKeymasterDear @ericcui
I know how difficult it can be to revive someone else’s code.
But cutting is not an easy topic.
Moreover, the SOFA API evolved recently on this topic, but examples on cut made with haptic devices are still missing.If the code is too hacky, then maybe it would be safer to restart from fresh. But you are the one to have the decision.
You can take a look at the component TopologicalChangeProcessor which is allowing to process known-in-advance topological changes.Keep us closely updated, this is a topic of interest.
Best wishes,Hugo
HugoKeymasterHey @dlouis
I think a good example of what you would like is given in the MechanicalMatrixMapper.pyscn.
In the above-mentioned scene, if you add the following :
Plate = RigidNode.createChild('Plate') Plate.createObject("MeshGmshLoader", name="plateLoader", filename="mesh/simple_square.msh", translation="-5 -5 0") Plate.createObject("TriangleSetTopologyContainer", name="topo", src="@plateLoader") Plate.createObject("MechanicalObject", name="plateMO", template="Vec3d", showObject="1") Plate.createObject("TriangleCollisionModel") Plate.createObject("RigidMapping")
you would then have a beam with a plate at the extremity.
BestHugo
10 December 2021 at 19:56 in reply to: ModuleNotFoundError … ‘Sofa.Helper’ with Binary install v21.06.02 #21117HugoKeymasterHey @dlouis
Great to read that you solved the issue.
Your question is actually different than the topic title. Is this correct?
@damien-marchaluniv-lille1-fr I do not remember how compatible were the v19.06 binaries of Defrost (including SoftRobots etc) was compatible with python3. Was it?Else @dlouis :
– you can compile the SoftRobots plugin aside SOFA
– the new release of SOFA is coming very soon and the associated SoftRobots, you can wait for itBest
Hugo
HugoKeymasterHey @ztjsofa
are you running SOFA from python?
The black background is due to the fact you need to load the CImgPlugin.
In python:SofaRuntime.importPlugin("CImgPlugin")
Else are simulations running fine?
Best
Hugo
HugoKeymasterHugoKeymasterhey @ericcui
Definitely, please find the readthedoc for SofaPython3!
I advice you to take a look this example which gives a good example of a so-called “python controller” : a python class that allows to define actions while the simulation is running.
However, in your case, all you need to do is to define a BoxROI with a FixedConstraint more or less as follows:
node.addObject('BoxROI', name="BoxSelectingPointToBeFixed", box="-999 -999 -999 0.01 999 999" ) node.addObject('FixedConstraint', name="FixedConstraint", indices="@BoxSelectingPointToBeFixed.indices", listening="true")
Best wishes,
Hugo
HugoKeymasterHi @ewpostek
This is a compatibility layer for developers in order to assist them following the SOFA life cycle (changes between v20.12 and v21.06). However, no worry: this does not disrupt the building.
Best wishes,
Hugo
HugoKeymasterHi @ananya
Please refer to the VTKExporter:
– doc page
– scene example fileIf the VTK format does not suit you, you can also export all visual models using a OBJExporter. Or, finally, you can also make your own exporter in python.
Best wishes,
Hugo
HugoKeymasterHi @simonwise
I do not know any application connecting SOFA and the Sophia robot.
The community is not very much active on humanoid robots, but rather on other soft-robotic applications.Without being involved in the Sophia project, I would recommend to contact the project leaders directly.
Best,
Hugo
HugoKeymasterHey @roger
I must (again!) apologize for the delay of my reply.
SOFA is definitely able to simulate the scenario you are looking at.If the scene files/info I sent you per mail do not suffice, let us know!
Find further information on:
– How to get involved
– watch our Tutorials on YouTube
– follow the online documentation
– browse the SOFA APINote that you can always take part in training session.
Best
Hugo
HugoKeymasterHey @vanisri
You can use a TranformEngine.
You can find an example scene in: examples/Components/engine/TransformEngine.scnBest wishes,
Hugo
HugoKeymasterHey @vanisri
The FixedConstraint aims at fixing a point by projecting a zero delta of velocity between two time steps:
Therefore, if you specify an initial velocity in your MechanicalObject, like:<MechanicalObject template="Rigid3d" name="myParticle" position="0 0 0 0 0 0 1" velocity="1 0 0 0 0 0" showObject="1" />
Even if the DOF are fixed, a constant velocity will be kept.
Is this what you aim at doing?Best wishes,
Hugo
HugoKeymasterHey @eaparra
You can reload the scene file and the entire simulation using CTRL+R keyboard shortcut.
Is this what you are looking for?
Best wishes,Hugo
HugoKeymasterHi @eaparra
A first simple question:
– have you tried decreasing the time step?
– have you tried decreasing the mesh resolution (number of beams)?Do the results / accuracy get affected?
Best wishes,Hugo
HugoKeymasterHi @shaswat2001
We do not have super-elastic material in SOFA. However, an innovative project is ongoing to couple SOFA and FeniCS to have the possibility to define the material and its energy formulation and run it in SOFA: https://github.com/Ziemnono/SofaSimpleForceField_FEniCS
It would thus be possible to implement new material laws like Nitinol.
Best wishes,
Hugo
HugoKeymasterAlright @toriwalnuss
Thanks for the feedback.No need to delete the topic, marking it at solved with the solution in it is perfect.
Best,Hugo
-
AuthorPosts