Go to the documentation of this file.
6 #include <RobotAPI/libraries/armem_laser_scans/aron/LaserScan.aron.generated.h>
21 ARMARX_DEBUG <<
"LaserScansWriter: registerPropertyDefinitions";
23 const std::string prefix = propertyPrefix;
50 const std::string& frame,
51 const std::string& agentName,
54 std::lock_guard g{memoryWriterMutex};
58 ARMARX_VERBOSE <<
"Storing scan with " << laserScan.size() <<
" elements";
60 if (not result.success)
70 const auto entityID = providerId.withEntityName(frame).withTimestamp(timestamp);
73 update.entityID = entityID;
75 arondto::LaserScanStamped aronSensorData;
77 toAron(laserScan, timestamp, frame, agentName, aronSensorData);
79 auto dict = aronSensorData.toAron();
80 dict->addElementCopy(
"scan",
toAron(laserScan));
82 update.instancesData = {dict};
83 update.referencedTime = timestamp;
90 if (not updateResult.success)
95 return updateResult.success;
data::AddSegmentResult addSegment(const std::string &coreSegmentName, const std::string &providerSegmentName, bool clearWhenExists=false) const
void connect(armem::client::MemoryNameSystem &memoryNameSystem)
Result of an EntityUpdate.
void registerPropertyDefinitions(armarx::PropertyDefinitionsPtr &def)
to be called in Component::onConnectComponent
Writer useWriter(const MemoryID &memoryID)
Use a memory server and get a writer for it.
bool storeSensorData(const LaserScan &laserScan, const std::string &frame, const std::string &agentName, const armem::Time ×tamp)
An update of an entity for a specific point in time.
CommitResult commit(const Commit &commit) const
Writes a Commit to the memory.
int64_t toAron(const armem::Time ×tamp)
bool update(mongocxx::collection &coll, const nlohmann::json &query, const nlohmann::json &update)
Represents a point in time.
const std::string memoryName
The memory name system (MNS) client.
Indicates that a query to the Memory Name System failed.
const armem::MemoryID MemoryID