personalrobotics / ada_meal_scenario

A set of scripts for a meal serving scenario using Ada.
1 stars 4 forks source link

OpenNI StructureIO IR image speckled #24

Open siddhss5 opened 9 years ago

siddhss5 commented 9 years ago

There's significant specking of the OpenNI StructureIO IR image. However, I don't see that at all in the IPhone app image. Could you guys please investigate? Pinging @psigen and @PyryM also.

openni-structureio iphone-structureio

psigen commented 9 years ago

@siddhss5: The speckled pattering is characteristic of the diffraction pattern used by the sensor to calculate depth.

I think this is because the iPhone app turns off the diffraction pattern entirely and turns on flat IR LED illumination when you switch modes. There is no depth information available when this happens, but that's fine in their app because your iPhone can't show both.

siddhss5 commented 9 years ago

Excellent, thanks! Does OpenNI provide hooks to do this? Ideally we'd like to be able to use the IR image for perception and at least calibration.

psigen commented 9 years ago

I don't know.

It's possible that this would be accessible directly through the OpenNI properties interface. From the docs:

General Capabilities Some devices have capabilities and settings other than FrameSync and Registration. OpenNI 2.0 provides a means to activate these with the setProperty() and getProperty() functions. The .setProperty function takes a numerical ID for the property, and a data value to set that ID to. The getProperty() function returns the current value stored at a specific ID.

This access is pretty low-level, I don't know if it would be available through the OpenNI ROS node without forking. It might be easiest to start by seeing if there is an existing OpenNI demo app that can just list all properties of a device.

siddhss5 commented 9 years ago

@mklingen please get on this ASAP.

PyryM commented 9 years ago

Openni does have a property to turn on/off the emitter, but whether the structureio people actually implemented it is another question...

// example of turning the emitter off
openni::Status rc = Device.setProperty(XN_MODULE_PROPERTY_EMITTER_STATE,(XnUInt64)FALSE);

Edit: apparently the structureio is using the primesense 1080 sensor, so if they're just using the stock driver this should work.

mklingen commented 9 years ago

I don't know what the 'emitter' is in this case. I can't find anything about whether it is the LED, the projector, or something else. There seems to be a physical LED on the side of the device, as well as something producing the pattern. In the past (for instance with kinects), we've managed to calibrate the sensor by physically covering up the pattern emitter and turning on some bright light sources. Obviously it'd be better to use the API, but I can't find anything we can directly access through ROS (we are using openni2_launch and openni2_camera) that will allow us to turn off the emitter.

mklingen commented 9 years ago

It seems possible to turn off the emitter using their console program so at the very least we might be able to run the ROS driver first, then the console program to disable the emitter, then go through calibration.

mklingen commented 9 years ago

Also, there is an ini file that contains many of the properties exposed by that interface; but the emitter on/off property seems to be missing.