iMSTK-Unity: 3D Touch connection

Hi, I am able to connect my 3D Geomagic Touch device to the scene using iMSTK-Visual Studio. Regarding a connection with the scene in iMSTK-Unity, may I ask are there any instructions somewhere? Thank you.

Hi MeKong, to enable the 3D touch device in imstk Unity there are a couple of steps required. There is a description of the process in the ImstkUnity Documentation.

You check out the Sources from the ImstkUnity Gitlab. The repository contains a Imstk as a git submodule, so it’s best to clone the repository via git clone --recurse-submodules. Configure the build from the source directory inside of ImstkUnity (ImstkSource~). Once built copy the binaries back into the asset directory, you can either then copy the whole folder into a unity project or before you clone ImstkUnity create a project and clone the git repository into this project.

Also check the imstk docs for any build issues. The BUILD_FOR_UNITY flag turns off the examples but it turns on wrapping, so you will need Swig installed. Ideally install v4.0.2.

Here is a structure that i am currently using as I am developing

C:
  Work
    ImstkBuild (Target Directory in CMake, contains )
    UnityProject
       Assets
         Plugins
           iMSTKCWrapper.dll (copied from install/bin via InstallImstk)
           iMSTKSharp.dll
           ...
         ImstkUnity (Repository)
            ImstkSource~
              Imstk (Actual Imstk sources)

I hope this helps, Harry

Dear Harry, thank you for your prompt reply and detailed instructions.

Dear Harry, I have carefully followed your instructions, but when trying to run the example Virtural Coupling in the Scenes/Devices folder I don’t know how to connect my 3D touch using the component Open Haptics Device, as shown below. Would you mind giving some further instructions? Thank you.

That looks like the binaries can’t be found, where is iMSTKCWrapper.dll and what other files are in the folder where it sits ?

Hi Harald, I was able to connect successfully. Thank you very much for your help.