Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force dimension doesn't work on sofa #3497

Open
Iwillsd opened this issue Nov 21, 2022 · 8 comments
Open

force dimension doesn't work on sofa #3497

Iwillsd opened this issue Nov 21, 2022 · 8 comments
Labels
issue: bug (minor) Bug affecting only some users or with no major impact on the framework

Comments

@Iwillsd
Copy link

Iwillsd commented Nov 21, 2022

Hello, After following the tutorial compilation successfully, when I run ./runSofa, I get an error:
[ERROR] [PluginManager] Plugin loading failed (/home/dell/raid/hx/sigma7_hx/sofa2012/build/lib/libForceDimensions.so): libdhd.so.3: cannot open shared object file: No such file or directory.
When I modify the force dimension lib file libdhd.3.14.0 to libdhd.so.3, it runs ./runSofa.
I tried to add this plugin to SOFAv20.12, I tried force dimension omega.6 and sigma.7 respectively, but when starting the scene, the device only moved slightly at the beginning of the animation, no matter how I manipulated it afterwards , cannot use omega.6/sigma.7 devices.

@Iwillsd Iwillsd added the issue: bug (minor) Bug affecting only some users or with no major impact on the framework label Nov 21, 2022
@Iwillsd
Copy link
Author

Iwillsd commented Nov 21, 2022

@hugtalbot

@Iwillsd
Copy link
Author

Iwillsd commented Nov 21, 2022

@polyakovkrylo

@polyakovkrylo
Copy link

Hi @Iwillsd ,

I am sorry to hear the plugin does not work for you. Could you share your scene or try the example scene in the latest commit on the master branch? You can also use the version of the plugin from the master branch, it uses the static version of the library, so, in principle, there should not be problems with linking.

Best regards,
Vlad

@Iwillsd
Copy link
Author

Iwillsd commented Nov 22, 2022

Hi @polyakovkrylo,

When I call the plugin of the SDK/lib/release/lin-x86_64-gcc/libdhd.a version to compile, I encounter an undefined reference issue.

lib/libSofa.Type.so.20.12.99  lib/libSofa.Compat.so.20.12.99  lib/libSofa.Config.so.20.12.99  -Wl,-rpath-link,/home/dell/raid/hx/sigma7_hx/sofa2012/build/lib && :
/home/dell/raid/hx/sigma7_hx/sdk-3.14.0/lib/release/lin-x86_64-gcc/libdhd.a(dhdComUSB-libusb.o):in function‘dhdUSBGetDeviceCount(int, int)’:
dhdComUSB-libusb.cpp:(.text+0x9d):undefined reference to ‘libusb_init’
dhdComUSB-libusb.cpp:(.text+0xba):undefined reference to ‘libusb_get_device_list’
dhdComUSB-libusb.cpp:(.text+0xed):undefined reference to ‘libusb_get_device_descriptor’
dhdComUSB-libusb.cpp:(.text+0x120):undefined reference to ‘libusb_free_device_list’
dhdComUSB-libusb.cpp:(.text+0x141):undefined reference to ‘libusb_exit’
/home/dell/raid/hx/sigma7_hx/sdk-3.14.0/lib/release/lin-x86_64-gcc/libdhd.a(dhdComUSB-libusb.o):in function‘dhdUSBGetDeviceCountList(int*, int*, int*, int)’:
dhdComUSB-libusb.cpp:(.text+0x215):undefined reference to ‘libusb_init’
dhdComUSB-libusb.cpp:(.text+0x24e):undefined reference to ‘libusb_get_device_list’
dhdComUSB-libusb.cpp:(.text+0x297):undefined reference to ‘libusb_get_device_descriptor’
dhdComUSB-libusb.cpp:(.text+0x2eb):undefined reference to ‘libusb_free_device_list’
dhdComUSB-libusb.cpp:(.text+0x30c):undefined reference to ‘libusb_exit’

So I switched to using the dynamic linking SDK/lib/release/lin-x86_64-gcc/libdhd.so.3.14.0 for compilation, which compiled successfully, but the import of the plugin failed when running the scene example in the force dimension plugin.


Gtk-Message: 14:09:35.149: GtkDialog mapped without a transient parent. This is discouraged.
[ERROR]   [PluginManager] Plugin loading failed (/home/dell/raid/hx/sigma7_hx/sofa2012/build/lib/libForceDimensions.so): libdhd.so.3: cannot open shared object file: No such file or directory.
[ERROR]   [RequiredPlugin(ForceDimensions)] Plugin loading failed (/home/dell/raid/hx/sigma7_hx/sofa2012/build/lib/libForceDimensions.so): libdhd.so.3: cannot open shared object file: No such file or directory.
  
Failed to load: ["ForceDimensions"]
[ERROR]   [InfoComponent(Not created (OmegaDriver))] Object type OmegaDriver<> was not created  
The object is not in the factory.  

[ERROR]   [SceneLoaderXML] Node initialization failed. 

[INFO]    [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckDuplicatedName, SceneCheckMissingRequiredPlugin, SceneCheckUsingAlias]
[ERROR] [PluginManager] Plugin loading failed (/home/dell/raid/hx/sigma7_hx/sofa2012/build/lib/libForceDimensions.so): libdhd.so.3: cannot open shared object file: No such file or directory.
[ERROR] [RequiredPlugin(ForceDimensions] Plugin loading failed (/home/dell/raid/hx/sigma7_hx/sofa2012/build/lib/libForceDimensions.so): libdhd.so.3: cannot open shared object file: No such file or directory.

Failed to load: ["ForceDimensions"]
[WARNING] [SceneCheckMissingRequiredPlugin] This scene is using component defined in plugins but is not importing the required plugins.  

When I modify the force dimension lib file libdhd.3.14.0 to libdhd.so.3, it runs. However, when running the scene, the device only recovers to a certain position on its own and then does not respond. So I want to know if the effect of this plugin is only initializing the position or can be manipulated by humans, but I have not implemented this function yet.

I would be very grateful if you could help me!

Thanks so much!

@hugtalbot
Copy link
Contributor

hugtalbot commented Nov 24, 2022

instead of renaming the lib have you tried to create a symbolic link instead @Iwillsd ?

@polyakovkrylo I let you react if you think about anything more here 😉

@polyakovkrylo
Copy link

Hi @Iwillsd! Sorry for the late response. By any chance, are there any errors when you create the OmegaDriver object? Does ForceDimension SDK examples work for you?

@hxxxxxian
Copy link

Hi, @hugtalbot, I'am @Iwillsd , sorry for changing my account. Thank you for your advice, but I have tried it and it still doesn't work.

@hxxxxxian
Copy link

Hi, @polyakovkrylo! Thank you for your reply. When I run the scene with lindhd.so.3, there were no errors, but there was a warning
`Gtk-Message: 16:20:05.799: GtkDialog mapped without a transient parent. This is discouraged.
[INFO] [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckDuplicatedName, SceneCheckMissingRequiredPlugin, SceneCheckUsingAlias]
[WARNING] [SceneCheckUsingAlias] This scene is using hard coded aliases. Aliases can be very confusing, use with caution.

  • DefaultContactManager: 1 created with alias "CollisionResponse"
  • DefaultPipeline: 1 created with alias "CollisionPipeline"
  • EulerImplicitSolver: 1 created with alias "EulerImplicit"
    [INFO] [SceneCheckerVisitor] Finished validating node "root".
    `

I was able to use the ForceDimension SDK examples as normal, and when I run the scene, the device was already connected but couldn't do anything, which confused me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug (minor) Bug affecting only some users or with no major impact on the framework
Projects
None yet
Development

No branches or pull requests

4 participants