16 #include <armarx/navigation/memory/aron/LaserScannerFeatures.aron.generated.h>
25 #include <RobotAPI/libraries/armem_laser_scans/aron/LaserScan.aron.generated.h>
38 return "mem.nav.laser_scanner_features.";
60 if (query.
name.empty())
63 return sel.entities().all();
65 return sel.entities().withName(query.
name);
68 entitySel.snapshots().beforeOrAtTime(query.
timestamp);
73 std::vector<LaserScannerFeatures>
76 if (providerSegment.
empty())
99 std::vector<LaserScannerFeatures> laserScannerFeatures;
108 ARMARX_WARNING <<
"Empty history for " << entity.id();
116 armem::tryCast<arondto::LaserScannerFeatures>(entityInstance))
118 LaserScannerFeatures& f = laserScannerFeatures.emplace_back();
119 fromAron(o.value(), f);
126 return laserScannerFeatures;
130 Reader::queryData(
const Query& query)
const
132 const auto qb = buildQuery(query);
138 ARMARX_DEBUG <<
"[MappingDataReader] result: " << qResult;
140 if (not qResult.success)
142 ARMARX_WARNING <<
"Failed to query data from memory: " << qResult.errorMessage;
143 return {.features = {},
144 .status = Result::Status::Error,
145 .errorMessage = qResult.errorMessage};
148 const auto coreSegment = qResult.memory.getCoreSegment(properties().coreSegmentName);
149 if (not coreSegment.hasProviderSegment(query.
providerName))
152 <<
"` does not exist (yet).";
153 return {.features = {},
154 .status = Result::Status::Error,
155 .errorMessage =
"Provider segment " + query.
providerName +
" does not exist"};
160 qResult.memory.getCoreSegment(properties().coreSegmentName)
174 return {.features = features,
176 .status = Result::Status::Success,