18#include <armarx/navigation/algorithms/aron/Room.aron.generated.h>
31 auto& coreSegmentSelector =
37 if (
query.providerName)
39 return coreSegmentSelector.providerSegments().withName(*
query.providerName);
41 return coreSegmentSelector.providerSegments().all();
63 return "mem.nav.rooms.";
84 ARMARX_CHECK(not entitySnapshot.empty()) <<
"No entity snapshot instances";
86 entityInstance = &entitySnapshot.getInstance(0);
94 const armarx::navigation::algorithms::arondto::Room& dto = *aronDto;
127 const auto dto = algorithms::arondto::Room::FromAron(instance.
data());
131 result.
rooms.push_back(room);
134 if (result.
rooms.empty())
const DataT & data() const
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
EntitySelector & all() override
EntitySelector & withName(const std::string &name) override
SnapshotSelector & snapshots()
Start specifying entity snapshots.
EntitySelector & entities()
Start specifying entities.
SnapshotSelector & beforeOrAtTime(Time timestamp)
const armem::client::Reader & memoryReader() 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.
std::optional< AronClass > tryCast(const wm::EntityInstance &item)
Tries to cast a armem::EntityInstance to AronClass.
armarx::navigation::algorithms::Room asRoom(const armem::wm::ProviderSegment &providerSegment)
constexpr const char * RoomsCoreSegmentName
constexpr const char * NavigationMemoryName
void fromAron(const arondto::Circle &dto, Circle &bo)
bool forEachInstance(InstanceFunctionT &&func)
auto & getLatestSnapshot(int snapshotIndex=0)
Retrieve the latest entity snapshot.
wm::Memory memory
The slice of the memory that matched the query.
std::vector< armarx::navigation::algorithms::Room > rooms
enum armarx::navigation::memory::client::rooms::Reader::Result::Status status