Home › Forum › SOFA › Using SOFA › [SOLVED] Time domain actions in a scene
Tagged: Linux_ubuntu, SOFA_2012
- This topic has 6 replies, 2 voices, and was last updated 3 years, 7 months ago by SergioPM23.
-
AuthorPosts
-
8 May 2021 at 07:10 #19411SergioPM23Blocked
Hello everyone!
I would like to know if is there any way to implement actions that depend on time in a Sofa scene. For example, applying a force field on an object at a specific instant of the simulation (whenever the user wants and not from the start of the simulation) or just set the time period (the start and end instants) that the object is gonna be subjected to the force field.
I would appreciate any help or response. Thanks in advance.Cheers
Sergio.8 May 2021 at 18:23 #19415HugoKeymasterYes, using a controller in python you will be able to do so.
You have an example of it here: https://github.com/sofa-framework/SofaPython3/blob/master/examples/emptyController.pyThe documentation about the SofaPython3 plugin is available here.
Best
Hugo
10 May 2021 at 01:53 #19417SergioPM23BlockedThanks for your response, Hugo. I have the following errors during the cmake-gui configuration step for the SofaPython3 installation:
CMake Error at /home/master/ext_plugin_repo/SofaPython3/Plugin/CMakeLists.txt:27 (find_package): By not providing "FindSofa.Testing.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Sofa.Testing", but CMake did not find one. Could not find a package configuration file provided by "Sofa.Testing" with any of the following names: Sofa.TestingConfig.cmake sofa.testing-config.cmake Add the installation prefix of "Sofa.Testing" to CMAKE_PREFIX_PATH or set "Sofa.Testing_DIR" to a directory containing one of the above files. If "Sofa.Testing" provides a separate development package or SDK, be sure it has been installed.
Do you know how to solve this error?
Cheers,
Sergio18 May 2021 at 18:12 #19477HugoKeymasterOla @sergiopm23
Are you using the binary version of SOFA (if so which version) or the sources compiled yourself (if so which branch)?
Now, you downloaded the SofaPython3 plugin sources. On which branch are you currently?
My questions will help me confirming that it is a compatibility problem between your SOFA and your SofaPython3 plugin.
Best,Hugo
18 May 2021 at 21:28 #19480SergioPM23Blocked@Hugo Hi Hugo. I decided to install the latest Sofa version from the binaries, because I was having a lot of problems with the version I had. I installed it from the binaries because it includes SofaPython3. My question now is: how I activate the plugin? I tried from the plugin mánager, but it didn’t work.
Thanks in advance.Cheers,
Sergio.19 May 2021 at 07:48 #19481HugoKeymasterYou can follow this documentation page. step by step.
All info is in it.
Let us know if a section is unclear.Hugo
20 May 2021 at 08:51 #19491SergioPM23Blocked@Hugo Thanks for your response, Hugo. I followed the steps in that documentation page and I have finally been able to activate the plugin, thanks.
I would also like to know where could I find more examples and documentation about controllers in python, cause I do not fully understand the example you posted in a previous message.
Thanks in advance.Cheers,
Sergio. -
AuthorPosts
- You must be logged in to reply to this topic.