I’m trying to make SOFA working with haptic device thanks to H3D and HAPI (a demo already exists here : [url=http://www.h3dapi.org/modules/PDdownloads/singlefile.php?cid=24&lid=164]Physics-Based Medical Simulation with Haptic Rendering using SOFA and H3D[/url])
I built SOFA with the HAPI plugin as explained here [url=http://wiki.sofa-framework.org/wiki/Using_SofaHAPI]Using SofaHAPI[/url] without any problems.
But when I launch in the modeler a very simple file loading the HAPI library and initializing an node, SOFA returns me the following error :
> LoadLibrary(D:/Applications/Sofa/mySofaBuild_HAPI2/bin/SofaHAPI_1_0.dll Failed. ErrorCode 126
> Plugin D:/Applications/Sofa/mySofaBuild_HAPI2/bin/SofaHAPI_1_0.dll method initExternalModule() NOT FOUND
> WARNING[RigidLayer(GNode)]: Object type “HAPIHapticsDevice” creation Failed
> LOAD ERROR: Node initialization failed.
I have now successfully test both examples that are included in sofa/applications/plugins/SofaHAPI/examples. The first one still required an additional
[code][/code] line. And after loading the examples don’t forget to toggle the “Animate” button in the SofaGUI, otherwise the proxy/device representation won’t move 😉
Did you also ensure to have the dlls from HAPI in your PATH when you launch runSofa? If they are not in the search path, I get the same error code when trying to load the plugin.