cgre-aachen / open_AR_Sandbox

open-AR-Sandbox is a project to enable haptic interaction with geoscientific content in AR-Sandboxes.
GNU Lesser General Public License v3.0
66 stars 40 forks source link

problem with kinect_v1 #45

Closed CyrillUNICA closed 2 years ago

CyrillUNICA commented 3 years ago

Hi, I'm very interested in your project connecting GemPy with an AR Sandbox. I'm running open_AR_Sandbox on Linux Mint with an kinect_v1 sensor. Via jupyter notebook I calibrated the projector and sensor. I got some problems with the kinect_v1 sensor and I would like to ask if you have some fixing advices: 1) Sensor image is flashlightning 2) Sensor image is mirror inverted (central inversion) 3) Kernel on jupyter notebook is crashing periodically despite having just one active Kernel Thanks for help!

flohorovicic commented 3 years ago

Hi @CyrillUNICA,

Please excuse the late reply - do the problems still persist?

CyrillUNICA commented 3 years ago

Hi @flohorovicic , thank you for replying, I resolved the flashlightning and the Kernel crashing, but I have still issues with the sensor image, i'ts mirror inverted (central inversion). Probably it's quiet easy to flip the image but i don't know where I have to change the kinect parameters to do so. Some advice??

SimonVirgo commented 2 years ago

Hi @CyrillUNICA, Try commenting out line 40 and line 49 in sandbox/sensor/kinect_v1.py

unfortunately I do not have a kinect 1 for testing but if you can confirm that this works I will fix this and pull it into main.

Best regards Simon

CyrillUNICA commented 2 years ago

Hi @SimonVirgo, thank you in the meantime I could find a kinect v2 which appears to be more stable. Nevertheless I got still the same issue, the sensor-image is flipped. Ho may I flip the image? Thanks for your help!! Cyrill

SimonVirgo commented 2 years ago

hello @CyrillUNICA, The flipped sensor image is indeed strange. Can you confirm that it is a mirrored image and not rotated by 180 degree? I guess the best way to fix this is for us to extent the calibration with flags for flipping and /or rotation. I cannot promise that we will manage to do do this within the next days, but I will put it on the list.

CyrillUNICA commented 2 years ago

It's actually rotated by 180 degrees. I thought that means flipped... Here an example of what I see: flip-rotate

SimonVirgo commented 2 years ago

ah, I see! Any chance you can mount the kinect the other way around in you setup? more precisely with the bottom of the kinect facing the backside of the sandbox? I must admit we did not think of this case. It makes a lot of sense to have different types of hardware setup reflected in the code, so we will implement a flag for this soon. However depending on if we want to do this in the sensor class or in the calibration this might take a while.

CyrillUNICA commented 2 years ago

You were right, it was as simpole as that. Thanks a lot!