Damien Marchal replied to the topic How to constraint objects inside a closed mesh without using collision models? in the forum Using SOFA 20 hours, 39 minutes ago
You can have Distance Field collisions by activating the SofaDistanceGrid plugin.
I don’t know if this plugin is available in the binary release of Sofa; If this is not the case you will need to re-compile Sofa by activating the plugin in the cmake build process.
When the plugin is on you will be able to execute the example that is in…[Read more]
I just looked at and TetrahedronFEMForceField does not expose the stiffnessMatrix so it is not surprising it does not work.
Adding a new Data to a component is not hard, assuming you know c++ and that the data you want to expose is available in the component. I don’t know for TetrahedronFEMFOrceField so I advice you to open an issue…[Read more]
To have the graphical user interface it is important to compile sofa with Qt5. It may happens that, depending on how it is installed on your systems, it is not detected.
In that case I know two options:
The first one is to stop using cmake but instead use qtcreator (you need a recent version of it) to load the CMakeLists.txt, in that…[Read more]
There is two issues… The first problem I see is that the build system still don’t find Qt5. This is why it is written
SoftRobots: Using Qt4 for some controllerswhich appears when Qt5 is not found. I think it is much better to make it compile with Qt5.
For the other error. Are you restarting the script in an non-empty directory (with…[Read more]
Damien Marchal replied to the topic How do i a map an omni button to a python function in the forum Using SOFA 3 days, 15 hours ago
If you think that shorter is better you can also write:
state_button1 = your_GeomagicDriver.button_1
This works because the python binding search for each “MyComponent.xxxx” if there is a data with the xxxx name.
Damien Marchal replied to the topic How to constraint objects inside a closed mesh without using collision models? in the forum Using SOFA 3 days, 15 hours ago
I remember that, few years ago, some have implemented collisions based on distance field representation to simulate a catheter moving into blood vessels while the vessels moving to follow heart movement. The advantage of this distance field approach was excellent performances of the collision pipeline even with a very big blood vessel…[Read more]
From your logs your problem seems rather different so to me you need to continue the compilation process by typing ninja or Make as said in the guidlines: https://www.sofa-framework.org/community/doc/getting-started/build/linux/
In case this is still not working and you need more help can you please open a new issue of your own so it…[Read more]
I don’t know which forcefield you are using but if the stiffness matrix of the force field you are using is exposed as a Data then yes it can be accessed at each time step using a PythonScriptController.
Eg taken from the previous python script controller
def onBeginAnimationStep(self, dt):
'''This method is called…
I think the answer from stefan is right if you have installed qt libraries with the apt package manager.
If you used the package manager/installer from the qt web site you have to check the QtWebEngine boxes in the packages list of the installer GUI
In the previous script, everything is based on the master “branches” so despite all the scenes are working the html tutorials will not be displayed properly.
To have good rendering of the tutorials you need to use the Documentation branch
# Step 0: download and install the latest qt version,
Here is more or less what I’m doing in a .sh script when I’m preparing a new machine for Sofa:
# Step 0: download and install the latest qt version
# Step 1: install all the dependencies
sudo apt-get install build-essential
sudo apt-get install cmake…[Read more]
Good to hear, and feel free to ask when you have questions or see bugs or behavior change in Sofa.
These feedback are really useful to improve our code base.
Damien Marchal replied to the topic get signal when Scene file is closed and display a graph (QtableWidget) in the forum Programming with SOFA 2 weeks, 2 days ago
Are you displaying the graph using PyQt I think the closest you can do is to use the cleanup method of PythonScriptController as in the following example:
def __init__(self, node):
def cleanup(self):…[Read more]
Damien Marchal replied to the topic Harmonic excitation with constantForceField (Python Controller) in the forum Using SOFA 2 weeks, 2 days ago
For what you want to do I can see two approach.
The first one is to implement your own controller to manipulate the data field at each animation step.
def __init__(self, node, dofs):
'''With SofaPython it is mandatory to pass at least…[Read more]
Hi Daryna, hi Pierre,
I’m looking in the code base right now.
And I wonder if you are sure of the file you were using ?
By reading the Sofa source code I noticed several things:
Whatever Xsp 3.0 or 4.0 to specify the number of springs & masses it is neede to use these keywords:
Then with Xsp 3.0 format the…[Read more]
Using TCP/IP is fine but there is more easy to use protocols. In our team when we want to exchange data that way we are using zeromq (http://zeromq.org/) or OSC (http://opensoundcontrol.org/introduction-osc) because they have good python binding and thus work very well with Sofa. But i ignore if there is way to use that in matlab, a…[Read more]
Thanks for the details.
To me this is a very strange behavior.
Some extra questions:
– which compiler version are you using ?
– did you installed metis yourself, would it be possible that there is a version mismatch between the library you link against and the sofa build ?
The solution I’m proposing is to initialize the object during the creation of the simulated scene.
If you want to interactively change the position of the MechanicalObject
you need to use a PythonScriptController. This PythonScriptController will at each frame update the position of the sofa object using data coming from an…[Read more]
- Load More