fixed odometry "empty image?" error when reading from database with

stereo images, fixed databaseViewer fatal error when there are null
poses
This commit is contained in:
Mathieu Labbe
2015-01-08 16:12:45 -05:00
parent db382d6149
commit 05ee9a7b84
3 changed files with 30 additions and 4 deletions

View File

@@ -230,6 +230,11 @@ SensorData DBReader::getNextData()
pose,
variance,
seq);
UDEBUG("Laser=%d RGB/Left=%d Depth=%d Right=%d",
data.laserScan().empty()?0:1,
data.image().empty()?0:1,
data.depth().empty()?0:1,
data.rightImage().empty()?0:1);
}
}
else

View File

@@ -1308,7 +1308,7 @@ void OdometryThread::mainLoop()
void OdometryThread::addData(const SensorData & data)
{
if(data.image().empty() || data.depth().empty() || data.fx() == 0.0f || data.fy() == 0.0f)
if(data.image().empty() || data.depthOrRightImage().empty() || data.fx() == 0.0f || data.fyOrBaseline() == 0.0f)
{
ULOGGER_ERROR("image empty !?");
return;