Skip to content
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

Exposing IR emitter properties through ROS? #29

Open
mklingen opened this issue Apr 7, 2015 · 2 comments
Open

Exposing IR emitter properties through ROS? #29

mklingen opened this issue Apr 7, 2015 · 2 comments

Comments

@mklingen
Copy link

mklingen commented Apr 7, 2015

I wonder if it might be possible to expose some of the openni2 emitter properties through ROS in some way? In particular, it would be nice to be able to turn the emitter on and off using a service call which wraps

Device.setProperty(XN_MODULE_PROPERTY_EMITTER_STATE,(XnUInt64)(TRUE/FALSE));

I was just wondering if it made much sense considering most of the other properties of this kind are set using the ini file -- but apparently since openni2, they have been made directly accessible.

@mikeferguson
Copy link
Member

Probably possible, pull requests welcome.

@NikolasE
Copy link

NikolasE commented Nov 4, 2017

I tried to implement the feature, but I get an exception if I try to set the state:

void OpenNI2Device::setEmitterState(bool enable) throw (OpenNI2Exception)
{
  const openni::Status rc = openni_device_->setProperty(XN_MODULE_PROPERTY_EMITTER_STATE, enable);
  if (rc != openni::STATUS_OK)
    THROW_OPENNI_EXCEPTION("Couldn't set emitter state to %i: \n%s\n", enable, openni::OpenNI::getExtendedError());
}
Failed to set property 1080e007: Device Protocol: Unsupported opcode!
Device.setProperty(1080e007) failed

Any ideas?

// device_->startDepthStream() / stopDepthStream toggle the emitter,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants