Forum Replies Created
-
AuthorPosts
-
chiarasapoBlocked
Good evening,
I know this post is a little old but I still did not resolve the issue. My main problem is the fact that the interaction between the Geomagic Touch device and the object in the scene (the skin) is unnatural: the haptic feedback is a strong vibration and the skin itself does not deform. Does anyone working with the Geomagic Plugin have any suggestions?
Thank you very much in advance,
ChiarachiarasapoBlockedSure!
chiarasapoBlockedI did not see your reply before @syoy, thank you very much!! 🙂 In the end, I had solved the problem in the same way by just setting in the ContactListener.cpp functions main loops:
int count = 0;
for (const auto& c: m_ContactsVectorBuffer[0][0]){
if (++count > numberOfContacts) {
printf(“Error!\n”);
break;
}
…And the error I was obtaining before was:
########## SIG 11 – SIGSEGV: segfault ##########
47: sofa::helper::BackTrace::dump – 0x7ff9f86b67d046: sofa::helper::BackTrace::sig – 0x7ff9f86b695045: seh_filter_exe – 0x7ffa60a10cc044: seh_filter_exe – 0x7ffa60a10cc043: _C_specific_handler – 0x7ffa5c52eb2042: _chkstk – 0x7ffa6331206041: RtlRaiseException – 0x7ffa632c102040: KiUserExceptionDispatcher – 0x7ffa63310c8039: sofa::core::collision::ContactListener::getContactElements – 0x7ff9f85f730038: sofa::core::collision::ContactListener::getContactElements – 0x7ff9f85f730037: sofa::core::collision::ContactListener::getContactElements – 0x7ff9f85f730036: PyMethodDef_RawFastCallKeywords – 0x7ff9f472dd2035: PyCFunction_FastCallKeywords – 0x7ff9f475afc034: PyFunction_FastCallDict – 0x7ff9f472d54033: PyEval_EvalFrameDefault – 0x7ff9f473442032: PyFunction_FastCallDict – 0x7ff9f472d54031: PyUnicode_Compare – 0x7ff9f474d05030: PyObject_Call – 0x7ff9f471be4029: PyObject_Call – 0x7ff9f471be4028: PyObject_Call – 0x7ff9f471be4027: sofa::simulation::PropagateEventVisitor::processNodeTopDown – 0x7ff9f8827d0026: sofa::simulation::graph::DAGNode::executeVisitorTopDown – 0x7ffa44d17cd025: sofa::simulation::graph::DAGNode::doExecuteVisitor – 0x7ffa44d1748024: sofa::component::animationloop::FreeMotionAnimationLoop::step – 0x7ff9f203da1023: sofa::simulation::Simulation::animate – 0x7ff9f882aa2022: sofa::gui::qt::RealGUI::step – 0x7ff9f781b55021: QObject::qt_static_metacall – 0x7ff9f5a4094020: QTimer::timerEvent – 0x7ff9f5a509c019: QObject::event – 0x7ff9f5a4945018: QApplicationPrivate::notify_helper – 0x7ff9f64f488017: QApplication::notify – 0x7ff9f64f216016: QCoreApplication::notifyInternal2 – 0x7ff9f5a22a1015: QEventDispatcherWin32::event – 0x7ff9f5a6b6b014: QApplicationPrivate::notify_helper – 0x7ff9f64f488013: QApplication::notify – 0x7ff9f64f216012: QCoreApplication::notifyInternal2 – 0x7ff9f5a22a1011: QCoreApplicationPrivate::sendPostedEvents – 0x7ff9f5a2463010: qt_plugin_query_metadata – 0x7ff9f1300e409: QEventDispatcherWin32::processEvents – 0x7ff9f5a6b9f08: qt_plugin_query_metadata – 0x7ff9f1300e407: QEventLoop::exec – 0x7ff9f5a1ed706: QCoreApplication::exec – 0x7ff9f5a219405: sofa::gui::qt::RealGUI::mainLoop – 0x7ff9f7817cc04: sofa::gui::GUIManager::MainLoop – 0x7ffa28902d503: sofa::gui::GUIManager::MainLoop – 0x7ffa28902d502: sofa::gui::GUIManager::MainLoop – 0x7ffa28902d501: BaseThreadInitThunk – 0x7ffa631570200: RtlUserThreadStart – 0x7ffa632c2630I hope it is useful, thank you both for your kind help!
chiarasapoBlockedHi @syoy, I have the same problem, did you happen to find a solution?
ChiarachiarasapoBlockedThank you very much, it works perfectly!
chiarasapoBlockedDoes anyone have a suggestion?
chiarasapoBlockedI decided to open a new topic about this last comment at https://www.sofa-framework.org/community/forum/topic/springs-not-working/ since my main question here was already answered. Thank you again!
ChiarachiarasapoBlockedHowever I was also wondering: I attached such springs between the objects that I wanted to move together (needle and skin as in the picture at https://github.com/ChiaraSapo/Haptic-surgery-simulation/blob/main/Images/springs.png) but, when I move the needle, the springs just stretch without deforming the skin. Did I do something wrong or is it the normal behavior @Hugo?
I did it from a sofa controller by setting
self.spring_force_field = rootNode.addObject("StiffSpringForceField", name="FF", object1 = models.Skin.MO, object2=models.SutureNeedle.MO)
And then by passing the skin indices I wanted to link to the needle:
springs = [Sofa.SofaDeformable.LinearSpring(index1=i, index2=0, springStiffness=50, dampingFactor=5, restLength=1) for i in indicesBox] self.spring_force_field.addSprings(springs)
chiarasapoBlockedHi @Hugo, I’m sorry for my late reply but I did not have access to the Geomagic these weeks. Now I have uploaded some brief videos of the interaction Skin-Geomagic on the same folder at https://drive.google.com/drive/folders/14gJR-nMY60QFbq7ZbGHYUnzdXlApDtom?usp=sharing . As you can see I am able to interact with the skin via mouse but not via the Geomagic. Thank you again for your help,
Have a good day,
ChiarachiarasapoBlockedYes, I understand, I’ll do that! Thank you very much for your answer @hugo
chiarasapoBlockedHi @aryakarani, I have the same problem: I obtain an empty array when trying to retrieve the boxROI indices from the onBeginAnimationStep function. Did you find a solution? If so, I’d be glad to hear it! Thank you in advance,
ChiarachiarasapoBlockedThank you very much! I will mark this as resolved.
Have a nice day,
ChiarachiarasapoBlockedIt worked perfectly, thanks a lot! Now it checks for collisions but it only does it once when I load the project on sofa. Do you know how I can activate it only during animation time?
chiarasapoBlockedHi First of all thank you for your answer! But unfortunately I uncommented it and recompiled but I get the same error
chiarasapoBlockedHi! Thank you for your answer! Unfortunately it doesn’t seem to work for me
chiarasapoBlockedHi, thank you! Yes, in the end I compiled from sources and I’m working with it now!
chiarasapoBlockedI have the exact same problem, should I go back to the previous version too? Or do you think that there is another solution? Thanks in advance!
-
AuthorPosts