-
Damien Marchal replied to the topic SofaPython3 signal catching in the forum Programming with SOFA 1 month, 2 weeks ago
Hello,
This is an interesting topic. Despite being a working solution I think hijacking the class name is definitely not the way to go. In Sofa the Event class was not design to have an “emitter” information. But a subclass of Event called ScriptEvent is specifically doing that. I don’t know if the ScriptEvent is usable in your case and if it is…[Read more]
-
Damien Marchal replied to the topic Use Eigen::SparseMatrix in SofaPython3 in the forum Programming with SOFA 3 months, 3 weeks ago
Small news about that topic…
Yinoussa (from Defrost) made this week a preliminary pull request to Sofa. The aim of this PR is to able to manipulate Eigen matrices in sofa Data field.
It is there: https://github.com/sofa-framework/sofa/pull/1499A second work should coom soon to expose Eigen matrices in Python. One difficulty we have with…[Read more]
-
Damien Marchal replied to the topic Doubts: Complie SofaRobots and Sofapython3 in the forum Using SOFA 3 months, 3 weeks ago
Hi all,
We decided to work directly in the master branch of STLIB. There is now a python3 directory there with preliminary work. Far from finished, but if some want to help they are welcome.
Regards,
DM. -
Damien Marchal replied to the topic Use Eigen::SparseMatrix in SofaPython3 in the forum Programming with SOFA 4 months, 1 week ago
Hi all,
There is no support for sparse matrices in the binding yet (lack of time more than technical difficulty). As you pointed out, pybind11 has the proper machinery for that.
The problem is that, to detect the BaseData you want to store in is really holding a Data<Eigen::Sparse> we rely on the AbstractTypeInfo mechanism… which requires to…[Read more] -
Damien Marchal replied to the topic Error In Running SofaPython3 in Conda Environemtn with Python3.83 in the forum Programming with SOFA 4 months, 2 weeks ago
Hi Cai,
About SofaPython3 and Conda the problem seems to be at the initialization of the plugin (where we initialize the python3 interpreter). Maybe, but it is only a guess, there is a mismatch between the version you use for compilation and the one shipped with Conda. On my computer I tend to only use apt and pip3 to install python packages.…[Read more]
-
Damien Marchal replied to the topic Error configuring (cmake) SofaROSConnector in the forum Building SOFA 6 months, 1 week ago
Hello Bruno,
In case compiling the SofaROSConnector plugin there is in SoftRobots a very simple example/library on how to connect ros with Sofa using pyros.
Damien.
-
Damien Marchal replied to the topic Using SoftRobots + SofaPython3 in the forum Building SOFA 6 months, 1 week ago
Hi all,
We really need to upgrade SoftRobot so it use SofaPython3…any volunteer ?
DM 🙂
-
Damien Marchal replied to the topic Recording images of scenes in the forum Programming with SOFA 9 months, 3 weeks ago
Hi all,
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:
[Read more]
def doRendering(display, t):… -
Damien Marchal replied to the topic Error on Fetching subirectory eigen3 in the forum Getting Started 9 months, 3 weeks ago
Hi Lanandsky,
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.Regards,
Damien -
Damien Marchal replied to the topic sofa generating error in the forum Building SOFA 9 months, 3 weeks ago
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]
-
Damien Marchal replied to the topic Error with plugins with "SofaROSConnector" in the forum Building SOFA 9 months, 3 weeks ago
Hi gdrive61,
Using the python binding is what we also did in SoftRobots.
We made some easing functions in the
https://github.com/SofaDefrost/SoftRobots/tree/master/docs/examples/sofarosIt was quickly made bit as I like the API I share an example of it:
`python
recv(data, datafield):
“””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 9 months, 3 weeks ago
Hi @stokens,
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]
-
Damien Marchal replied to the topic Recording images of scenes in the forum Programming with SOFA 10 months, 3 weeks ago
Hi all,
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 10 months, 3 weeks ago
Hi Simon,
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.
Here:…[Read more] -
Damien Marchal replied to the topic Register for the SOFA Week 2019 now! in the forum Announcements / Infos 1 year, 3 months ago
Hello Hugo,
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.
-
Damien Marchal replied to the topic Help needed with setting up! in the forum Getting Started 1 year, 3 months ago
Hi all,
thanks for your questionsat @sushil-s:
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] -
Damien Marchal replied to the topic sofa-launcher and modelOrderReduction problems in the forum Using SOFA 1 year, 3 months ago
Hello @hugo hello @tonydelabril
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]
-
Damien Marchal replied to the topic Soft Robotics help in the forum Getting Started 1 year, 4 months ago
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]
-
Damien Marchal replied to the topic Soft Robotics help in the forum Getting Started 1 year, 5 months ago
yes 😉
-
Damien Marchal replied to the topic Generating .exe file out of a scene in the forum Programming with SOFA 1 year, 5 months ago
Hi @shiva,
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] - Load More