Forum Replies Created
-
AuthorPosts
-
TimesBlocked
If anyone encounters the same problem and is using the “FreeMotionAnimationLoop”, you may also check if you have included a ConstraintCorrection in your scene as well, for example, “PrecomputedConstraintCorrection”. I had the same problem, and it was because I had somehow removed the class computing the constraint correction
TimesBlockedI see. For what it’s worth, I think it’s a good move
TimesBlockedHey @Hugo,
Thanks!Regarding the forum migration, interesting move. Does this mean that in the future, users will be unable to ask questions on the SOFA Forum?
TimesBlocked@Hugo Thank you! The OscillatorConstraint does the job, I think I would like to later implement this as a controller. In my case, the whole object is moving, is there a way I can achieve this too? Thanks π
14 December 2021 at 16:41 in reply to: [SOLVED] Access constraint forces from a different class #21138TimesBlockedI was able to solve it like this:
core::objectmodel::BaseContext* context = this->getContext(); context->get(constraintSolver);
and finally the constraint forces can be printed out:
msg_info("constraint forces") << constraintSolver->getConstraintProblem()->f;
11 December 2021 at 10:30 in reply to: [SOLVED] Access constraint forces from a different class #21122TimesBlockedHey @Hugo,
I would like to impose different constraints depending on the contact force. So for example, in the SOFA class FrictionContact(FrictionContact -SOFA API), in the
createResponse
function, I’d like to reference the ConstraintSolver so I can impose a contact depending on the force. I appreciate any help you can offer on this. Thanks8 December 2021 at 06:26 in reply to: [SOLVED] Access constraint forces from a different class #21085TimesBlocked@Hugo, that perhaps is my question. How do I get the pointer to the GenericConstraintSolver?
TimesBlockedHey @serkan-ergun,
I can confirm that SOFA Version v21.06 with SOFAPython3 works on Windows 11.7 December 2021 at 06:57 in reply to: [SOLVED] Access constraint forces from a different class #21070TimesBlockedHey @Hugo,
Thanks for the reply! For example if we’d like to print out the values of the constraint forces from another class.sofa::component::constraintset::GenericConstraintSolver* solver; Data<type::vector< double >> constraintForces = solver->d_constraintForces.getValue(); if (condition) msg_info("Constraint Forces") << constraintForces;
How could I go about this?
TimesBlockedHi @NerioDev and @marco-ferro ,
The solution that worked for me was to download the sofa binary (the one that’s already compiled) and then copy the missing libs from there to “..\lib\Release” in your build folder. Hope that helps
TimesBlockedHi @mcpalu,
Glad it’s resolved nowTimesBlockedHi @SergioPM23,
If you go back to cmake you can search for “python3”, and ensure that you didn’t make any mistakes17 May 2021 at 13:10 in reply to: [SOLVED] Difficulties compiling my own SOFA plugins on Windows #19463TimesBlockedHi @Julien D.,
If you search in “../sofa/build” for “GTestConfig.cmake”, which folder is it located in? Because from your errors, cmake cannot locate “GTestConfig.cmake” and the others.15 May 2021 at 01:26 in reply to: [SOLVED] Difficulties compiling my own SOFA plugins on Windows #19453TimesBlockedHi @Julien D.
Let’s go with the first approach of just unzipping the SOFA_WIN_DEPENDENCIES_PACK into the sofa/src folder
In Cmake, set the path for GLEW_INCLUDE_DIR to “..sofa/src/include”
and GLEW_SHARED_LIBRARY_RELEASE to “..sofa/src/lib/win64/glew32.lib”Hope that helps
TimesBlocked@SergioPM23,
Hmm, ok. Did you try adding the CMAKE_PREFIX_PATH of Sofa.testing? The path is “../build/lib/cmake”13 May 2021 at 16:46 in reply to: [SOLVED] Difficulties compiling my own SOFA plugins on Windows #19438TimesBlockedHello @Julien D.
I think this location is not right “D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/cmake”If you built SOFA from the source code could you try “D:/Utilisateurs/jducrocq/Documents/Librairies/sofa/build/lib/cmake” instead
TimesBlockedHi @SergioPM23,
This is just a guess, but it seems to me that you didn’t add the sofa installation path correctly. Is this an in-tree build or an out-of-tree build?
TimesBlockedHey @Hugo,
Yes definitely! I am interested in setting up a meeting within the coming weeks with you, @yupeng and @agnesenardiBest wishes
TimesBlockedHey @yupeng,
Could I collaborate with you as well? It seems we more or less have the same goals.Thanks
TimesBlockedHey @Hugo,
I finally resolved it. The problem was I wasn’t copying the built python3 folder to the bin directory. thanks for the help!Since I have your attention currently, I wanted to take the opportunity to ask about how I can achieve a kind of needle insertion in a tissue. I believe I could break the springs but I don’t know how to implement this. Could you help give an idea of how I could achieve this?
Thanks
TimesBlockedHey @Hugo,
Sorry for the slow response. I had decided to move forward with the SofaPython2 plugin, I was wondering if I’d be at any major disadvantage. I think I read somewhere that the team won’t be supporting the SofaPython2 from the current release.Anyway, please find the error message below:
########## SIG 22 - SIGABRT: usually caused by an abort() or assert() ##########</ul> 44: sofa::helper::BackTrace::dump - 0x7ff934d3617043: sofa::helper::BackTrace::sig - 0x7ff934d362f042: raise - 0x7ff97ad7c8d041: abort - 0x7ff97ad7da8040: terminate - 0x7ff97ad7d1f039: terminate - 0x7ff97ad7d1f038: GetXMLElementAttribute - 0x7ff962db7cd037: UnhandledExceptionFilter - 0x7ff97a7f0f9036: memset - 0x7ff97cec3cc035: _C_specific_handler - 0x7ff97cead2e034: _chkstk - 0x7ff97cec1dd033: RtlRaiseException - 0x7ff97ce8a74032: RtlRaiseException - 0x7ff97ce8a74031: RaiseException - 0x7ff97a733ac030: CxxThrowException - 0x7ff9648463f029: sofapython3::PythonEnvironment::Init - 0x7ff943e7856028: initExternalModule - 0x7ff943e717c027: sofa::helper::system::PluginManager::loadPluginByPath - 0x7ff934dd53d026: sofa::gui::qt::SofaPluginManager::addLibrary - 0x7ff92c3a052025: QObject::qt_static_metacall - 0x7ff91679094024: QAbstractButton::clicked - 0x7ff92058ec0023: QAbstractButton::click - 0x7ff92058ea3022: QAbstractButton::mouseReleaseEvent - 0x7ff92058f81021: QWidget::event - 0x7ff9204e788020: QApplicationPrivate::notify_helper - 0x7ff9204c488019: QApplication::notify - 0x7ff9204c216018: QCoreApplication::notifyInternal2 - 0x7ff916772a1017: QApplicationPrivate::sendMouseEvent - 0x7ff9204c57d016: QSizePolicy::QSizePolicy - 0x7ff92050d6d015: QSizePolicy::QSizePolicy - 0x7ff92050d6d014: QApplicationPrivate::notify_helper - 0x7ff9204c488013: QApplication::notify - 0x7ff9204c216012: QCoreApplication::notifyInternal2 - 0x7ff916772a1011: QGuiApplicationPrivate::processMouseEvent - 0x7ff91974298010: QWindowSystemInterface::sendWindowSystemEvents - 0x7ff91972ec209: QEventDispatcherWin32::processEvents - 0x7ff9167bb9f08: qt_plugin_query_metadata - 0x7ff908b40e407: QEventLoop::exec - 0x7ff91676ed706: QCoreApplication::exec - 0x7ff9167719405: sofa::gui::qt::RealGUI::mainLoop - 0x7ff92c3819104: sofa::gui::GUIManager::MainLoop - 0x7ff95ad021403: sofa::gui::GUIManager::MainLoop - 0x7ff95ad021402: sofa::gui::GUIManager::MainLoop - 0x7ff95ad021401: BaseThreadInitThunk - 0x7ff97cc07c100: RtlUserThreadStart - 0x7ff97ce8d700[WARNING] [SofaSimulationGraph] the library has not been cleaned up (sofa::simulation::graph::cleanup() has never been called, see sofa/helper/init.h) [WARNING] [SofaSimulationCommon] the library has not been cleaned up (sofa::simulation::common::cleanup() has never been called, see sofa/helper/init.h) [WARNING] [SofaSimulationCore] the library has not been cleaned up (sofa::simulation::core::cleanup() has never been called, see sofa/helper/init.h) [WARNING] [SofaCore] the library has not been cleaned up (sofa::core::cleanup() has never been called, see sofa/helper/init.h)
Thanks π
-
AuthorPosts