mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 16:57:46 +08:00
fixed #152
This commit is contained in:
@@ -180,8 +180,11 @@ void CameraModel::setImageSize(const cv::Size & size)
|
|||||||
P_.at<double>(0,2) = ncx;
|
P_.at<double>(0,2) = ncx;
|
||||||
P_.at<double>(1,2) = ncy;
|
P_.at<double>(1,2) = ncy;
|
||||||
}
|
}
|
||||||
K_.at<double>(0,2) = ncx;
|
if(!K_.empty())
|
||||||
K_.at<double>(1,2) = ncy;
|
{
|
||||||
|
K_.at<double>(0,2) = ncx;
|
||||||
|
K_.at<double>(1,2) = ncy;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CameraModel::load(const std::string & directory, const std::string & cameraName)
|
bool CameraModel::load(const std::string & directory, const std::string & cameraName)
|
||||||
|
|||||||
@@ -270,6 +270,7 @@ void Rtabmap::flushStatisticLogs()
|
|||||||
|
|
||||||
void Rtabmap::init(const ParametersMap & parameters, const std::string & databasePath)
|
void Rtabmap::init(const ParametersMap & parameters, const std::string & databasePath)
|
||||||
{
|
{
|
||||||
|
UDEBUG("path=%s", databasePath.c_str());
|
||||||
ParametersMap::const_iterator iter;
|
ParametersMap::const_iterator iter;
|
||||||
if((iter=parameters.find(Parameters::kRtabmapWorkingDirectory())) != parameters.end())
|
if((iter=parameters.find(Parameters::kRtabmapWorkingDirectory())) != parameters.end())
|
||||||
{
|
{
|
||||||
@@ -777,6 +778,7 @@ void Rtabmap::exportPoses(const std::string & path, bool optimized, bool global,
|
|||||||
|
|
||||||
void Rtabmap::resetMemory()
|
void Rtabmap::resetMemory()
|
||||||
{
|
{
|
||||||
|
UDEBUG("");
|
||||||
_highestHypothesis = std::make_pair(0,0.0f);
|
_highestHypothesis = std::make_pair(0,0.0f);
|
||||||
_loopClosureHypothesis = std::make_pair(0,0.0f);
|
_loopClosureHypothesis = std::make_pair(0,0.0f);
|
||||||
_lastProcessTime = 0.0;
|
_lastProcessTime = 0.0;
|
||||||
|
|||||||
@@ -278,14 +278,14 @@ int main(int argc, char * argv[])
|
|||||||
uInsert(pm, ParametersPair(Parameters::kRtabmapPublishStats(), "false"));
|
uInsert(pm, ParametersPair(Parameters::kRtabmapPublishStats(), "false"));
|
||||||
uInsert(pm, ParametersPair(Parameters::kRGBDEnabled(), "false"));
|
uInsert(pm, ParametersPair(Parameters::kRGBDEnabled(), "false"));
|
||||||
|
|
||||||
// Process an empty image to make sure every libraries are loaded.
|
// Process an empty image to make sure every libraries are loaded.
|
||||||
ULogger::Level level = ULogger::level();
|
ULogger::Level level = ULogger::level();
|
||||||
ULogger::setLevel(ULogger::kError);
|
ULogger::setLevel(ULogger::kError);
|
||||||
cv::Mat tmp = cv::Mat::zeros(640,480,CV_8UC1);
|
cv::Mat tmp = cv::Mat::zeros(640,480,CV_8UC1);
|
||||||
rtabmap.init(pm);
|
rtabmap.init(pm);
|
||||||
rtabmap.process(tmp);
|
rtabmap.process(tmp);
|
||||||
rtabmap.close();
|
rtabmap.close(false);
|
||||||
ULogger::setLevel(level);
|
ULogger::setLevel(level);
|
||||||
|
|
||||||
rtabmap.init(pm, inputDbPath);
|
rtabmap.init(pm, inputDbPath);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user