Updated version to 0.8.0

Libraries are installed in lib directly with symbolic links, not in lib/rtabmap-0.8. Removed the need of RPATH in cmake.
Saving variance of each link in database (new field Link.variance). The variance is used to generate the constraint information matrices for TORO optimization.
ICP: computing variance instead of fitness.
ICP3: added correspondences ratio parameter
Added OdometryInfo class
Refactoring: renamed depth2d stuff to laserScan. rtabmap::Memory and rtabmap::Signature classes (no more distinct neighbor, loop closure or child loop closure links, only links with different types)
This commit is contained in:
Mathieu Labbe
2014-12-14 16:42:10 -05:00
parent 6acf374063
commit 744e2fb3c7
42 changed files with 1764 additions and 1460 deletions

View File

@@ -46,7 +46,8 @@ void showUsage()
" -debug Set debug level for the logger.\n"
" -rate #.# Input rate Hz (default 0=inf)\n"
" -openni Use openni camera instead of the usb camera.\n"
" -openni2 Use openni2 camera instead of the usb camera.\n");
" -openni2 Use openni2 camera instead of the usb camera.\n"
" -freenect Use freenect camera instead of the usb camera.\n");
exit(1);
}
@@ -76,6 +77,7 @@ int main (int argc, char * argv[])
bool show = true;
bool openni = false;
bool openni2 = false;
bool freenect = false;
float rate = 0.0f;
if(argc < 2)
@@ -121,6 +123,11 @@ int main (int argc, char * argv[])
openni2 = true;
continue;
}
if(strcmp(argv[i], "-freenect") == 0)
{
freenect = true;
continue;
}
printf("Unrecognized option : %s\n", argv[i]);
showUsage();
@@ -135,7 +142,33 @@ int main (int argc, char * argv[])
UINFO("Output = %s", fileName.toStdString().c_str());
UINFO("Show = %s", show?"true":"false");
UINFO("Openni = %s", openni?"true":"false");
if(openni)
{
UINFO("Openni = true");
if(!CameraOpenni::available())
{
UERROR("Openni is not available. Please select another driver.");
return -1;
}
}
else if(openni2)
{
UINFO("Openni2 = true");
if(!CameraOpenNI2::available())
{
UERROR("Openni2 is not available. Please select another driver.");
return -1;
}
}
else if(freenect)
{
UINFO("Freenect = true");
if(!CameraFreenect::available())
{
UERROR("Freenect is not available. Please select another driver.");
return -1;
}
}
UINFO("Rate =%f Hz", rate);
app = new QApplication(argc, argv);
@@ -154,6 +187,10 @@ int main (int argc, char * argv[])
{
cam = new rtabmap::CameraThread(new rtabmap::CameraOpenni("", rate, rtabmap::Transform(0,0,1,0, -1,0,0,0, 0,-1,0,0)));
}
else if(freenect)
{
cam = new rtabmap::CameraThread(new rtabmap::CameraFreenect(0, rate, rtabmap::Transform(0,0,1,0, -1,0,0,0, 0,-1,0,0)));
}
else
{
cam = new rtabmap::CameraThread(new rtabmap::CameraVideo(0, rate));

View File

@@ -73,7 +73,7 @@ void showUsage()
" -d # ICP decimation (default 4)\n"
" -v # ICP voxel size (default 0.005)\n"
" -s # ICP samples (default 0, not used if voxel is set.)\n"
" -f #.# ICP fitness (default 0.01)\n"
" -cr #.# ICP correspondence ratio (default 0.7)\n"
" -p2p ICP point to point (default point to plane)"
"\n"
" -debug Log debug messages\n"
@@ -114,7 +114,7 @@ int main (int argc, char * argv[])
int decimation = 4;
float voxel = 0.005;
int samples = 10000;
float fitness = 0.01f;
float ratio = 0.7f;
int maxClouds = 10;
int briefBytes = 32;
int fastThr = 30;
@@ -466,13 +466,13 @@ int main (int argc, char * argv[])
}
continue;
}
if(strcmp(argv[i], "-f") == 0)
if(strcmp(argv[i], "-cr") == 0)
{
++i;
if(i < argc)
{
fitness = std::atof(argv[i]);
if(fitness < 0.0f)
ratio = std::atof(argv[i]);
if(ratio < 0.0f)
{
showUsage();
}
@@ -494,7 +494,7 @@ int main (int argc, char * argv[])
if(i < argc)
{
localHistory = std::atoi(argv[i]);
if(fitness <= 0)
if(localHistory < 0)
{
showUsage();
}
@@ -735,10 +735,10 @@ int main (int argc, char * argv[])
UINFO("Cloud decimation = %d", decimation);
UINFO("Cloud voxel size = %f", voxel);
UINFO("Cloud samples = %d", samples);
UINFO("Cloud fitness = %f", fitness);
UINFO("Cloud correspondence ratio = %f", ratio);
UINFO("Cloud point to plane = %s", p2p?"false":"true");
odom = new rtabmap::OdometryICP(decimation, voxel, samples, distance, iterations, fitness, !p2p);
odom = new rtabmap::OdometryICP(decimation, voxel, samples, distance, iterations, ratio, !p2p);
}
rtabmap::OdometryThread odomThread(odom);
rtabmap::OdometryViewer odomViewer(maxClouds, 2, 0.0, 50);