Skip to content
Snippets Groups Projects
Commit d49c8f8e authored by Markus Grotz's avatar Markus Grotz
Browse files

filtered saliency maps by time

parent b6ebf6be
No related branches found
No related tags found
No related merge requests found
......@@ -140,6 +140,30 @@ void ViewSelection::onExitComponent()
ViewTargetBasePtr ViewSelection::nextAutomaticViewTarget()
{
IceUtil::Time currentTime = armarx::TimeUtil::GetTime();
std::vector<std::string> activeSaliencyMaps;
for (const auto & p : saliencyMaps)
{
if (p.second->validUntil)
{
TimestampVariantPtr time = TimestampVariantPtr::dynamicCast(p.second->validUntil);
if (time->toTime() > currentTime)
{
activeSaliencyMaps.push_back(p.second->name);
}
}
else
{
activeSaliencyMaps.push_back(p.second->name);
}
}
if (activeSaliencyMaps.empty())
{
return nullptr;
}
SharedRobotInterfacePrx robotPrx = robotStateComponent->getSynchronizedRobot();
TNodeList* visibilityMaskGraphNodes = visibilityMaskGraph->getNodes();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment