lagadic / visp_unity

Developement of an interface and demo between ViSP and Unity engine
GNU General Public License v3.0
23 stars 15 forks source link

Error after building dll #19

Closed Zumbalamambo closed 1 year ago

Zumbalamambo commented 4 years ago

I have built the dll file exactly as mentioned in the wiki.

However when I'm trying to run the code, I'm getting Plugins: Failed to load 'Assets/ViSPUnity.dll' because one or more of its dependencies could not be loaded. error.

Do you have any ideas as in how we could fix it?

USER1999-svg commented 4 years ago

@Zumbalamambo did you find solution to this problem , i have the same problem ..

fspindle commented 4 years ago

See my post in #14. I suspect that your PATH environment variable doesn't contain the location of the 3rd parties that are used in ViSP build

USER1999-svg commented 4 years ago

thank's a lot . I solve it by adding .dll needed like Coin4.dll missed . @fspindle Itry now to use this exemple to do a tracking of object without apriltag using generic tutorial ; my code. cpp is tutorial-mb-generic-tracker-live.cpp with Wrl model .. Im bigger with C# ,, is there any tutorial or C#source code can help me to use this exemple with unity ?

fspindle commented 4 years ago

There is no example with vrml in Unity. From the changes introduced in PR #21 that will be merged soon in the master branch you should be able to adapt the code to what is inside tutorial-mb-generic-tracker-live.cpp

USER1999-svg commented 4 years ago

@fspindle the problem is that I can't integrate the intialisation of object detection with file " .init" and load Cao model in game screen ..

fspindle commented 4 years ago

There is the Script_mbt.cs that shows how to load the cao file for the tracker. It creates the cao file calling Visp_MbGenericTracker_CreateCaoFile(). In your case you can start copying your specific cao file in unityProject folder. Then just modify Visp_MbGenericTracker_Init() replacing cube.cao with your file name.

Concerning the .init file you should get inspiration from vpMbTracker::initClick()

You should than also modify Visp_MbGenericTracker_Process() to pass the pose for the initialization.

USER1999-svg commented 4 years ago

--i'm begginer with unity and C# programming , how i can create a function that allows "number of points" user click so that the user can click in the image and get the corresponding 2D coordinates af the points? -- i don(t understand what you mean by call a C++ function passing the 2D coordinates of the points that computes the pose using 2D (from user click) - 3D (from .init file) point correspondances. This functions returns the pose.