mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
Added *.oni reading support with openni-pcl driver (just set device_id the path of the oni file)
This commit is contained in:
@@ -38,6 +38,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <rtabmap/utilite/UMath.h>
|
#include <rtabmap/utilite/UMath.h>
|
||||||
|
|
||||||
#include <pcl/io/openni_grabber.h>
|
#include <pcl/io/openni_grabber.h>
|
||||||
|
#include <pcl/io/oni_grabber.h>
|
||||||
|
|
||||||
#ifdef WITH_FREENECT
|
#ifdef WITH_FREENECT
|
||||||
#include <libfreenect.h>
|
#include <libfreenect.h>
|
||||||
@@ -202,8 +203,15 @@ bool CameraOpenni::init(const std::string & calibrationFolder)
|
|||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
if(UFile::getExtension(deviceId_).compare("oni") == 0)
|
||||||
|
{
|
||||||
|
interface_ = new pcl::ONIGrabber(deviceId_, false, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
interface_ = new pcl::OpenNIGrabber(deviceId_);
|
interface_ = new pcl::OpenNIGrabber(deviceId_);
|
||||||
|
}
|
||||||
|
|
||||||
boost::function<void (
|
boost::function<void (
|
||||||
const boost::shared_ptr<openni_wrapper::Image>&,
|
const boost::shared_ptr<openni_wrapper::Image>&,
|
||||||
@@ -228,7 +236,7 @@ bool CameraOpenni::init(const std::string & calibrationFolder)
|
|||||||
|
|
||||||
bool CameraOpenni::isCalibrated() const
|
bool CameraOpenni::isCalibrated() const
|
||||||
{
|
{
|
||||||
return depthConstant_ > 0.0f;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CameraOpenni::getSerial() const
|
std::string CameraOpenni::getSerial() const
|
||||||
|
|||||||
Reference in New Issue
Block a user