Forum Replies Created
16 April 2021 at 9 h 36 min #19200
Could you try to add the following path in your environment:
export SOFA_ROOT=/path/to/SOFA export PYTHONPATH=$SOFA_ROOT/plugins/SofaPython3/lib/python3/site-packages
Hugo16 April 2021 at 8 h 56 min #19198
You should have python3.7 installed on your machine.
For Ubuntu, could you please run:
sudo apt install libpython3.7 python3.7 python3-pip python3.7 -m pip install numpy
Hugo16 April 2021 at 0 h 37 min #1919316 April 2021 at 0 h 14 min #19192
Interesting point. For now, the SOFA API only allows for frictional contact to use one homogeneous friction coefficient for all object. It’s in on our radar to allow for heterogeneous friction. We could see together how to implement this.
Hugo16 April 2021 at 0 h 11 min #19191
Have you loaded the SofaPython3 plugin through Edit > Plugin Manager > Add ..
Hugo16 April 2021 at 0 h 10 min #19190
No contraction model has been yet implemented in the open-source version of SOFA, but it would be most interesting! IMO approximating such a model with a constant forcefield sounds too approximated.
The contraction model must be implemented using the FEM as a forcefield in SOFA. An example of such a model FEM integration is available in this paper. Do you see how to proceed?
Hugo15 April 2021 at 18 h 49 min #19185
First of all, welcome on the SOFA forum! Here, no need to apologize for noob-looking question, we are here for this! Second, it is really great to read that the YouTube tutorials are being helpful! Note that more advanced training session can be arranged for later 😉
NOTE: I can not access your errors / files.
Downloading SOFA binaries from https://www.sofa-framework.org/download/ or from https://project.inria.fr/softrobot/install-get-started-2/download/ is actually equivalent!
After adding in the PluginManager (as you described) the plugins (SoftRobots, STLIB) you will be able to run the scenes.
Now, about your problem with Python scenes, it is due to the fact the v20.12 release is the first version of SOFA including the SofaPython3 plugin. All the scenes in SoftRobots were not yet updated to work with python3. Two solutions:
– you use the SofaPython plugin instead (corresponding to SofaPython2.7) with SoftRobots
– or (more modern and useful for a close future) I can help you to update one python scene of interest for you to work with SofaPython3!
Looking forward to hearing from you,
Hugo14 April 2021 at 12 h 45 min #19162
Hugo13 April 2021 at 18 h 51 min #19156
Ok you are therefore using the sources of SOFA and compiling them.
You might have cloned and compiled the sources of the SoftRobots plugin as well.
Make sure to be on the v20.12 branch for BOTH SOFA and and the SoftRobots plugin. Otherwise, you will have version mistmatch. To check what is your branch:
Note that a shorter, simpler way to go and use the SoftRobots plugin is to use the binary (pre-compiled) available here (all-inclusive: SOFA+SoftRobots+STLIB+SofaPython3).
Hugo13 April 2021 at 18 h 45 min #19155
You make me think that we should provide more insight about the CMake package organization (e.g. knowing which code is located in which package). We will work on this.
Hugo13 April 2021 at 18 h 44 min #19154
You need to make sure that the SofaPython plugin is well loaded.
Which version of SofaPython are used in your scene ?
SofaPython(2) or SofaPython3 ?
Hugo12 April 2021 at 13 h 17 min #19144
What are you changing the SofaPhysicsAPI from a library to an executable project? I am not sure to follow you.
Regarding SofaGeneral, it is also a deprecated collection (see #1596). It must be replaced by the appropriate package (e.g. SofaGeneralEngine, SofaGeneralDeformable etc.) depending on which is needed. These needed SofaGeneralEngine*.so should be explicit in the CMakeLists.txt (find_package + add_library).
Hugo12 April 2021 at 12 h 58 min #1914312 April 2021 at 12 h 47 min #19142
Strange it worked with a the previous binary version and the sources. I will ask our release manager.
Hugo12 April 2021 at 10 h 04 min #19140
I read somewhere that the team won’t be supporting the SofaPython2 from the current release
Yes this is correct.
Thank you for posting your error. I don’t see from this where does the problem come from. Could you please tell us:
– the version of the Python installed on your Windows
– do you confirm that you downloaded the binary version v20.12.02 (from the SOFA website : download page) ?
Have you checked the required dependencies here1?
Hugo9 April 2021 at 17 h 57 min #19123
Unfortunately, with the SofaPython plugin (2.7), no binding was existing to trigger the SOFA draw process (corresponding to:
I guess this could be added to the SP2 API. But I am no master of python bindings 🙁
Sorry about this
Hugo9 April 2021 at 14 h 58 min #19106
Interesting to see that muscle contraction is a rising topic.
The contraction of an object is a so-called active mechanical model. I guess some field will induce the contraction, and contraction law might exist to define how this field relates to contraction forces. This active constitutive law must be integrated using the FEM as the usual passive part (i.e. elasticity).
One classical model is the Hill muscle model, but I guess many others do exist. I know a team implemented a part of a similar contraction in a private plugin.
Hugo9 April 2021 at 13 h 29 min #19104
Let’s close this topic then, and focus on the new one.
Hugo9 April 2021 at 11 h 16 min #19098
Thank you for your proposal. We are a non-profit initiative. Our staff is funded thanks to the support of our consortium partners and our donors, while the project developers are in companies and research institutes of the community. Such offshore dev is therefore not of interest for us.
Hugo9 April 2021 at 11 h 00 min #190969 April 2021 at 9 h 14 min #19095
Alright thanks for the clarification.
What is the full error you are getting when loading the plugin from the plugin manager?
Hugo9 April 2021 at 0 h 05 min #190938 April 2021 at 23 h 46 min #19092
Welcome on the SOFA forum!
Choosing the right solvers, method is actually case-dependent and requires a bit of experience. You directly noticed this, well done.
1) Using friction contact for your grasping simulation is a good choice. Difference betweem the LocalMinDistance and MinProximityIntersection are available on their respective doc pages. You will understand why more collision points are kept in the MinPoximity case. You should use the LocalMinDistance.
Note that when more contact points are saved, the system to solve is larger, therefore more time-consuming to solve, which leads your simulation to lag.
2) While grasping, if the mesh of the trunk overlaps the cylinder mesh, you should adapt the collision settings (alarmDistance and contactDistance).
I hope this helps already.
Hugo8 April 2021 at 23 h 31 min #19091
I am actually unsure of your situation.
Are using the binary version of SOFA?
Where did you download it from?
Are you willing to use the sources? or a binary version would suit you?
Hugo8 April 2021 at 23 h 27 min #19090
You said: When I executed the CMake checking the SofaPython3, it showed me an error.
What is this error at the CMake configuration step please?
If the configuration is returning an error, you should not build the project and first solve this CMake error.