ubuntu@ubuntu:~/catkin_ws/src$ git clone git@github.com:turtlebot/turtlebot.git
Cloning into 'turtlebot'...
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
ubuntu@ubuntu:~/catkin_ws/src$
ubuntu@ubuntu:~$ ssh -T git@github.com
Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.
Hi AoboJaing! You've successfully authenticated, but GitHub does not provide shell access.
ubuntu@ubuntu:~$
>DF_CameraViewer -help
Usage: [options]
-csize 640x480x30 Set the source device color resolution and frame rate
-dsize 320x240x60 Set the source device depth resolution and frame rate
-isize 640x480x30 Set the source device IR resolution and frame rate
-file FILENAME Specify playback (or recording) file
-record Use together with -file to enable recording
-nframes 350 Record specific number of frames then exit
-sdname Integrated Specify the source device by its partial name
-listio List all I/O devices
-noRender Disable rendering of all streams
-mirror Enable MIRROR_MODE_HORIZONTAL
-help This help
/* Set mirror mode */if(cmdl.m_bMirror){device->SetMirrorMode(PXCCapture::Device::MirrorMode::MIRROR_MODE_HORIZONTAL);}else{device->SetMirrorMode(PXCCapture::Device::MirrorMode::MIRROR_MODE_DISABLED);}
如果你给QuerySample()函数传入一个参数,是你当前使用的Intel RealSense模块没有的设备,那么QuerySample()函数会返回NULL/null。(比如说:我们当前使用的Intel RealSense模块是SR300,它没有right Camera 和 left Camera设备,所以如果你给QuerySample()函数传入sample->right 或者 sample->left参数,那么QuerySample()函数将返回NULL/null。R200版的Intel RealSense模块是具备right Camera 和 left Camera设备的,所以如果你当前使用的是R200,那么给QuerySample()函数传入sample->right 或者 sample->left参数,QuerySample()函数会返回sample->right 或者 sample->left对应的图片样本。)
/*******************************************************************************INTEL CORPORATION PROPRIETARY INFORMATIONThis software is supplied under the terms of a license agreement or nondisclosureagreement with Intel Corporation and may not be copied or disclosed except inaccordance with the terms of that agreementCopyright(c) 2011-2014 Intel Corporation. All Rights Reserved.*******************************************************************************/#include <windows.h>#include "pxcsensemanager.h"#include "pxcmetadata.h"#include "util_cmdline.h"#include "util_render.h"#include <conio.h>intwmain(intargc,WCHAR*argv[]){/* Creates an instance of the PXCSenseManager */PXCSenseManager*pp=PXCSenseManager::CreateInstance();if(!pp){wprintf_s(L"Unable to create the SenseManager\n");return3;}/* Collects command line arguments */UtilCmdLinecmdl(pp->QuerySession());if(!cmdl.Parse(L"-listio-nframes-sdname-csize-dsize-isize-lsize-rsize-file-record-noRender-mirror",argc,argv))return3;/* Sets file recording or playback */PXCCaptureManager*cm=pp->QueryCaptureManager();cm->SetFileName(cmdl.m_recordedFile,cmdl.m_bRecord);if(cmdl.m_sdname)cm->FilterByDeviceInfo(cmdl.m_sdname,0,0);// Create stream rendersUtilRenderrenderc(L"Color"),renderd(L"Depth"),renderi(L"IR"),renderr(L"Right"),renderl(L"Left");pxcStatussts;do{/* Apply command line arguments */pxcBoolrevert=false;if(cmdl.m_csize.size()>0){pp->EnableStream(PXCCapture::STREAM_TYPE_COLOR,cmdl.m_csize.front().first.width,cmdl.m_csize.front().first.height,(pxcF32)cmdl.m_csize.front().second);}if(cmdl.m_dsize.size()>0){pp->EnableStream(PXCCapture::STREAM_TYPE_DEPTH,cmdl.m_dsize.front().first.width,cmdl.m_dsize.front().first.height,(pxcF32)cmdl.m_dsize.front().second);}if(cmdl.m_isize.size()>0){pp->EnableStream(PXCCapture::STREAM_TYPE_IR,cmdl.m_isize.front().first.width,cmdl.m_isize.front().first.height,(pxcF32)cmdl.m_isize.front().second);}if(cmdl.m_rsize.size()>0){pp->EnableStream(PXCCapture::STREAM_TYPE_RIGHT,cmdl.m_rsize.front().first.width,cmdl.m_rsize.front().first.height,(pxcF32)cmdl.m_rsize.front().second);}if(cmdl.m_lsize.size()>0){pp->EnableStream(PXCCapture::STREAM_TYPE_LEFT,cmdl.m_lsize.front().first.width,cmdl.m_lsize.front().first.height,(pxcF32)cmdl.m_lsize.front().second);}if(cmdl.m_csize.size()==0&&cmdl.m_dsize.size()==0&&cmdl.m_isize.size()==0&&cmdl.m_rsize.size()==0&&cmdl.m_lsize.size()==0){PXCVideoModule::DataDescdesc={};if(cm->QueryCapture()){cm->QueryCapture()->QueryDeviceInfo(0,&desc.deviceInfo);}else{desc.deviceInfo.streams=PXCCapture::STREAM_TYPE_COLOR|PXCCapture::STREAM_TYPE_DEPTH;revert=true;}pp->EnableStreams(&desc);}/* Initializes the pipeline */sts=pp->Init();if(sts<PXC_STATUS_NO_ERROR){if(revert){/* Enable a single stream */pp->Close();pp->EnableStream(PXCCapture::STREAM_TYPE_DEPTH);sts=pp->Init();if(sts<PXC_STATUS_NO_ERROR){pp->Close();pp->EnableStream(PXCCapture::STREAM_TYPE_COLOR);sts=pp->Init();}}if(sts<PXC_STATUS_NO_ERROR){wprintf_s(L"Failed to locate any video stream(s)\n");pp->Release();returnsts;}}/* Reset all properties */PXCCapture::Device*device=pp->QueryCaptureManager()->QueryDevice();device->ResetProperties(PXCCapture::STREAM_TYPE_ANY);/* Set mirror mode */if(cmdl.m_bMirror){device->SetMirrorMode(PXCCapture::Device::MirrorMode::MIRROR_MODE_HORIZONTAL);}else{device->SetMirrorMode(PXCCapture::Device::MirrorMode::MIRROR_MODE_DISABLED);}/* Stream Data */for(intnframes=0;nframes<cmdl.m_nframes;nframes++){/* Waits until new frame is available and locks it for application processing */sts=pp->AcquireFrame(false);if(sts<PXC_STATUS_NO_ERROR){if(sts==PXC_STATUS_STREAM_CONFIG_CHANGED){wprintf_s(L"Stream configuration was changed, re-initilizing\n");pp->Close();}break;}/* Render streams, unless -noRender is selected */if(cmdl.m_bNoRender==false){constPXCCapture::Sample*sample=pp->QuerySample();if(sample){if(sample->depth&&!renderd.RenderFrame(sample->depth))break;if(sample->color&&!renderc.RenderFrame(sample->color))break;if(sample->ir&&!renderi.RenderFrame(sample->ir))break;if(sample->right&&!renderr.RenderFrame(sample->right))break;if(sample->left&&!renderl.RenderFrame(sample->left))break;}}/* Releases lock so pipeline can process next frame */pp->ReleaseFrame();if(_kbhit()){// Break loopintc=_getch()&255;if(c==27||c=='q'||c=='Q')break;// ESC|q|Q for Exit}}}while(sts==PXC_STATUS_STREAM_CONFIG_CHANGED);wprintf_s(L"Exiting\n");// Clean Uppp->Release();return0;}