Skip to content
Snippets Groups Projects
Commit 5ec526e4 authored by Fabian Reister's avatar Fabian Reister
Browse files

Merge remote-tracking branch 'origin/armem/dev' into feature/armem-robot-state-memory-update

parents 3b04ab9e 51ce19a1
No related branches found
No related tags found
2 merge requests!157armem/dev => master,!144robot state memory update
This commit is part of merge request !144. Comments created here will be created in the context of that merge request.
......@@ -84,60 +84,43 @@ namespace armarx::armem::server::obj
instance::SegmentAdapter::init();
// class segment
try
const auto initSegmentWithCatch = [&](const std::string & segmentName, const auto&& fn)
{
classSegment.init();
}
catch (const LocalException& e)
{
ARMARX_ERROR << "Failed to init class segment. Reason: \n" << e.what();
}
catch (const std::exception& e)
{
ARMARX_ERROR << "Failed to init class segment. Reason: \n" << e.what();
}
catch (...)
try
{
fn();
}
catch (const LocalException& e)
{
ARMARX_ERROR << "Failed to init " << segmentName << " segment. Reason: \n" << e.what();
}
catch (const std::exception& e)
{
ARMARX_ERROR << "Failed to init " << segmentName << " segment. Reason: \n" << e.what();
}
catch (...)
{
ARMARX_ERROR << "Failed to init " << segmentName << " segment for unknown reason.";
}
};
initSegmentWithCatch("class", [&]()
{
ARMARX_ERROR << "Failed to init class segment for unknown reason.";
}
classSegment.init();
});
// articulated object class segment
try
initSegmentWithCatch("articulated object class", [&]()
{
articulatedObjectClassSegment.init();
}
catch (const LocalException& e)
{
ARMARX_ERROR << "Failed to init class segment. Reason: \n" << e.what();
}
catch (const std::exception& e)
{
ARMARX_ERROR << "Failed to init class segment. Reason: \n" << e.what();
}
catch (...)
{
ARMARX_ERROR << "Failed to init class segment for unknown reason.";
}
});
// articulated object instance segment
try
initSegmentWithCatch("articulated object instance", [&]()
{
articulatedObjectInstanceSegment.setArticulatedObjectClassSegment(articulatedObjectClassSegment);
articulatedObjectInstanceSegment.init();
}
catch (const LocalException& e)
{
ARMARX_ERROR << "Failed to init class segment. Reason: \n" << e.what();
}
catch (const std::exception& e)
{
ARMARX_ERROR << "Failed to init class segment. Reason: \n" << e.what();
}
catch (...)
{
ARMARX_ERROR << "Failed to init class segment for unknown reason.";
}
});
}
void ObjectMemory::onConnectComponent()
......
......@@ -26,7 +26,7 @@ namespace armarx::armem::articulated_object
if (not description)
{
ARMARX_ERROR << "Unknown object " << name;
ARMARX_WARNING << "Unknown object " << name;
return std::nullopt;
}
......
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