18#include <armarx/navigation/human/aron/Human.aron.generated.h>
62 return "mem.nav.human.";
83 ARMARX_CHECK(providerSegment.
size() == 1) <<
"There should be only one entity!";
90 if (entitySnapshot.empty())
96 entitySnapshot.forEachInstance(
102 if (dtToNow < maxAge and dtToNow.
isPositive())
104 const auto dto = navigation::human::arondto::Human::FromAron(
105 entityInstance.
data());
109 humans.push_back(
human);
120 const Duration& maxAge)
125 ARMARX_CHECK(providerSegment.
size() == 1) <<
"There should be only one entity!";
131 ARMARX_CHECK(not entitySnapshot.empty()) <<
"No entity snapshot instances";
133 entitySnapshot.forEachInstance(
136 const Duration dtToNow =
139 if (dtToNow < maxAge and dtToNow.isPositive())
141 const auto dto = navigation::human::arondto::HumanGroup::FromAron(
142 entityInstance.
data());
144 navigation::human::HumanGroup human;
146 humans.push_back(human);
165 ARMARX_DEBUG <<
"[MappingDataReader] result: " << qResult;
170 return {.groups = {},
177 if (not coreSegment.hasProviderSegment(query.
providerName))
186 if (providerSegment.
empty())
189 return {.groups = {},
191 .errorMessage =
"No entities"};
217 ARMARX_DEBUG <<
"[MappingDataReader] result: " << qResult;
222 return {.humans = {},
229 if (not coreSegment.hasProviderSegment(query.
providerName))
238 if (providerSegment.
empty())
241 return {.humans = {},
243 .errorMessage =
"No entities"};
const DataT & data() const
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.
EntitySelector & withName(const std::string &name) override
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.
Represents a point in time.
bool isPositive() const
Tests whether the duration is positive (value in µs > 0).
Properties defaultProperties() const override
std::string propertyPrefix() const override
HumanGroupResult queryHumanGroups(const Query &query) const
HumanResult queryHumans(const Query &query) const
::armarx::armem::client::query::Builder buildHumansQuery(const Query &query) const
::armarx::armem::client::query::Builder buildHumanGroupsQuery(const Query &query) const
#define ARMARX_CHECK(expression)
Shortcut for ARMARX_CHECK_EXPRESSION.
#define ARMARX_INFO
The normal logging level.
#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.
std::vector< Human > Humans
std::vector< HumanGroup > HumanGroups
constexpr const char * HumanCoreSegmentName
constexpr const char * NavigationMemoryName
void fromAron(const arondto::Circle &dto, Circle &bo)
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.