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();
60 armem::server::ReadingMemoryInterfacePrx
69 return "mem.nav.rooms.";
90 ARMARX_CHECK(not entitySnapshot.empty()) <<
"No entity snapshot instances";
92 entityInstance = &entitySnapshot.getInstance(0);
100 const armarx::navigation::algorithms::arondto::Room& dto = *aronDto;
135 const auto dto = algorithms::arondto::Room::FromAron(instance.
data());
139 result.
rooms.push_back(room);
140 result.
entries.push_back(
Entry{.instanceID = instance.
id(), .room = room});
143 if (result.
rooms.empty())
const DataT & data() const
bool forEachEntity(EntityFunctionT &&func)
QueryResult query(const QueryInput &input) const
Perform a query on the WM.
server::ReadingMemoryInterfacePrx readingPrx
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
armem::server::ReadingMemoryInterfacePrx readingPrx() const
The proxy of the memory server this reader is connected to.
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.
A room together with the memory ID of the entity instance it was read from.
std::vector< Entry > entries
The same rooms as in rooms, but with their memory IDs attached.
std::vector< armarx::navigation::algorithms::Room > rooms
enum armarx::navigation::memory::client::rooms::Reader::Result::Status status