Force Dimension Haptic Device Plugin #4660
Replies: 1 comment 2 replies
-
Hi ! libdhd.so.3.17.0 is a dynamic library and is a dependency of libForceDimensions, and here the problem is that your OS cannot find it. The SOFA project and all of the plugins have dependencies, which are external libraries upon which we 'link' meaning we use some of their methods or classes. These dependencies mean that you need to get access to those methods when you are trying to execute the plugin code. There exists two main ways of resolving that, either by copying the external methods and embedding them inside of the plugin (which is called static linking, with .a extension on ubuntu) or relying on the OS to provide the required library upon which we have linked when we try to launch it (this is called dynamic linking, with .so, and it is what is used in SOFA). In order to help your OS to find it, you can enrich an environment variable that is used to look for such dynamic libraries : Tell me if that works for you ! |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm encountering some trouble using the Force Dimension Haptic Device Plugin. The issue I'm facing is similar to #3497. I'll describe my problem in detail below. I'm using a VMware® Workstation 17 Pro virtual machine running Windows 10 with the Linux operating system Ubuntu 22.04. I've tried two approaches, but unfortunately neither of them has successfully compiled the plugin:
1.Using sofa v23.12 with the forcedimensions-master branch plugin and the sdk-3.17.0-linux-x86_64-gcc driver
2.Using sofa v21.12 with the forcedimensions-sofa_v21.12 branch plugin and the sdk-3.17.0-linux-x86_64-gcc driver
The problem I encountered with both approaches is the same: I cannot load my compiled plugin (named libForceDimensions.so) in the plugin manager of runsofa. When I try to load it, the software prompts me with the following error:
“[ERROR] [PluginManager] Plugin loading failed (/home/yr/work_space/sofa/build/v23.12/lib/libForceDimensions.so): libdhd.so.3: cannot open shared object file: No such file or directory”
I followed the compilation steps on this web page https://www.sofa-framework.org/community/doc/plugins/build-a-plugin-from-sources/ and this video https://m.youtube.com/watch?v=QDYy9NfLVWM to build the Force Dimension Haptic Device Plugin. I believe the problem might lie in the libdhd.a and libdhd.so.3.17.0 files within the Force Dimension driver. When I use cmake-gui to perform the configure step, I need to specify a value for a variable named "DHD". When I set the value to "/home/yr/work_space/sdk-3.11.1-linux-x86_64-gcc/sdk-3.11.1/lib/release/lin-x86_64-gcc/libdhd.a", the configure and generate steps succeed, but the make step fails with an error message(The error message is displayed in the image below).
When I set the "DHD" value to "/home/yr/work_space/sdk-3.11.1-linux-x86_64-gcc/sdk-3.11.1/lib/release/lin-x86_64-gcc/libdhd.so.3.11.1", the configure, generate, and make steps all succeed. However, when I try to load the plugin in the runsofa program, I get the following error:
“[ERROR] [PluginManager] Plugin loading failed (/home/yr/work_space/sofa/build/v23.12/lib/libForceDimensions.so): libdhd.so.3: cannot open shared object file: No such file or directory”
When I try to rename the generated libForceDimensions.so.0.1 to libdhd.so.3, I can create an Omega object in OmegaInstrumentController.scn. However, when I connect to the Omega3 device, the device does not work properly (I have verified that the device can run the demo files in the driver under Ubuntu).
Does anyone know what the cause of this problem might be?
Beta Was this translation helpful? Give feedback.
All reactions