Few month ago I was doing screenshot using python3. For that I was using pygame to open a window with an opengl context then the SofaPython3 functions to build control the simulation and trigger the sofa rendering into this opengl context.
This was more or less looking like this:
def doRendering(display, t):…
Last week there was new change in Sofa to stop fetching eigen3 but rely on the use of the one installed on your system. Maybe you could try this option.
This was merged in https://github.com/sofa-framework/sofa/pull/1281
Maybe you should try this version.
Hi Abdelrahman and eaparra,
Thanks for posting,
The problem probably happens since activated the support for the C++17 version of the c++language. The change was done just two weeks ago (precisely in PR https://github.com/sofa-framework/sofa/pull/1249). You are right that this problem may be related to the compiler/cmake version.
I will open…[Read more]
Using the python binding is what we also did in SoftRobots.
We made some easing functions in the
It was quickly made bit as I like the API I share an example of it:
“””Unpack the data from ros to Sofa”””
t =…[Read more]
Damien Marchal replied to the topic SofaPython3 – Compatibility with SofaPython and other plugins in the forum Using SOFA 3 months ago
SofaPython3 can be used with problem with SoftRobots but the examples as well as the STLIB have not been updated so they will not work anymore.
The big difference are in how to implement the ScriptController (because we have extended it a lot) and how to access the data fields. There is no initGraph anymore, in general the work…[Read more]
At DEFROST for grabbing of the screen we are using SofaPython3 and pygame. The rendering of Sofa is done in an openGL canvas using pygame. As we have full control of the simulation and rendering loop we can grab individual frames that are plug that into a machine learning algorithm.
I have not a lot of time to provide code for that but…[Read more]
Damien Marchal replied to the topic RigidMapping from Rigid3d to only some particles of FEMbody in the forum Using SOFA 4 months ago
At Defrost we are using Rigidification to do so. This will associate a rigid frame to a group of deformable dofs. As this is rather complex to implment we are using some helper function to do so. The functions are implemented in STLIB.
I highly support the idea of the SofaAward. So anyone using Sofa don’t hesitate to submit your work to the award. It can be big plugins, tools, framework or something more “simple” like the best sofa simulation you made with all the data/mesh/texture to run it.
See you in Paris.
thanks for your questions
Given the error message you are reporting says that there is no runSofa application visible. This means either the compilation didn’t went well or the runApplication is not in your “PATH” (if you don’t know what the PATH is: http://www.linfo.org/path_env_var.html). To check if the compilation did…[Read more]
I’m not very aware of the MOR plugin I think Felix or Olivier are better suited to answer.
But to give a bet I would say that the binary version is be shipped with the extra tools (including sofa-launcher) and the documentation for MOR was written for the source based version of Sofa (so taking as granted that…[Read more]
Hi @sayan, sorry to reply late, thank @hugo for the poke.
So to answer your first question, yes we are connecting physical robots to Sofa.
The simplest technical solution is to use USB->Arduino->motors. You can find pieces of explanation for this part in our tutoring web site: http://handsonsoftrobotics.lille.inria.fr/
Once you have an…[Read more]
There is no “make an exe” button in the runSofa gui. This would be a nice addendum, not to hard to do, but right now there is none.
To achieve what you want to do you can:
– put the content of the .xml or a .scn or a .py as a big string in a .cpp file and use this string as the source of a scene loader. This would allows to load the…[Read more]
On my side I don’t use Anaconda and prefer to rely on pip as much as I can.
About SofaPython3. The answer is yes, it make it possible to import Sofa modules and run a simulation directly in any python interpreter (Jupyter, Spyder, python3) in addition to the embedded one in runSofa.
Clearly SOFA is not dedicated to fabric simulation, it is a general purpose modeling and simulation framework for deformable object.
The problem with modelling is that you need to know what is the dynamic behavior you want to simulate to select the most appropriate mechanial model. If the dynamic behavior can be approximated well enough…[Read more]
There is also a plugin called SofaEulerianFluid 2D & 3D.
I’m not sure it is very active yet but if you try it please tell us and in all case it is probably a good starting point for fluid simulation.
Sorry to reply late.
My first guess with the failure to import SofaPython is that it may be because you specify the -DCMAKE_INSTALL_PREFIX=/home/liuj/opt/SOFA/master. I’m not sure to understand why you are specifying it. But this is supposed to be the location where sofa is installed and not the path to the source code.
The need…[Read more]
If you use sofa-spm it will generate the CMakeLists.txt for you 🙂
Here is a cut & past from one of my CMakeLists.txt:
Then I add the…[Read more]
I tend to be rather busy so forgot to reply immediately so thank for the poke,
About STLIB, Thank for the poke, STLIB is an external plugin available at
It should be installed in the same way as you did for SoftRobots.
To ease installation of plugins with dependencies recommand the use of…[Read more]
- Load More