mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-03 16:27:46 +08:00
Fixed rectify flag not reset in CameraStereoImages::init()
This commit is contained in:
@@ -760,7 +760,6 @@ CameraStereoImages::CameraStereoImages(
|
|||||||
if(paths.size() >= 2)
|
if(paths.size() >= 2)
|
||||||
{
|
{
|
||||||
camera2_ = new CameraImages(paths[1]);
|
camera2_ = new CameraImages(paths[1]);
|
||||||
camera2_->setImagesRectified(rectifyImages);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -808,6 +807,7 @@ bool CameraStereoImages::init(const std::string & calibrationFolder, const std::
|
|||||||
}
|
}
|
||||||
|
|
||||||
//desactivate before init as we will do it in this class instead for convenience
|
//desactivate before init as we will do it in this class instead for convenience
|
||||||
|
bool rectify = this->isImagesRectified();
|
||||||
this->setImagesRectified(false);
|
this->setImagesRectified(false);
|
||||||
|
|
||||||
bool success = false;
|
bool success = false;
|
||||||
@@ -815,7 +815,6 @@ bool CameraStereoImages::init(const std::string & calibrationFolder, const std::
|
|||||||
{
|
{
|
||||||
if(camera2_)
|
if(camera2_)
|
||||||
{
|
{
|
||||||
camera2_->setImagesRectified(false);
|
|
||||||
if(camera2_->init())
|
if(camera2_->init())
|
||||||
{
|
{
|
||||||
if(this->imagesCount() == camera2_->imagesCount())
|
if(this->imagesCount() == camera2_->imagesCount())
|
||||||
@@ -838,6 +837,7 @@ bool CameraStereoImages::init(const std::string & calibrationFolder, const std::
|
|||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this->setImagesRectified(rectify); // reset the flag
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user