Something like
try {
grabber->connectToDevice();
}
catch (const std::exception& e)
{
std::cerr << "Could not connect to any device. Is the camera
connected?" << std::endl;
exit(0);
}
should handle the connexion error nicely.
Cheers,
Nicolas
On 09/11/2011 05:10 PM, Suchet Bargoti wrote:
> Hey guys,
>
> For those of you that haven't read any of my previous posts, I am
> quiet new to coding in general so bear with me :).
>
> I am trying to run the grab_mesh file where it acquires and saves
> a .ply file of the environment. But on some instances it fails to
> connect to the camera where I get the error message:
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
> [DBG] �Found device: vendor PrimeSense name Sensor Kinect�
> [DBG] �[Kinect bfc6b340] connecting�
> [DBG] �[ERROR] Create Device Node failed: USB transfer timeout!�