3#include <SimoxUtility/algorithm/string/string_tools.h>
18 const std::string prefix = propertyPrefix;
20 def->optional(p.memoryName, prefix +
"MemoryName");
21 objReader.registerPropertyDefinitions(def);
22 robotReader.registerPropertyDefinitions(def);
33 locationReader = memoryNameSystem.
useReader(p.memoryName);
43 objReader.connect(memoryNameSystem);
44 robotReader.connect(memoryNameSystem);
47 std::map<std::string, armarx::navigation::location::arondto::Location>
51 auto res = locationReader.getLatestSnapshotsIn(mId);
55 std::map<std::string, armarx::navigation::location::arondto::Location> ret;
56 res.memory.forEachEntity(
62 auto loc = i->dataAs<armarx::navigation::location::arondto::Location>();
63 ret[i->id().providerSegmentName +
"/" + i->id().entityName] = loc;
72 std::map<std::string, armarx::navigation::location::arondto::Location>
76 auto objects = objReader.queryLatestObjectInstances();
79 for (
auto& [locName, location] :
locations)
84 location.framedPose.header.agent =
"";
88 for (
const auto& [objectInstanceId,
object] :
objects)
90 if (simox::alg::starts_with(objectInstanceId, location.framedPose.header.agent))
auto * findLatestInstance(int instanceIndex=0)
The memory name system (MNS) client.
Reader useReader(const MemoryID &memoryID)
Use a memory server and get a reader for it.
Base class for all exceptions thrown by the armem library.
Indicates that a query to the Memory Name System failed.
std::map< std::string, armarx::navigation::location::arondto::Location > getAllLocationsInGlobalFrame()
void connect(armem::client::MemoryNameSystem &memoryNameSystem)
std::map< std::string, armarx::navigation::location::arondto::Location > getAllLocations()
void registerPropertyDefinitions(armarx::PropertyDefinitionsPtr &def)
Client-side working memory entity.
#define ARMARX_IMPORTANT
The logging level for always important information, but expected behaviour (in contrast to ARMARX_WAR...
#define ARMARX_ERROR
The logging level for unexpected behaviour, that must be fixed.
std::string const GlobalFrame
Variable of the global coordinate system.
void toGlobal(armarx::navigation::location::arondto::Location &framedLoc, const Eigen::Matrix4f &framedToGlobal)
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.