Finger wouldn't deform in the SoftRobots/CableGripper Tutorial #134
-
Hi Sofa community, I just got my hands on Sofa these few days and still in the process of going through tutorials. The "FirstSteps" tutorial works fine and is really self-explanatory, first two steps of "CableGripper" works great too. However, when it comes to "Step 3: Actuating the finger with a cable", the finger just wouldn't deform. I'm wondering if anyone can give any suggestions on this. The details are as follows: VersionI'm using the pre-compiled binaries SOFA 19.06_with_plugins. I actually started with v21.06.03, but had problems with loading plugins and it seems that some of the tutorial materials are not done with transferring to Python3 judging from the difference between *.pyscn and *py3scn. So I figured it might be better to shift to the latest frozen Python2 version. OS & ENVOS: Tested on both Ubuntu 20.04.4 LTS and Debian Bookworm (Testing). Terminal outputHere's the terminal output when I launch Sofa with a tutorial scene:
ProblemThe UI can start without a problem, showing the blue-ish mesh of the finger with the cable attached. Judging from all the INFOs it looks like that all plugins are correctly loaded. But the finger does not bend/deform when pressing +/-. Debug trialPluginMy best guess is the problem comes from this line:
Keyboard inputKeyboard input can be confirmed to be captured by the program by adding
under onKeyPressed function in step3.pyscn with the following output:
However, no sign of deformation of the finger appeared. My question isHow can I make the finger bend as described in the tutorial doc and video? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, Indeed the cable doesn't work in the step3. This is because the constraint solver is missing, so the cable constraint is not being solved. Try to add this on top of the scene: rootnode.createObject('FreeMotionAnimationLoop')
rootnode.createObject('GenericConstraintSolver', tolerance=1e-5, maxIterations=100) Thanks for reporting this! I've just updated the source code. |
Beta Was this translation helpful? Give feedback.
Hi,
Indeed the cable doesn't work in the step3. This is because the constraint solver is missing, so the cable constraint is not being solved. Try to add this on top of the scene:
Thanks for reporting this! I've just updated the source code.