multiband: fixed error when intermediate nodes without data are in memory

This commit is contained in:
matlabbe
2022-03-01 18:42:43 -05:00
parent f140e99881
commit 656da152b3
2 changed files with 26 additions and 4 deletions

View File

@@ -2413,6 +2413,22 @@ bool multiBandTexturing(
{
image = data.imageRaw();
}
if(models.empty() || image.empty())
{
Transform odomPose;
int mapId;
int weight=0;
std::string label;
double stamp;
Transform gt;
std::vector<float> vel;
GPS gps;
EnvSensors envs;
memory->getNodeInfo(camId, odomPose, mapId, weight, label, stamp, gt, vel, gps, envs, true);
if(weight == -1) // just ignore intermediate nodes if their data is not set
continue;
}
}
else if(dbDriver)
{
@@ -2433,6 +2449,14 @@ bool multiBandTexturing(
{
image = data.imageRaw();
}
if(models.empty() || image.empty())
{
int weight=0;
dbDriver->getWeight(camId, weight);
if(weight == -1) // just ignore intermediate nodes if their data is not set
continue;
}
}
if(models.empty())
{