mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
added openni2 option to dataRecorder app
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1435 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -19,7 +19,8 @@ void showUsage()
|
|||||||
" -hide Don't display the current cloud recorded.\n"
|
" -hide Don't display the current cloud recorded.\n"
|
||||||
" -debug Set debug level for the logger.\n"
|
" -debug Set debug level for the logger.\n"
|
||||||
" -rate #.# Input rate Hz (default 0=inf)\n"
|
" -rate #.# Input rate Hz (default 0=inf)\n"
|
||||||
" -openni Use openni camera instead of the usb camera.\n");
|
" -openni Use openni camera instead of the usb camera.\n"
|
||||||
|
" -openni2 Use openni2 camera instead of the usb camera.\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,6 +49,7 @@ int main (int argc, char * argv[])
|
|||||||
QString fileName;
|
QString fileName;
|
||||||
bool show = true;
|
bool show = true;
|
||||||
bool openni = false;
|
bool openni = false;
|
||||||
|
bool openni2 = false;
|
||||||
float rate = 0.0f;
|
float rate = 0.0f;
|
||||||
|
|
||||||
if(argc < 2)
|
if(argc < 2)
|
||||||
@@ -88,6 +90,11 @@ int main (int argc, char * argv[])
|
|||||||
openni = true;
|
openni = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if(strcmp(argv[i], "-openni2") == 0)
|
||||||
|
{
|
||||||
|
openni2 = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
printf("Unrecognized option : %s\n", argv[i]);
|
printf("Unrecognized option : %s\n", argv[i]);
|
||||||
showUsage();
|
showUsage();
|
||||||
@@ -113,7 +120,11 @@ int main (int argc, char * argv[])
|
|||||||
signal(SIGTERM, &sighandler);
|
signal(SIGTERM, &sighandler);
|
||||||
signal(SIGINT, &sighandler);
|
signal(SIGINT, &sighandler);
|
||||||
|
|
||||||
if(openni)
|
if(openni2)
|
||||||
|
{
|
||||||
|
cam = new rtabmap::CameraThread(new rtabmap::CameraOpenNI2(rate, rtabmap::Transform(0,0,1,0, -1,0,0,0, 0,-1,0,0)));
|
||||||
|
}
|
||||||
|
else if(openni)
|
||||||
{
|
{
|
||||||
cam = new rtabmap::CameraThread(new rtabmap::CameraOpenni("", rate, rtabmap::Transform(0,0,1,0, -1,0,0,0, 0,-1,0,0)));
|
cam = new rtabmap::CameraThread(new rtabmap::CameraOpenni("", rate, rtabmap::Transform(0,0,1,0, -1,0,0,0, 0,-1,0,0)));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user