Go to the documentation of this file.
4 #include <armarx/navigation/core/aron/Trajectory.aron.generated.h>
13 const auto qb = buildLocalPlannerResultQuery(query);
14 const auto& providerName = query.
clientID;
19 ARMARX_DEBUG <<
"[MappingDataReader] result: " << qResult;
21 if (not qResult.success)
23 ARMARX_WARNING <<
"Failed to query data from memory: " << qResult.errorMessage;
24 return {.trajectory = {},
25 .status = LocalPlannerResult::Status::Error,
26 .errorMessage = qResult.errorMessage};
29 const auto coreSegment = qResult.memory.getCoreSegment(
properties().coreSegmentName);
31 if (not coreSegment.hasProviderSegment(providerName))
33 ARMARX_DEBUG <<
"Provider segment `" << providerName <<
"` does not exist (yet).";
34 return {.trajectory = {}, .status = LocalPlannerResult::Status::NoData};
38 coreSegment.getProviderSegment(providerName);
40 if (providerSegment.
empty())
43 return {.trajectory = {},
44 .status = LocalPlannerResult::Status::NoData,
45 .errorMessage =
"No entities"};
51 .status = LocalPlannerResult::Status::Success};
56 .status = LocalPlannerResult::Status::Error,
65 return "mem.nav.stack_result.";
81 ARMARX_CHECK(providerSegment.
size() == 1) <<
"There should be only one entity!";
89 ARMARX_CHECK(not entitySnapshot.empty()) <<
"No entity snapshot instances";
91 entityInstance = &entitySnapshot.getInstance(0);
97 navigation::core::arondto::LocalTrajectory::FromAron(entityInstance->
data());
102 return localTrajectory;
const Properties & properties() const
EntitySelector & entities()
Start specifying entities.
armarx::navigation::core::LocalTrajectory trajectory
Client-side working memory provider segment.
void fromAron(const arondto::Circle &dto, Circle &bo)
Client-side working entity instance.
auto & getLatestSnapshot(int snapshotIndex=0)
Retrieve the latest entity snapshot.
SnapshotSelector & snapshots()
Start specifying entity snapshots.
#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...
const std::string NavigationMemoryName
This file is part of ArmarX.
#define ARMARX_CHECK(expression)
Shortcut for ARMARX_CHECK_EXPRESSION.
std::string GetHandledExceptionString()
CoreSegmentSelector & coreSegments()
Start specifying core segments.
CoreSegmentSelector & withName(const std::string &name) override
const armem::client::Reader & memoryReader() const
Properties defaultProperties() const override
EntitySelector & withName(const std::string &name) override
ProviderSegmentSelector & withName(const std::string &name) override
bool forEachEntity(EntityFunctionT &&func)
SnapshotSelector & beforeOrAtTime(Time timestamp)
The query::Builder class provides a fluent-style specification of hierarchical queries.
ProviderSegmentSelector & providerSegments()
Start specifying provider segments.
Client-side working memory entity.
LocalPlannerResult queryLocalPlannerResult(const Query &query)
const DataT & data() const
std::string propertyPrefix() const override
const std::string LocalPlannerResultCoreSegment
std::vector< HumanGroup > HumanGroups
QueryResult query(const QueryInput &input) const
Perform a query.