Forum Replies Created
-
AuthorPosts
-
rubab123Blocked
@Bruno I removed it and now I have this
if (simulation::AnimateEndEvent::checkEventType)
{this->getContext()->getRootContext()->setAnimate(false);
}
Now it doesn’t wait for the animation to stop, I open my scn file and start animate after a second It gets stopped (animation is stopped) itself. and nothing happens. Why doesnt it check if condition and wait for Animation End event? why it closes animation itself?rubab123Blocked@Bruno I got this, after checking if the AnimateEndEvent has occurred then I stopped animation
FROM SOFA [ERR] >> ########## SIG 11 – SIGSEGV: segfault ##########
FROM SOFA [ERR] >> 42
FROM SOFA [ERR] >> : sofa::helper::BackTrace::dump – 0x7ff833244fc041: sofa::helper::BackTrace::sig – 0x7ff83324514040: seh_filter_exe – 0x7ff850521b4039: seh_filter_exe – 0x7ff850521b4038: _C_specific_handler – 0x7ff834afbff037: _chkstk – 0x7ff854039f6036: RtlLookupFunctionEntry – 0x7ff853fa91a035: KiUserExceptionDispatcher – 0x7ff8540390d034: sofa::simulation::AnimateBeginEvent::checkEventType – 0x7ff8333c3b00
FROM SOFA [ERR] >> 33: initExternalModule – 0x7ff8350c23b032: sofa::simulation::Visitor::treeTraversal – 0x7ff8333e0af031: sofa::simulation::BehaviorUpdatePositionVisitor::processNodeTopDown – 0x7ff8333e0ef030: sofa::simulation::graph::DAGNode::executeVisitorTopDown – 0x7ff82b6399d029: sofa::simulation::graph::DAGNode::doExecuteVisitor – 0x7ff82b63851028: sofa::simulation::Node::executeVisitor – 0x7ff83340d46027: sofa::simulation::DefaultAnimationLoop::step – 0x7ff8333e6ef026: sofa::simulation::Simulation::animate – 0x7ff8334299e025: sofa::gui::qt::RealGUI::step – 0x7ff8261b677024: QMetaObject::activate – 0x5b49bf3023: QTimer::timeout – 0x5b5141f022: QObject::event – 0x5b4a0ec021: QApplicationPrivate::notify_helper – 0x5b847e7020: QApplication::notify – 0x5b84564019: QCoreApplication::notifyInternal2 – 0x5b47b92018: QEventDispatcherWin32::event – 0x5b4c2cc017: QApplicationPrivate::notify_helper – 0x5b847e7016: QApplication::notify – 0x5b84564015: QCoreApplication::notifyInternal2 – 0x5b47b92014: QCoreApplicationPrivate::sendPostedEvents – 0x5b47d4b013: qt_plugin_query_metadata – 0x7ff813b2feb012: QEventDispatcherWin32::processEvents – 0x5b4c326011: CallWindowProcW – 0x7ff853e4b78010: DispatchMessageW – 0x7ff853e4b4209: QEventDispatcherWin32::processEvents – 0x5b4c32608: qt_plugin_query_metadata – 0x7ff813b2feb07: QEventLoop::exec – 0x5b477e206: QCoreApplication::exec – 0x5b47a4d05: sofa::gui::qt::RealGUI::mainLoop – 0x7ff8261b49504: sofa::gui::GUIManager::MainLoop – 0x7ff83d7891603: sofa::gui::GUIManager::MainLoop – 0x7ff83d7891602: sofa::gui::GUIManager::MainLoop – 0x7ff83d7891601: BaseThreadInitThunk – 0x7ff853d727600: RtlUserThreadStart – 0x7ff854000d30
FROM SOFA [OUT] >> [WARNING] [SofaSimulationTree] the library has not been cleaned up (sofa::simulation::tree::cleanup() has never been called, see sofa/helper/init.h)The changes I made in my code are: sofa::core::objectmodel::Event* event; in header file
and if (simulation::AnimateEndEvent::checkEventType(event))
{this->getContext()->getRootContext()->setAnimate(false);
std::cout << “it is stopped”;}
But it gave me above errors, my sofa crashed. any suggestions @Bruno Marquesrubab123BlockedMay be I am not able to inherit it properly @Bruno can you access my code through teamviewer or what, I am not very much experienced in SOFA and it is taking a lot of time to get me resolve this.
rubab123Blocked@Bruno yes thats what I wanted, thank you so much.
I did thisif (sofa::simulation::AnimateEndEvent::checkEventType(event))
{
this->getContext()->getRootContext()->setAnimate(false);}In header file: sofa::core::objectmodel::Event* event;
Now when I open modeler and execute the scn file it gives this:FROM SOFA [ERR] >> ########## SIG 11 – SIGSEGV: segfault ##########
FROM SOFA [ERR] >> 42
FROM SOFA [ERR] >> : sofa::helper::BackTrace::dump – 0x7ff821b94fc041: sofa::helper::BackTrace::sig – 0x7ff821b9514040: seh_filter_exe – 0x7ff850521b4039: seh_filter_exe – 0x7ff850521b4038: _C_specific_handler – 0x7ff834afbff037: _chkstk – 0x7ff854039f6036: RtlLookupFunctionEntry – 0x7ff853fa91a035: KiUserExceptionDispatcher – 0x7ff8540390d034: sofa::simulation::AnimateEndEvent::checkEventType – 0x7ff821d13cb0
FROM SOFA [ERR] >> 33: getModuleComponentList – 0x7ff8321237e032: sofa::simulation::Visitor::treeTraversal – 0x7ff821d30af031: sofa::simulation::BehaviorUpdatePositionVisitor::processNodeTopDown – 0x7ff821d30ef030: sofa::simulation::graph::DAGNode::executeVisitorTopDown – 0x7ff82b1d99d029: sofa::simulation::graph::DAGNode::doExecuteVisitor – 0x7ff82b1d851028: sofa::simulation::Node::executeVisitor – 0x7ff821d5d46027: sofa::simulation::DefaultAnimationLoop::step – 0x7ff821d36ef026: sofa::simulation::Simulation::animate – 0x7ff821d799e025: sofa::gui::qt::RealGUI::step – 0x7ff821e7677024: QMetaObject::activate – 0x5b3dbf3023: QTimer::timeout – 0x5b4541f022: QObject::event – 0x5b3e0ec021: QApplicationPrivate::notify_helper – 0x5b847e7020: QApplication::notify – 0x5b84564019: QCoreApplication::notifyInternal2 – 0x5b3bb92018: QEventDispatcherWin32::event – 0x5b402cc017: QApplicationPrivate::notify_helper – 0x5b847e7016: QApplication::notify – 0x5b84564015: QCoreApplication::notifyInternal2 – 0x5b3bb92014: QCoreApplicationPrivate::sendPostedEvents – 0x5b3bd4b013: qt_plugin_query_metadata – 0x7ff8041cfeb012: QEventDispatcherWin32::processEvents – 0x5b40326011: CallWindowProcW – 0x7ff853e4b78010: DispatchMessageW – 0x7ff853e4b4209: QEventDispatcherWin32::processEvents – 0x5b4032608: qt_plugin_query_metadata – 0x7ff8041cfeb07: QEventLoop::exec – 0x5b3b7e206: QCoreApplication::exec – 0x5b3ba4d05: sofa::gui::qt::RealGUI::mainLoop – 0x7ff821e749504: sofa::gui::GUIManager::MainLoop – 0x7ff83d5791603: sofa::gui::GUIManager::MainLoop – 0x7ff83d5791602: sofa::gui::GUIManager::MainLoop – 0x7ff83d5791601: BaseThreadInitThunk – 0x7ff853d727600: RtlUserThreadStart – 0x7ff854000d30rubab123Blocked@Hugo yes you may close this topic, may be I will get desired responses on other question.
Yes, sure. We are developing a training simulator for Cell injection procedures (i.e ICSI etc), users will get training on this simulator at how to inject the substance into the cell. Once they will get training, they can easily work on real icsi procedures.
We are using SOFA for making small scene based exercises, which train them from basic (pipette moving towards cell) modules to advanced modules (full icsi procedure).
Now I also want to display a graph which contains user’s accuracy (how much time he has taken to complete the exercise, distance he covered towards cell etc) at the end of each module.
I am facing some issues in that, which is why I am here on SOFA forum 🙂 I hope you got an idea about our work.? @Hugorubab123BlockedThis stops the animation but what i want is when user clicks on animate and animation is stopped, then due to some method i get to know that now animation is stopped and the code should be displayed now.
is there any way i can get this?
@Bruno25 January 2019 at 07:38 in reply to: [SOLVED] Adding captions and instructions in sofa animation exercises #12898rubab123Blocked@Hugo thank u so much 🙂 Most of the times I am benefited by this forum, which i really appreciate that you people are so cooperative and helping.
Thanks again 🙂23 January 2019 at 07:45 in reply to: [SOLVED] How to use QTableWidget class in a sofa component plugin #12865rubab123BlockedHello @Behnam Binesh;
I have a new issue now, I am basically working in sofa and compiling it in Visual studio. I have some values saved in sqlite database. Then I have created a qt application using Qt creator and saved that data from sqlite to QTableView, which gives me a table containing sqlite data.
Now i want to use that table in sofa (my plugin component) so that it displays table, for this some one told me to put your header ,source and ui files (from Qt application) into the cmake of plugins, which I did same. I built cmake and opened project in VS, now that qt files are inaccessible like ui->setup (ui not found) errors like tableview not defined etc, I hope you understand my problem.
Here I share my cmake with you:cmake_minimum_required(VERSION 2.8.12)
project(EvaluationMetrixx)set(HEADER_FILES
initMyPlugin.h
InjectorPositioningMetrics.h
InjectorHandlingMetrics.h
ObjectHandlingMetrics.h
SphereHandlingMetrics.h
ICSISimulationMetrics.h
mainwindow.h)
set(SOURCE_FILES
initMyPlugin.cpp
InjectorPositioningMetrics.cpp
InjectorHandlingMetrics.cpp
ObjectHandlingMetrics.cpp
SphereHandlingMetrics.cpp
ICSISimulationMetrics.cpp
mainwindow.cpp)
set(UI_FILES
mainwindow.ui
)set(MOC_FILES
moc_mainwindow.cpp
)
find_package(Qt5 COMPONENTS Core REQUIRED)
if(Qt5Core_FOUND)
message(“Simedix: Using Qt5”)
set(QT5_NO_LINK_QTMAIN 1)find_package(Qt5 COMPONENTS Gui OpenGL Network Core Multimedia REQUIRED)
set(EXT_QT_INCLUDES ${Qt5Core_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS} ${Qt5Multimedia_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5OpenGL_INCLUDE_DIRS})
#target_include_directories(${EXT_QT_INCLUDES})set(EXT_QT_LIBRARIES ${Qt5Core_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Multimedia_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5OpenGL_LIBRARIES})
qt5_wrap_cpp(MOC_FILES ${MOC_HEADER_FILES})
set(MOC_FILES_GROUP “Generated”)
qt5_wrap_ui(FORM_FILES ${UI_FILES})
set(FORM_FILES_GROUP “Generated”)
endif()find_package(SofaFramework REQUIRED)
add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES} ${UI_FILES})
target_link_libraries(${PROJECT_NAME} SofaCore SofaMisc SofaMiscCollision SofaMiscEngine SofaMiscFem SofaMiscForceField SofaMiscMapping SofaMiscSolver SofaMiscTopology SofaGuiCommon)
target_link_libraries(${PROJECT_NAME} ${EXT_QT_LIBRARIES})set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS “-DSOFA_BUILD_EVALUATIONMETRIXX”)
install(TARGETS EvaluationMetrixx
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)22 January 2019 at 07:28 in reply to: QSqlTable and QSqlDatabase created in QT are not accessible in sofa #12855rubab123Blocked@Damien Marchal Thank you so much for responding. I am basically working in sofa and compiling it in Visual studio. I have some values saved in sqlite database. Then I have created a qt application using Qt creator and saved that data from sqlite to QTableView, which gives me a table containing sqlite data.
Now i want to use that table in sofa (my plugin component) so that it displays table, for this some one told me to put your header ,source and ui files (from Qt application) into the cmake of plugins, which I did same. I built cmake and opened project in VS, now that qt files are inaccessible like ui->setup (ui not found) errors like tableview not defined etc, I hope you understand my problem.
Here I share my cmake with you:cmake_minimum_required(VERSION 2.8.12)
project(EvaluationMetrixx)set(HEADER_FILES
initMyPlugin.h
InjectorPositioningMetrics.h
InjectorHandlingMetrics.h
ObjectHandlingMetrics.h
SphereHandlingMetrics.h
ICSISimulationMetrics.h
mainwindow.h)
set(SOURCE_FILES
initMyPlugin.cpp
InjectorPositioningMetrics.cpp
InjectorHandlingMetrics.cpp
ObjectHandlingMetrics.cpp
SphereHandlingMetrics.cpp
ICSISimulationMetrics.cpp
mainwindow.cpp)
set(UI_FILES
mainwindow.ui
)set(MOC_FILES
moc_mainwindow.cpp
)
find_package(Qt5 COMPONENTS Core REQUIRED)
if(Qt5Core_FOUND)
message(“Simedix: Using Qt5”)
set(QT5_NO_LINK_QTMAIN 1)find_package(Qt5 COMPONENTS Gui OpenGL Network Core Multimedia REQUIRED)
set(EXT_QT_INCLUDES ${Qt5Core_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS} ${Qt5Multimedia_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5OpenGL_INCLUDE_DIRS})
#target_include_directories(${EXT_QT_INCLUDES})set(EXT_QT_LIBRARIES ${Qt5Core_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Multimedia_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5OpenGL_LIBRARIES})
qt5_wrap_cpp(MOC_FILES ${MOC_HEADER_FILES})
set(MOC_FILES_GROUP “Generated”)
qt5_wrap_ui(FORM_FILES ${UI_FILES})
set(FORM_FILES_GROUP “Generated”)
endif()find_package(SofaFramework REQUIRED)
add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES} ${UI_FILES})
target_link_libraries(${PROJECT_NAME} SofaCore SofaMisc SofaMiscCollision SofaMiscEngine SofaMiscFem SofaMiscForceField SofaMiscMapping SofaMiscSolver SofaMiscTopology SofaGuiCommon)
target_link_libraries(${PROJECT_NAME} ${EXT_QT_LIBRARIES})set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS “-DSOFA_BUILD_EVALUATIONMETRIXX”)
install(TARGETS EvaluationMetrixx
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)11 January 2019 at 12:34 in reply to: [SOLVED] How to use QTableWidget class in a sofa component plugin #12773rubab123BlockedThanks alooot!!!
it realy worked @Binesh…11 January 2019 at 11:56 in reply to: [SOLVED] How to use QTableWidget class in a sofa component plugin #12771rubab123Blocked@Benish I just resolved this error. Now camke is built successfully, I have added this
target_link_libraries(${PROJECT_NAME} SofaCore SofaMisc SofaMiscCollision SofaMiscEngine SofaMiscFem SofaMiscForceField SofaMiscMapping SofaMiscSolver SofaMiscTopology SofaGuiCommon EXT_QT_LIBRARIES )
Still in my plugin component when I add QtableWidget.h It says, cannot be included. Moreover, when I build my plugin in Visual studio, at the end it gives me this:
Error LNK1181 cannot open input file ‘EXT_QT_LIBRARIES.lib’ EvaluationMetrixx C:\sofa\build\applications\plugins\EvaluationMetrixx\LINK 1
Any idea?
@Benish11 January 2019 at 11:45 in reply to: [SOLVED] How to use QTableWidget class in a sofa component plugin #12769rubab123Blocked@Binesh Thnaks alot for your concern
Here is cmake file for my EvaluationMetrixx plugin:cmake_minimum_required(VERSION 2.8.12) project(EvaluationMetrixx) set(HEADER_FILES initMyPlugin.h InjectorPositioningMetrics.h InjectorHandlingMetrics.h ObjectHandlingMetrics.h SphereHandlingMetrics.h ICSISimulationMetrics.h ) set(SOURCE_FILES initMyPlugin.cpp InjectorPositioningMetrics.cpp InjectorHandlingMetrics.cpp ObjectHandlingMetrics.cpp SphereHandlingMetrics.cpp ICSISimulationMetrics.cpp ) find_package(Qt5 COMPONENTS Core REQUIRED) if(Qt5Core_FOUND) message("Simedix: Using Qt5") set(QT5_NO_LINK_QTMAIN 1) find_package(Qt5 COMPONENTS Gui OpenGL Network Core Multimedia REQUIRED) set(EXT_QT_INCLUDES ${Qt5Core_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS} ${Qt5Multimedia_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5OpenGL_INCLUDE_DIRS}) #target_include_directories(${EXT_QT_INCLUDES}) set(EXT_QT_LIBRARIES ${Qt5Core_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Multimedia_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5OpenGL_LIBRARIES}) qt5_wrap_cpp(MOC_FILES ${MOC_HEADER_FILES}) set(MOC_FILES_GROUP "Generated") qt5_wrap_ui(FORM_FILES ${UI_FILES}) set(FORM_FILES_GROUP "Generated") endif() target_link_libraries(${PROJECT_NAME} ${EXT_QT_LIBRARIES}) find_package(SofaFramework REQUIRED) add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES}) target_link_libraries(${PROJECT_NAME} SofaCore SofaMisc SofaMiscCollision SofaMiscEngine SofaMiscFem SofaMiscForceField SofaMiscMapping SofaMiscSolver SofaMiscTopology SofaGuiCommon ) set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-DSOFA_BUILD_EVALUATIONMETRIXX") install(TARGETS EvaluationMetrixx RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
11 January 2019 at 11:29 in reply to: [SOLVED] How to use QTableWidget class in a sofa component plugin #12766rubab123Blocked@Behnam @Binesh I got this error when I added code in cImg plugin
CMake Error at applications/plugins/CImgPlugin/CMakeLists.txt:47 (target_link_libraries):
Cannot specify link libraries for target “CImgPlugin” which is not built by
this project.11 January 2019 at 08:15 in reply to: [SOLVED] How to use QTableWidget class in a sofa component plugin #12761rubab123BlockedThank you alot @Hugo and @Binesh!
I have added this in my plugin cmake file. But still I am not able to include Qtablewidget.h in my component.rubab123Blocked@Hugo I am working on a cell injection system. Like in ICSI a cell is injected with sper/drug or any substance it gets deformed. I am modeling cell in sofa.
Previously I was working well on v17.06 the my windows got corrupted. Now reinstalling same version isnt providing me with modeler.
How can i model my components and add different forces in that without modeler?
Can you please guide me in any way i can access modeler because i m stuck since 2weeks 🙁No I dont get any compilation error, everything is good now. But problem occurs when i launch modeler.exe and click on run sofa I get sofa::segmentation fault, sofa/src/share/tutorials not found if i try to run any tutorial also dont get any simulation of snake 🙁 which shows the successful build of sofa 🙁
rubab123Blocked@Hugo Ok thanks!
I am working on a medical project. For this I want to work on SOFA due to its deformation and other properties. Now I have followed each and ever instruction mentioned on the website. After building it in visual studio 2015 I open the modeler.exe and run it, modeler shows only a black screen and when I run the tutorials, it gives me this:From SOFA>> Err Unrecognised option ‘-t’
SOFA exited safely
And nothing is displayed on modeler screen. If modeler is deprecated how should i work now?
I hope I am clear ?
@Guillaume ?rubab123BlockedNow CMAKE produces this error while configuring:
CGAL libraries not found Could not find a package configuration file provided by “CGAL” with any of
the following names:CGALConfig.cmake
cgal-config.cmakeAdd the installation prefix of “CGAL” to CMAKE_PREFIX_PATH or set
“CGAL_DIR” to a directory containing one of the above files. If “CGAL”
provides a separate development package or SDK, be sure it has been
installed.What is this error and in building on windows nothing is mentioned about it. How to resolve this error kindly help
rubab123Blockedok thanks alot, I try again. @Guillaume
rubab123BlockedHi, After compilation when i run runsofa.exe file it gives me errors
SofaSimulationTree. dll , SofaHelper.dll , SofaBaseCollision is missing from your computer.
I am not able to understand this.
Kindly help merubab123BlockedThank you for replying. Then again in v18.06 folder ill clone again sofa?
Actually I compile it and after everything run sofa.exe isnt generating..i guess this is the issue with directories and cloning.First step is
1. Cloning into sofa v18
2. Arrange directories sofa then inside sofa two folders src and build
4
3. In build folder create master and v17 folder.. in v17 should i again clone this time into v17.12???? This is realy confusing on website two clonings are mentioned.5. Cmake master to build and src for source code
But step 4 is very confusing if you please give me more insight on it.
rubab123BlockedThere is no error, but i am not receiving the desired output. My work is to imitate a game type exercise where and when i am hitting the basket with the sphere, the basket should move to the next place. But in my exercise, the basket doesn’t move to the new place when it is hit with a sphere. I have written a component with plugin, in which i override collisionresponse function, where accessing basket node, iam changing its position, on visual studio it shows no error.
plugin is successfully embeded but not results what i am expecting. -
AuthorPosts