Home › Forum › SOFA › Building SOFA › [SOLVED] Geomagic Plugin
- This topic has 22 replies, 4 voices, and was last updated 6 years, 2 months ago by Hugo.
-
AuthorPosts
-
12 April 2017 at 16:24 #8914boland3Blocked
Hi all,
I am a biomedical engineering student with a limited programming background new to SOFA. I have spent many hours trying to install the Geomagic plugin to no avail. I have tried using documentation but I think I am just misunderstanding how to go about using CMake. Here is what I have done:
1)Installed SOFA exe file, opened it, played with the default model
2)Downloaded the sofa-master zip file from github
3)Installed CMake, boost, downloaded the dependency files
4)Created directory called sofafiles with two subdirectories (src and build)
5)unzipped sofa-master and moved contents into sofafiles/src
6)moved dependency files into src
7)opened CMake, selected src and build folders, add entry>[folder where I installed Qt]
8)tried running, got errors. first error suggests lack of a CMakeOutput.log in the CMakeFiles folderI am running Windows 8 64bit on a laptop PC and I have Microsoft Visual Studio Community 2015.
Thanks in advance.
Brian12 April 2017 at 17:42 #8916HugoKeymasterHi Boland,
Did you configure twice?
Could you provide us the complete output of the CMake error please?12 April 2017 at 18:06 #8917HugoKeymasterwelcome to the SOFA community by the way!
21 April 2017 at 05:16 #8972boland3BlockedSo I tried again from scratch and got a little bit further. This time the CMake configured and generated. The Visual Studio build failed.
About an hour or so into it, I get a window called ‘devenv.exe – Application Error’ with the text: “The exception unknown software exception (0xe0434352) occured in the application at location 0x76510f22.”
Any ideas? I checked the box for Geomagic. Am I supposed to run CMake for the plugin itself, before running CMake for SOFA? Please advise.
Thanks,
Brian21 April 2017 at 22:08 #8977HugoKeymasterHi @boland3,
Sorry for your compilation failure. This error is not related to SOFA.
See the following forum discussion:
https://answers.microsoft.com/en-us/windows/forum/windows8_1-performance/the-exception-unknown-software-exception/f1404ce4-cdbe-4758-aa19-bad55fcc099cThe CMake must only be run for SOFA. If the plugin Geomagic is activated in CMake, it will be compiled. Nothing more to do (as explained in the doc).
Cheers,
Hugo
28 April 2017 at 19:07 #9022boland3BlockedDear Hugo,
I think I have compiled it because it says ‘loaded plugin…Geomagic…dll’ when I first click on the file:
C:\Users\Brian\SofaInstall\v16.12\build\bin\Debug\runSofa_d.exeIt opens after a few minutes (slow computer). The program does not seem to recognize the haptic touch device as a mouse controller. Is there another step to activate it? Sorry for the confusion; there are many files in the ‘build’ folder and I’m just having trouble connecting the last dot.
Thanks,
Brian Boland2 May 2017 at 18:21 #9031HugoKeymasterHey @boland3,
Indeed, you have compiled the Geomagic plugin successfully. Note that you compiled SOFA in debug mode. Is this on purpose? I would advise to run in release mode, it would obviously run faster.
Moreover, you need to install your Geomagic haptic device. But this has nothing to do with SOFA. This should be described in the documentation of the plugin (README.txt).
What is your error now? is it still the one you described above ?
The exception unknown software exception (0xe0434352) occured in the application at location 0x76510f22
Because as I said, it is a Windows error regarding the message. Not directly related to SOFA.
Cheers,Hugo
10 May 2017 at 17:29 #9089boland3BlockedHi Hugo,
I had installed the haptic device back in January and the Geomagic diagnostic confirms that it is connected and working.
Then I close the Geomagic diagnostic and try to open Sofa by going to:
C:\Users\Brian\SofaInstall\v16.12\build\bin\Debug\runSofa_dI know of no other .exe file to open and run other than this debug mode file. It opens Sofa and I can use it with my computer mouse, but the device does nothing in the program. I went to the Sofa ‘Plugin Manager’ and made sure Geomagic was there.
Should I try again from scratch? I just don’t know how to get the device working in the program as the mouse.
Let me know if I can provide any more pertinent info.
Thanks,
Brian10 May 2017 at 18:23 #9090HugoKeymasterHi boland3,
Could you tell us what is the status of your cmake field “CMAKE_BUILD_TYPE” ?
It seems you’re building everything in debug, I never tested the debug mode with Geomagic.Could you try to set at the configuration CMAKE_BUILD_TYPE=Release ? and compile again.
10 May 2017 at 19:19 #9091jnbrunetModeratorHi boland3,
Did you make sure you set the good device name in your scene file? It should match the one shown in the Geomagic diagnostic tool.
Since you can see that the plugin is fully loaded in SOFA, the problem is probably elsewhere. Can you paste here the output of SOFA?
10 May 2017 at 19:20 #9092boland3BlockedI see a field in CMake called ‘CMAKE_CONFIGURATION_TYPES’ and its value was ‘Debug;Release;MinSizeRel;RelWithDebInfo’
I will try to change the field to just ‘Release’ and compile again.
Thanks,
Brian10 May 2017 at 19:41 #9093boland3BlockedI have not changed anything in a scene file. How would I change the scene file with the sample liver model so that the haptic device can be used with it?
Here is the output:
https://s17.postimg.org/4h4rc0u9r/output_sofa_01.jpg10 May 2017 at 20:21 #9094jnbrunetModeratorTry with the scene file “applications/plugins/Geomagic/scenes/Geomagic-FEMLiver.scn”.
Make sure the
deviceName
match the name of your device (as shown in the Geomagic diagnostic tool).<GeomagicDriver name="GeomagicDevice" deviceName="Default Device" scale="1" drawDeviceFrame="1" positionBase="0 0 0" orientationBase="0 0.707 0 -0.707" />
Paste here the output of SOFA with this scene (please use the “code” markup instead of a picture of your terminal).
10 May 2017 at 22:40 #9095boland3Blocked[INFO] [PluginManager] Loaded plugin: C:/Users/Brian/SofaInstall/v16.12/build/bin/Debug/Geomagic_d.dll [INFO] [TagFactory] creating new tag 2: NoPicking Loading OBJ topology : snake_body.obj [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 184 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 497 != 1 PNG image C:/Users/Brian/SofaInstall/v16.12/src/share/textures/snakeColorMap.png: 2048x2048x24 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 16 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 336 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 17 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 181 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 34 != 1 **************************************** This is the DEVELOPER EDITION of OPENHAPTICS, commercial distribution is prohibited Please contact 3D Systems to obtain a commercial license **************************************** [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 181 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 34 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 35 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 35 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 35 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 35 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 35 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 35 != 1
Sorry for formatting issue. I am relatively new at the forums. It appears that this error is a result of having a developer version of the toolkit as opposed to a commercial license. Is that why it will not operate?
Thanks,
Brian11 May 2017 at 02:31 #9096jnbrunetModeratorHey Brian,
Developer edition should not be a problem, the warning is only there to remind you that you cannot distribute your software in a commercial manner.
When you launch the Geomagic diagnostic tool, you can see the device move and correctly calibrate it?
Also, in the scene file, can you try with a completely random device name, just to make sure that the plugin is correctly outputting an error message when it cannot find a valid device.
11 May 2017 at 20:40 #9116boland3BlockedFirst I wanted to thank you for helping me out. I really appreciate your time.
So I tried with a random device name and it did give an error as it should. Here is the output:
[INFO] [PluginManager] Loaded plugin: C:/Users/Brian/SofaInstall/v16.12/build/bin/Debug/Geomagic_d.dll [INFO] [TagFactory] creating new tag 2: NoPicking Loading OBJ topology : snake_body.obj [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 184 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 497 != 1 PNG image C:/Users/Brian/SofaInstall/v16.12/src/share/textures/snakeColorMap.png: 2048x2048x24 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 16 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 336 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 17 != 1 [NewOmni] Failed to initialize the device called Default Devicenot [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 181 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 34 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 35 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 35 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 35 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 35 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 35 != 1 [WARNING] [MechanicalObject] Writing to State vector position(V_COORD) with incorrect size : 35 != 1
I’ll keep trying to find the issue.
Thanks,
Brian11 May 2017 at 20:41 #9117boland3BlockedAlso, how can I build the release version? I had no intention of using the debug version.
15 May 2017 at 17:57 #9120boland3BlockedIf anyone can think of anything, please let me know. I will try to learn more about scene files and attempt to write one.
I will also try to build in release version somehow.
Thanks everyone.
16 May 2017 at 10:11 #9122HugoKeymasterHi @boland3
To compile SOFA in Release mode, you should have a CMake configuration option : CMAKE_BUILD_TYPE=Release. A successful compilation would then result in an executable runSofa (and no runSofa_d). You need obviously to activate the Geomagic plugin (but you did it well).
As suggested by Jean-Nicolas, another point is to test the Geomagic device separately using the calibration tools of Geomagic. If you see the tool moving, everything works fine.
Then, finally run the scene applications/plugins/Geomagic/scenes/Geomagic-FEMLiver.scn. Note that:
- all warnings ([WARNING] [MechanicalObject]) come from the debug mode
- by setting the wrong device name you get the error line showed in your previous post #9116 :
[NewOmni] Failed to initialize the device called Default Devicenot
- the output of your post #9095 looks fine
Hope this helps.
Cheers,Hugo
16 May 2017 at 14:58 #9124boland3BlockedDear Hugo and all,
Good news!! With your help, I was able to compile SOFA and successfully run the demo/example Geomagic plugin scenes (liver, skull).
All who contributed deserve much praise for such a powerful program. I will be trying to write a journal paper soon and will credit SOFA as many times as I can.
Next I will try to build my own scene; I will keep you updated!
Thanks,
Brian16 May 2017 at 16:30 #9125HugoKeymasterGood! Glad you succeeded!
Do not hesitate to use this forum as much as you want, ask further questions, help others and contribute to SOFA using our GitHub repo!
Looking forward to seeing your achievements.
Good luck!Hugo
24 August 2018 at 14:54 #11720OkoshkoBlockedHello. It may be a really stupid question But I’m only a student and absolutley noob.
Is it nesesarry to use Geomagit to work with a 3d scan, or I can use just SOFA and this Artec Studio I use to get scans. I’m scanning antient skeletons to make a movement simulation. I can get either polygonal mesh or point cloud from the Studio.Thanks.
28 August 2018 at 21:20 #11740HugoKeymasterDear @okoshko,
No worries, we’re all the noob of someone else!
I am not sure to understand what you mean.
When you write about 3D scan, I guess you mean 3D scanning surface of a body part for your movement simulation. Correct?In this case, you don’t need the Geomagic plugin: this plugin is used to interface a Geomagic device (stylus-shape) for haptic force feedback.
Do you have some reference frames moving to create the movement simulation?
What are your data in addition to the polygonal mesh or point cloud?Best wishes,
Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.