Skip to content

Commit

Permalink
Merge pull request #2150 from agrohn/openni2_viewer_fix
Browse files Browse the repository at this point in the history
fixed issue #1348 by adding device sensor check for IR and depth modesetting
  • Loading branch information
SergioRAgostinho authored Dec 15, 2017
2 parents c1e395b + 59473bc commit ae4f57f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions io/src/openni2/openni2_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,14 @@ pcl::io::openni2::OpenNI2Device::OpenNI2Device (const std::string& device_URI) :
{
setColorVideoMode (getDefaultColorMode ());
}
setDepthVideoMode (getDefaultDepthMode ());
setIRVideoMode (getDefaultIRMode ());
if (openni_device_->hasSensor (openni::SENSOR_DEPTH))
{
setDepthVideoMode (getDefaultDepthMode ());
}
if (openni_device_->hasSensor (openni::SENSOR_IR))
{
setIRVideoMode (getDefaultIRMode ());
}
}

if (openni_device_->isFile ())
Expand Down

0 comments on commit ae4f57f

Please sign in to comment.