mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-03 16:27:46 +08:00
removed asserts on CameraModel constructor when fx != 0 (but added the check in isValid() method)
This commit is contained in:
@@ -65,7 +65,9 @@ public:
|
||||
bool isValid() const {return !K_.empty() &&
|
||||
!D_.empty() &&
|
||||
!R_.empty() &&
|
||||
!P_.empty();}
|
||||
!P_.empty() &&
|
||||
fx()>0.0 &&
|
||||
fy()>0.0;}
|
||||
|
||||
const std::string & name() const {return name_;}
|
||||
|
||||
|
||||
@@ -81,8 +81,8 @@ CameraModel::CameraModel(
|
||||
P_(cv::Mat::eye(3, 4, CV_64FC1)),
|
||||
localTransform_(localTransform)
|
||||
{
|
||||
UASSERT_MSG(fx > 0.0, uFormat("fx=%f", fx).c_str());
|
||||
UASSERT_MSG(fy > 0.0, uFormat("fy=%f", fy).c_str());
|
||||
UASSERT_MSG(fx >= 0.0, uFormat("fx=%f", fx).c_str());
|
||||
UASSERT_MSG(fy >= 0.0, uFormat("fy=%f", fy).c_str());
|
||||
UASSERT_MSG(cx >= 0.0, uFormat("cx=%f", cx).c_str());
|
||||
UASSERT_MSG(cy >= 0.0, uFormat("cy=%f", cy).c_str());
|
||||
P_.at<double>(0,0) = fx;
|
||||
|
||||
@@ -289,6 +289,12 @@ int main(int argc, char * argv[])
|
||||
showUsage();
|
||||
}
|
||||
|
||||
ULogger::setType(ULogger::kTypeConsole);
|
||||
//ULogger::setType(ULogger::kTypeFile, rtabmap.getWorkingDir()+"/LogConsole.txt", false);
|
||||
//ULogger::setBuffered(true);
|
||||
ULogger::setLevel(logLevel);
|
||||
ULogger::setExitLevel(exitLevel);
|
||||
|
||||
UTimer timer;
|
||||
timer.start();
|
||||
std::queue<double> iterationMeanTime;
|
||||
@@ -296,7 +302,7 @@ int main(int argc, char * argv[])
|
||||
Camera * camera = 0;
|
||||
if(UDirectory::exists(path))
|
||||
{
|
||||
camera = new CameraImages(path, startAt, false, 1/rate);
|
||||
camera = new CameraImages(path, startAt, false, false, 1/rate);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -311,12 +317,6 @@ int main(int argc, char * argv[])
|
||||
|
||||
std::map<int, int> groundTruth;
|
||||
|
||||
ULogger::setType(ULogger::kTypeConsole);
|
||||
//ULogger::setType(ULogger::kTypeFile, rtabmap.getWorkingDir()+"/LogConsole.txt", false);
|
||||
//ULogger::setBuffered(true);
|
||||
ULogger::setLevel(logLevel);
|
||||
ULogger::setExitLevel(exitLevel);
|
||||
|
||||
// Create tasks
|
||||
Rtabmap rtabmap;
|
||||
if(inputDbPath.empty())
|
||||
|
||||
Reference in New Issue
Block a user