MathGaron / pyvicon

Python 3 wrapper over Vicon DataStream SDK (1.7.0 +)
GNU General Public License v3.0
13 stars 10 forks source link

pyvicon on Windows? #1

Open cnzero opened 6 years ago

cnzero commented 6 years ago

Thanks for your extraordinary work on vicon SDK with python3.

Do you have try your pyvicon in Windows?

I tried to do that. You guessed it, it didn't work. Python interpreter told it could not open several .h and .lib files. I found the same-name files from Nexus installation directory. But I did not work.

So, would you try to change your pyvicon package to work on Windows? And add necessary include .h/.lib files? Thank you very much.

MathGaron commented 6 years ago

Hello cnzero,

I never tried pyvicon on Windows, that said, I do not see why it should not compile. Sadly, I have only ~2 weeks left to access the system and I will be gone for at least 3 months, so I may not have time to test it until then. I would like to help you if you want to try your hand on it though.

First, what are the libraries and headers that are not found? I guess it is the DataStream SDK? If it is the case, did you install them?

Also, when you do python3 setup.py install, is there any compilation errors?

Thank you!

cnzero commented 6 years ago

Thank you very much. Yes, compilation errors are about DataStream SDK, which I have downloaded from vicon.com. But, where should these files be copied? Is it path sensitive? After several tries, when some libraries were copied to the \pyvicon\, pyvicon was installed successfully.

And, conda list showed the installed pyvicon 0.1 <pip>. In conda python environment, import pyvicon was O.K.

But, how to instantiate pyvicon? I tried:

from pyvicon.pyvicon import PyVicon 
test = PyVicon()

as codes in the last several lines of pyvicon.py.

But, there is an import error:

import pyvicon_module
ImportError, DLL load failed, can not find such a module

Then I tried to execute pyvicon.py in this repo

python pyvicon.py

The same ImportError happened.

So I have some advice:

MathGaron commented 6 years ago

Great that it compiles! You are right, I will add more explicit information in the ReadMe.

For the cpp and header, I will still let the user download the source file from Vicon. This way I am sure I will not infringe any of their licenses, and will also let the user download any version depending on their OS or updates. Could you tell me which file were copied in pyvicon to make it compile under windows? (Thanks!)

Now for the dlls, once again my ReadMe is not quite clear, and it seems a bit different for Windows, basically, you need to put the downloaded DLLs in windows PATH. This include the boost dlls. For windows there is a msi installer, did you try it? Else you can compile them yourself as they provide the source (+ third party. ex. boost). If the problem is still there, that would be helpful to tell me which dll is not found (maybe with dependency walker?). Sorry my Windows knowledge are quite limited!

I saw that there is a new version of the DatastreamSDK (1.8.0) I never tested it but the code should still be compatible, I do not support the new RetimingClient though. When your setup work, tell me what version you are using and your OS, I will add this to the Doc.

Once the bug with the DLL will be fixed, you simply instantiate PyVicon and call the function following DataStreamSDK's doc, the API is kept as similar as possible, if you need any help, do not hesitate to ask for help! I will add more examples in the future.

Grace1E commented 1 year ago

Hello, Thank you very much for this work.

Has any one been successful with with Windows running the Vicon in-door tracking system with Mission Planner, for a Pixhawk Flight controller? I have tried following the instructions that are given on https://ardupilot.org/copter/docs/common-vicon-for-nongps-navigation.html At one point they lead here (pyvicon) but I have problems from this point:

running install running build running build_py running build_ext building 'pyvicon_module' extension error: Unable to find vcvarsall.bat

Please help. Thanks

steffensc commented 1 year ago

Hey @Grace1E,

for anyone looking for a (hopefully/should-be) platform independent wrapper implementation for the Vicon Datastream SDK: I created a new project cause I needed python accessibility for the Vicon Datastream SDK an my MacBook M1 which has an ARM processor. Unfortunately there were only x86 and no pre-compiled libraries of the VDS SDK suitable for ARM, so this solution here did not work for me.
I ended up creating my own module based on scikit-buid which automatically compiles the VDS SDK libs from the sources specific for each platform. 🎉

So for now you only have to run pip install pyvicon-datastream and you should be ready to use a python wrapper implementation for the Vicon Datastream SDK out of the box :)

https://pypi.org/project/pyvicon-datastream/ https://github.com/steffensc/pyvicon-datatstream-module