Home › Forum › SOFA › Getting Started › Help needed with setting up!
Tagged: 64_bits, Setting up, SOFA_1806, Windows_10
- This topic has 21 replies, 8 voices, and was last updated 5 years, 2 months ago by Damien Marchal.
-
AuthorPosts
-
17 December 2018 at 17:15 #12610MaadiBlocked
Hi! I’m fairly new to FEA and simulation software. I’m somewhat familiar with Python but I want to master Soft Robotic simulations since I think they’re about to be the next industrial revolution. However, I have no idea what “cloning”/”build”/”CMake” mean and it’s been baffling me for the last three days. I’ve been wanting to code parameters to my 3D model files and simulate them by learning from the tutorials provided, but I’m not able to even comprehend how to set this software up! I have seen every tutorial available on the internet and still stuck in square one. I am clearly a novice here; but I would be incredibly grateful if anyone would make a “For Dummies” guide to how to set this up from scratch on Windows. Thank you!
18 December 2018 at 09:25 #12614HugoKeymasterDear @maadi5,
Thank you for your interest in SOFA and welcome to the forum.
Starting with FE simulation is not an easy objective since it requires knowledge in linear algebra, continuum mechanics and computer sciences. However, I would be glad to assist you in any way I can.If you are not used to computer science (“cloning”/”build”/”CMake”), rather use the binary version of SOFA.
To understand how to build a simulation step by step, you can use the example scenes located in examples/Tutorials/StepByStep/ and launch them. We are working on a new Modeler to assist people in building their own scene. We are also planning to create videos to describe how to build such a scene step by step.
Since SOFA is open-source, our development force is limited and our efforts are therefore focused on limited number of topics. But we are well aware of the complexity of handling SOFA when starting with simulation.
Best regards,
Hugo
18 December 2018 at 11:15 #12615MaadiBlockedHey @Hugo!
Thanks for getting back. I have installed the version of this software provided on the website (18.06 I believe). But I am unable to figure out how exactly to start off with coding on Python and tying that in with SOFA. Please help me out in this department. Thanks!18 December 2018 at 11:57 #12618HugoKeymasterDear @maadi5,
To start with Python, you can have a look to the example scenes located in applications/plugins/SofaPython/examples. The empty controller case shows how a python is structured.
Hugo
19 December 2018 at 23:17 #12626Damien MarchalBlockedHi Maadi,
If your interest is in SoftRobotics, you should try our SoftRobots plugin for Sofa that is available at https://project.inria.fr/softrobot/
Sadely there is no binary version for it, the documentation on how to compile it is
8 February 2019 at 16:47 #13018csullivan107BlockedI too am looking for a for dummies guide to installation. I am trying to use the soft robotics plugin for space exploration possibilities and am coming from a very hardware focused background. Because of my need for the soft robotics plugin, compiling has been a 3 day process of mistake after mistake. We tried to do the tutorials once we thought we had something going and realized we were missing something in the build.
Does the SOFA or soft robotics teams have a guide from step 1 up until starting the tutorials on how to correctly build and install the SOFA package with the relevant packages and plugins included? I and 2 of my colleagues are at our wits end!
Relevant information
OS: ubuntu (18.04.1 LTS)8 February 2019 at 23:11 #13019Damien MarchalBlockedHi @csullivan107,
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 # http://download.qt.io/official_releases/online_installers/ # Step 1: install all the dependencies sudo apt-get install build-essential sudo apt-get install cmake cmake-qt-gui sudo apt-get install ninja-build sudo apt-get install libboost-atomic-dev libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev libboost-locale-dev libboost-regex-dev libboost-system-dev libboost-thread-dev libboost-program-options-dev sudo apt-get install python2.7-dev python-numpy python-scipy sudo apt-get install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev sudo apt-get install libxml2-dev libcgal-dev libblas-dev liblapack-dev libsuitesparse-dev libassimp-dev # Step 2: clone Sofa git clone https://github.com/sofa-framework/sofa.git sofa # Step 3: clone plugins mkdir plugins cd plugins git clone https://github.com/SofaDefrost/STLIB.git STLIB git clone https://github.com/SofaDefrost/SoftRobots.git SoftRobots # Step 4: Make a CMakeLists to avoid manual settings of the plugins. echo "set(CMAKE_BUILD_TYPE RelWithDebInfo)" > CMakeLists.txt echo "#EXTERNAL DIRECTORY's plugins" >> CMakeLists.txt echo "sofa_add_plugin(STLIB STLIB)" >> CMakeLists.txt echo "sofa_add_plugin(SoftRobots SoftRobots)" >> CMakeLists.txt cd ../ # Step 4: setup build directory mkdir build cd build cmake ../sofa -G Ninja -DPLUGIN_SOFAPYTHON=1 -DSOFA_BUILD_METIS=1 -DSOFA_EXTERNAL_DIRECTORIES=../plugins cmake ../sofa -G Ninja -DPLUGIN_SOFAPYTHON=1 -DSOFA_BUILD_METIS=1 -DSOFA_EXTERNAL_DIRECTORIES=../plugins -DPLUGIN_STLIB=1 -DPLUGIN_SOFTROBOTS=1 ninja
when the compilation is done you can try to run something like the ones in the ‘docs’ directory.
Eg:bin/runSofa ../plugins/SoftRobots/docs/tutorials/Tripod/details/step5.pyscn
You can then press on the Animate button to start simulation
Damien,
9 February 2019 at 01:42 #13020Damien MarchalBlockedIn 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, # http://download.qt.io/official_releases/online_installers/ # During installation of Qt, don't forget o install the optional QtWebEngine (CHANGE HERE) # Step 1: install all the dependencies sudo apt-get install build-essential sudo apt-get install cmake cmake-qt-gui sudo apt-get install ninja-build sudo apt-get install libboost-atomic-dev libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev libboost-locale-dev libboost-regex-dev libboost-system-dev libboost-thread-dev libboost-program-options-dev sudo apt-get install python2.7-dev python-numpy python-scipy sudo apt-get install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev sudo apt-get install libxml2-dev libcgal-dev libblas-dev liblapack-dev libsuitesparse-dev libassimp-dev # Step 2: clone Sofa (CHANGE HERE) git clone --branch Documentation https://github.com/SofaDefrost/sofa.git sofa # Step 3: clone plugins mkdir plugins cd plugins git clone https://github.com/SofaDefrost/STLIB.git STLIB # (CHANGE HERE) git clone --branch Documentation https://github.com/SofaDefrost/SoftRobots.git SoftRobots # Step 4: Make a CMakeLists to avoid manual settings of the plugins. echo "set(CMAKE_BUILD_TYPE RelWithDebInfo)" > CMakeLists.txt echo "#EXTERNAL DIRECTORY's plugins" >> CMakeLists.txt echo "sofa_add_plugin(STLIB STLIB)" >> CMakeLists.txt echo "sofa_add_plugin(SoftRobots SoftRobots)" >> CMakeLists.txt cd ../ # Step 4: setup build directory mkdir build cd build cmake ../sofa -G Ninja -DPLUGIN_SOFAPYTHON=1 -DSOFA_BUILD_METIS=1 -DSOFA_EXTERNAL_DIRECTORIES=../plugins cmake ../sofa -G Ninja -DPLUGIN_SOFAPYTHON=1 -DSOFA_BUILD_METIS=1 -DSOFA_EXTERNAL_DIRECTORIES=../plugins -DPLUGIN_STLIB=1 -DPLUGIN_SOFTROBOTS=1 ninja
13 February 2019 at 17:22 #13032csullivan107BlockedThank you so much for the help! I followed the instructions and have made it to the build phase. about 80% through the build i was missing a directory for QWebEngineView. I took a screen at the time but did not copy the output (image: https://imgur.com/a/fuBngjk). I have looked for this and seem to be redirected to QtWebEngine. I have looked around on how to installs but thought i might post here before doing something stupid.
Any thoughts or insight would be great thank you!
14 February 2019 at 13:23 #13037sescaidaBlockedHi @csullivan107:
This error seems to indicate you’re still missing a package. It must have slipped through at some point during your installation. Try compiling again after installing it:
sudo apt install qtwebengine5-dev
Best
*edit*: I’m assuming that this will be the missing package, but in the package manager from Ubuntu there are several others available that are in some way related and potentially relevant: libqt5webengine5, libqt5webenginecore5, etc. (just search for them)
*edit2*: This answer is valid if you have installed Qt5 using the package manager. If you downloaded and installed Qt5 manually you should use the update tool of the installation!
14 February 2019 at 15:12 #13038Damien MarchalBlockedHi,
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
Best,
18 February 2019 at 09:58 #13053Damien MarchalBlockedHi all,
Is this issue solved ?
Damien.
18 February 2019 at 22:41 #13062csullivan107BlockedDamian,
I appreciate you following up. I have been having a lot of troubles and trying to solve them myself. I thikn i have been able to solve most of them. I am now having trouble with the last cmake command. I have been following the second of the two basch scripts you gave me.
when I run it it says that soft Robotics requires some qt4 modules. I cannot find out how to install qt 4 easily or in a way that i understand. the installer doesn’t include it and I have used synaptic package manager to try to install it but am getting the same errors. here is the output…
<font color="#8AE234"><b>chuck@chuck-VirtualBox</b></font>:<font color="#729FCF"><b>~/build</b></font>$ cmake ../sofa -G Ninja -DPLUGIN_SOFAPYTHON=1 -DSOFA_BUILD_METIS=1 -DSOFA_EXTERNAL_DIRECTORIES=../plugins -DPLUGIN_STLIB=1 -DPLUGIN_SOFTROBOTS=1 -- Install prefix: /home/chuck/build/install -- Boost version: 1.65.1 -- Found the following Boost libraries: -- system -- filesystem -- locale -- program_options -- chrono -- atomic -- thread -- date_time ICU_LIBRARIES = /usr/lib/x86_64-linux-gnu/libicudata.so;/usr/lib/x86_64-linux-gnu/libicui18n.so;/usr/lib/x86_64-linux-gnu/libicuuc.so Cannot find any Qt libraries on your system, please set Qt5_DIR or Qt4_DIR if you want to compile GUIs using Qt Adding Module SofaSparseSolver -- -- metis was found, SparseLDLSolver will be built -- -- csparse was found, SparseLUSolver and SparseCholeskySolver will be built Adding Module SofaPreconditioner -- -- newmat was not found. Adding Plugin SofaPython -- SofaTest: optional dependency SofaPython found, Python_test will be built Adding Plugin CImgPlugin -- CImgPlugin: TIFF Image Format enabled -- CImgPlugin: JPEG Image Format enabled -- CImgPlugin: PNG Image Format enabled Adding Plugin SofaMiscCollision -- SofaMiscModule: build all maintained sofa components. -- SofaMiscCollision: optional dependency SofaSphFluid not found de-activing: <SpatialGridPointModel> -- PSL is an experimental feature, use it at your own risk. Adding Plugin SofaAllCommonComponents Adding Application runSofa Write Plugin list at /home/chuck/build/lib/plugin_list.conf.default Adding external directory: plugins (../plugins) Adding Plugin STLIB Adding Plugin SoftRobots -- Found dependency : 'STLIB' plugin . SoftRobots: Using Qt4 for some controllers CMake Error at /home/chuck/plugins/SoftRobots/CMakeLists.txt:95 (sofa_generate_package): Unknown CMake command "sofa_generate_package". -- Configuring incomplete, errors occurred! See also "/home/chuck/build/CMakeFiles/CMakeOutput.log". See also "/home/chuck/build/CMakeFiles/CMakeError.log".
I feel like i am so close!
19 February 2019 at 19:03 #13080shivaBlockedDamian,
As csullivan107, already said , even i am facing problems with the cmake-gui.When i configure the the cmake, i am getting the following output the below console, but in the ending it is said CONFIGURING DONE.
It would be so kind if you help me sorting it out.
I am using UBUNTU (16.04 LTS)Install prefix: /home/shiva/Desktop/buzzing/sofa/build/install Boost version: 1.58.0 Boost version: 1.58.0 Found the following Boost libraries: system filesystem locale program_options thread date_time chrono atomic ICU_LIBRARIES = /usr/lib/x86_64-linux-gnu/libicudata.so;/usr/lib/x86_64-linux-gnu/libicui18n.so;/usr/lib/x86_64-linux-gnu/libicuuc.so SofaSparseSolver: metis was not found, SparseLDLSolver won't be built SofaSparseSolver: csparse was found, SparseLUSolver and SparseCholeskySolver will be built QGLViewer: Using Qt5 SofaGUIQt: Using Qt5 SofaTest: optional dependency SofaPython NOT found, Python_test won't be built Adding Plugin CImgPlugin CImgPlugin: TIFF Image Format enabled CImgPlugin: JPEG Image Format enabled CImgPlugin: PNG Image Format enabled Adding Plugin SofaMiscCollision SofaMiscModule: build all maintained sofa components. SofaMiscCollision: optional dependency SofaSphFluid not found de-activing: <SpatialGridPointModel> -- PSL is an experimental feature, use it at your own risk. Adding EXTERNAL subdirectory SofaHighOrder (/home/shiva/Desktop/buzzing/sofa/build/v18.06/applications/plugins/) does not exist and will be ignored. Adding Plugin SofaAllCommonComponents Adding Application Modeler Modeler executable: Using Qt5 Modeler library: Using Qt5 Adding Application runSofa Write Plugin list at /home/shiva/Desktop/buzzing/sofa/build/lib/plugin_list.conf.default Configuring done
19 February 2019 at 19:31 #13082Damien MarchalBlockedTo Shiva,
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 is easier to manage.To csullivan07,
Don’t worry, from your logs it seems that cmake does not find your Qt5 installation. The solution to this problem different depending on how Qt5 is installed on your system. In the following I will assume that you made a manual install of Qt5 from the Qt website.On my system having manually installed qt resulted in having Qt installed at the following location: /opt/Qt/5.12.0/
So I need to specify this location to cmake I need to change the two following lines
cmake ../sofa -G Ninja -DPLUGIN_SOFAPYTHON=1 -DSOFA_BUILD_METIS=1 -DSOFA_EXTERNAL_DIRECTORIES=../plugins cmake ../sofa -G Ninja -DPLUGIN_SOFAPYTHON=1 -DSOFA_BUILD_METIS=1 -DSOFA_EXTERNAL_DIRECTORIES=../plugins -DPLUGIN_STLIB=1 -DPLUGIN_SOFTROBOTS=1
To add options to force qt location like that:
cmake ../sofa -G Ninja -DPLUGIN_SOFAPYTHON=1 -DSOFA_BUILD_METIS=1 -DSOFA_EXTERNAL_DIRECTORIES=../plugins -DCMAKE_PREFIX_PATH=/opt/Qt/5.12.0/gcc_64/lib/cmake/Qt5 cmake ../sofa -G Ninja -DPLUGIN_SOFAPYTHON=1 -DSOFA_BUILD_METIS=1 -DSOFA_EXTERNAL_DIRECTORIES=../plugins -DCMAKE_PREFIX_PATH=/opt/Qt/5.12.0/gcc_64/lib/cmake/Qt5 -DPLUGIN_STLIB=1 -DPLUGIN_SOFTROBOTS=1
There is other alternatives to fix this issues in the section
“Qt detection error” of the compilation guidelines https://www.sofa-framework.org/community/doc/getting-started/build/linux/#qt-detection-errorsDamien,
20 February 2019 at 03:05 #13086csullivan107BlockedFirst off thank you for all of this help!
Second that seemed to work for that particular issue, but now another comes up when i run those last two commands.
-- Found dependency : 'STLIB' plugin . SoftRobots: Using Qt4 for some controllers CMake Error at /home/chuck/plugins/SoftRobots/CMakeLists.txt:95 (sofa_generate_package): Unknown CMake command "sofa_generate_package". -- Configuring incomplete, errors occurred! See also "/home/chuck/build/CMakeFiles/CMakeOutput.log". See also "/home/chuck/build/CMakeFiles/CMakeError.log".
I looked in this file and there seems to be a function that is called of this name…
## Install rules for the library and headers; CMake package configurations files sofa_generate_package(NAME SoftRobots VERSION ${PROJECT_VERSION} TARGETS ${PROJECT_NAME} INCLUDE_ROOT_DIR SoftRobots)
20 February 2019 at 20:09 #13093Damien MarchalBlockedHello,
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 controllers
which 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 already sofa/plugins directories ?) If this is the case this may be the problem.
Between the two scripts the difference is that I don’t use the same git branches/repository and if something fail the directory may be in an inconsistent state.
So could you try to run the scripts from a fresh directory and after adding the CMAKE_PREFIX_PATH=/YOURQT5PATH as I said in my previous post ?
22 February 2019 at 17:20 #13108csullivan107BlockedWhere would my qt path be? just to the folder labeled QT? I am having trouble understanding how linux installs things like this or how to access those install directories.
Damien, I just want to thank you for all your help so far. However, this all leaves me wondering… There has got to be a simpler way to get started with SOFA right? Is there an image of linux that i can install that already has all of this installed. I think there was a broken link somewhere leading to something like that but i cannot find it again. I have actually received such an image from another source/forum but it does not have the STLIB included and is using ubuntu 14.x. without that library I am having trouble getting through the tutorials to understand things since it wont load the files the tutorials ask you to recreate.
As a mechanical engineer and not a computer scientist, this process has been extremely time consuming and difficult. Are there any plans to make it easier? As enlightening as the process has been, its been almost 3 weeks now and I have not been able to even install SOFA/softrobotics to begin the work my short internship was meant to do. I hope you understand my frustration.
22 February 2019 at 18:07 #13109sescaidaBlockedHi @csullivan107,
it can be indeed hard to get used to the way software is distributed and built from scratch in Linux. Sorry for the frustration it causes! The team here is working on providing a more user-friendly solution, but as always it takes some time.
Basically, what Damien is saying is that Qt is distributed with Ubuntu (using the package manager) but can also be installed directly from its origin. The steps he has shown are for when you install it from its original providers:
This will lead to a different location of the Qt installation on your system than if you install it with the package manager. This is the reason you have to provide it in the cmake-configuration.
Now, from my experience cmake should be able to find Qt5 when it was installed through the package manager. If I’m correct, you have tried this, but I think you are still missing some packages. I’ve tried to guess which are the ones necessary:
sudo apt install libqt5core5a libqt5opengl5-dev libqt5widgets5 libqt5gui5 libqt5xml5
Then try running again the cmake configuration that produce the message you posted. This should be quick to test. Otherwise you can try to install Qt from the link posted above and follow Damien’s instructions.
Best
Stefan
13 March 2019 at 19:00 #13205sushil-sBlockedHey,
With most of the instructions from this discussion and a little help from the team that created the soft-robot plugin I was able to build SOFA and the soft-robot plugin but when I try to run SOFA by either:
TERMINAL
runSofa
runSofa: Command not foundDOUBLE CLICKING
I first get a pop up sayingCould nit display runSofa
There is no application installed for “shared binary” files.
Do you want to search for an application to open this file?When I click yes ubuntu gives a notification saying Additional MIME types required application is requesting additional file format support
1 October 2019 at 19:31 #14333TonyDelAbrilBlockedHello @damien-marchaluniv-lille1-fr
As I posted a problem with model order reduction a few days ago, I tried to install and build sofa to be able to run the sofa-launcher. I found this topic and followed your script (the second one you posted) cause I couldn’t deal with this tutorial: https://www.sofa-framework.org/community/doc/getting-started/build/linux/
So everything went well until the last cmake command before the ninja one. I get this error during the configuration and I don’t know how to deal with that.
-- PSL is an experimental feature, use it at your own risk. Adding Plugin SofaAllCommonComponents Adding Application runSofa Write Plugin list at /home/tony/Escritorio/Trabajo Fin de Máster/build/lib/plugin_list.conf.default Adding external directory: plugins (../plugins) Adding Plugin STLIB -- Install prefix: /home/tony/Escritorio/Trabajo Fin de Máster/build/install CMake Error at /home/tony/Escritorio/Trabajo Fin de Máster/plugins/STLIB/CMakeLists.txt:15 (sofa_install_pythonscripts): Unknown CMake command "sofa_install_pythonscripts".
I couldn’t find the related error in other topics, I would appreciate your help a lot.
Thanks in advance
2 October 2019 at 08:35 #14335Damien MarchalBlockedHi 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 well you can go in your build directory, then go to the “bin” subdirectory and there you should find a ‘runSofa’ file.at @tonydelabril:
Unless you really need to compile your own version of sofa I would recommend not to do so and use the binary we provide. To add sofa-launcher there is no need to compile sofa from the source code, because the sofa-launcher is just a set of python scripts so it should work with any runSofa applications available in your path when you run it. -
AuthorPosts
- You must be logged in to reply to this topic.