-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't make fakenect working with python wrappers #509
Comments
The method |
I dig deeper and found that my first analysis was Wrong. Indeed, a patch has already been made adding the header lib_registration.h to the c_sync wrappers which is the synchronous bridge between python wrappers and the libfreenect (which by design is asynchronous). I finally expected a mistake in the libraries linking configuration. Two tests that shows that having the same library name between the fakenect one and the usual one is (now?), a mistake : ± |debian U:2 ?:1 ✗| → export LD_PRELOAD=
± |debian U:2 ?:1 ✗| → ldd freenect.so
linux-vdso.so.1 (0x00007ffda99b8000)
libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007f49e531f000)
libfreenect.so.0.5 => /usr/local/lib/libfreenect.so.0.5 (0x00007f49e5110000)
libfreenect_sync.so.0.5 => /usr/local/lib/libfreenect_sync.so.0.5 (0x00007f49e4f0c000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f49e4cef000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f49e4950000)
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f49e492d000)
/lib64/ld-linux-x86-64.so.2 (0x000055ea25885000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f49e4725000) But of course, without the LD_PRELOAD, it expects the connected device... ± |debian U:2 ?:1 ✗| → export LD_PRELOAD="$LIBFREENECT_SRC_PATH/libfreenect/build/lib/fakenect/libfreenect.so"
± |debian U:2 ?:1 ✗| → ldd freenect.so
linux-vdso.so.1 (0x00007fff5edbd000)
LIBFREENECT_SRC_PATH/libfreenect/build/lib/fakenect/libfreenect.so (0x00007f5019c80000)
libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007f5019a37000)
libfreenect_sync.so.0.5 => /usr/local/lib/libfreenect_sync.so.0.5 (0x00007f5019833000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5019616000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5019277000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5018f71000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5018d6d000)
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f5018d4c000)
/lib64/ld-linux-x86-64.so.2 (0x00005606cedcd000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f5018b44000) As shown, the Altering the generated fakenect lib from libfreenect.so to libfreenect_fake.so does the job.
and us the libfreenect_fake.so as the preloaded library with LD_PRELOAD. I will create a patch tomorrow |
This issue is corrected by the Pull request : #511 |
Hi,
Here is the output I get while trying to launch the python demo_cv_aysnc.py with fakenect. I specified the LD_PRELOAD and FAKENECT_PATH env var :
I investigated a little bit since this wiki page presents a sample with this python demo, it should be my mistake ...
So I dig into the freenect import build from C libs with cython : the libfreenect_sync.h (and so on libfreenect_sync.c) declares a
freenect_sync_camera_to_world
and its implementation makes a call to freenect_camera_to_world. But fakenect.c which should fake the call to the real kinect I/O doesn't implements this method but moreover, the libfreenect.h doesn't declares this signature...Why this method isn't overrided or just cloned under the fakenect.c source code?
I will try a fork but It should be nice to have your return BTW.
Regards,
Guillaume
The text was updated successfully, but these errors were encountered: