35 if (
query.name.empty()){
38 sel = sel.withName(
query.name);
49 return "mem.nav.costmap.";
70 ARMARX_CHECK(not entitySnapshot.empty()) <<
"No entity snapshot instances";
72 entityInstance = &entitySnapshot.getInstance(0);
88 ARMARX_DEBUG <<
"[MappingDataReader] result: " << qResult;
93 return {.costmap = std::nullopt,
100 if (not coreSegment.hasProviderSegment(
query.providerName))
103 <<
"` does not exist (yet).";
108 coreSegment.getProviderSegment(
query.providerName);
110 if (providerSegment.
empty())
113 return {.costmap = std::nullopt,
115 .errorMessage =
"No entities"};
#define ARMARX_CHECK_NOT_EMPTY(c)
CoreSegmentT & getCoreSegment(const std::string &name)
bool forEachEntity(EntityFunctionT &&func)
QueryResult query(const QueryInput &input) const
Perform a query on the WM.
The query::Builder class provides a fluent-style specification of hierarchical queries.
CoreSegmentSelector & coreSegments()
Start specifying core segments.
CoreSegmentSelector & withName(const std::string &name) override
ProviderSegmentSelector & providerSegments()
Start specifying provider segments.
SnapshotSelector & snapshots()
Start specifying entity snapshots.
ProviderSegmentSelector & withName(const std::string &name) override
EntitySelector & entities()
Start specifying entities.
SnapshotSelector & beforeOrAtTime(Time timestamp)
const armem::client::Reader & memoryReader() const
const Properties & properties() const
Client-side working entity instance.
Client-side working memory entity.
Client-side working memory provider segment.
Properties defaultProperties() const override
std::string propertyPrefix() const override
::armarx::armem::client::query::Builder buildQuery(const Query &query) const
Result query(const Query &query) const
#define ARMARX_CHECK(expression)
Shortcut for ARMARX_CHECK_EXPRESSION.
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
#define ARMARX_CHECK_EQUAL(lhs, rhs)
This macro evaluates whether lhs is equal (==) rhs and if it turns out to be false it will throw an E...
#define ARMARX_DEBUG
The logging level for output that is only interesting while debugging.
#define ARMARX_WARNING
The logging level for unexpected behaviour, but not a serious problem.
#define ARMARX_VERBOSE
The logging level for verbose information.
orientation_aware::Costmap3D costmap3dFromAron(const armem::wm::EntityInstance &entityInstance)
algorithms::orientation_aware::Costmap3D asCostmap3D(const armem::wm::ProviderSegment &providerSegment)
constexpr const char * Costmap3DCoreSegmentName
constexpr const char * NavigationMemoryName
std::string GetHandledExceptionString()
auto & getLatestSnapshot(int snapshotIndex=0)
Retrieve the latest entity snapshot.
wm::Memory memory
The slice of the memory that matched the query.