I am working with TI’s TOF device.
I have problem with interfacing to the OPT841 device from Visual Studio program.
The “SimpleVoxelViewer” application inside C:\Program Files\Voxel SDK 0.6.0\bin has no problem to connect to the device.
Just the own program using Visual Studio has interfacing issue.
The command
echo %VOXEL_SDK_PATH% gives me
C:\Program Files\Voxel SDK 0.6.0
So the path setting is correct.
I used prebuilt library also has that issue. So I compiled the whole SDK using Visual Studio and Cmake and using those compiled library still have that issue.
My code is
#include "stdafx.h"
#include <CameraSystem.h>
#include <Common.h>
#include <thread>
#include "PCLViewer.h"
using namespace Voxel;
int _tmain(int argc, _TCHAR* argv[])
{
Voxel::logger.setDefaultLogLevel(Voxel::LOG_INFO);
Voxel::CameraSystem sys;
Voxel::DepthCameraPtr depthCamera;
const Voxel::Vector<Voxel::DevicePtr> &devices = sys.scan();
if (devices.size() > 0)
depthCamera = sys.connect(devices[0]); // Connect to first available device
else
{
std::cerr << "SimplePCLViewer: Could not find a compatible device." << std::endl;
return -1;
}
if (!depthCamera)
{
std::cerr << "SimplePCLViewer: Could not open a depth camera." << std::endl;
return -1;
}
Voxel::PCLViewer v;
v.setDepthCamera(depthCamera);
v.start();
while (v.isRunning())
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
return 0;
}
This line const Voxel::Vector<Voxel::DevicePtr> &devices = sys.scan(); has always devices are zero.
What could be the problem?
Hi All,
I am working with TI’s TOF device. I have problem with interfacing to the OPT841 device from Visual Studio program. The “SimpleVoxelViewer” application inside C:\Program Files\Voxel SDK 0.6.0\bin has no problem to connect to the device. Just the own program using Visual Studio has interfacing issue. The command echo %VOXEL_SDK_PATH% gives me C:\Program Files\Voxel SDK 0.6.0 So the path setting is correct.
I used prebuilt library also has that issue. So I compiled the whole SDK using Visual Studio and Cmake and using those compiled library still have that issue.
My code is
This line
const Voxel::Vector<Voxel::DevicePtr> &devices = sys.scan();
has always devices are zero. What could be the problem?