Go to the documentation of this file.
10 #include <VisionX/libraries/armem_human/aron/HumanPose.aron.generated.h>
29 if (not
query.providerName.empty())
47 return "mem.human.pose.";
53 return {.
memoryName =
"Human", .coreSegmentName =
"Pose"};
56 std::vector<HumanPose>
66 std::vector<HumanPose> humanPoses;
76 entitySnapshot.forEachInstance(
77 [&humanPoses, ×tamp, &maxAge](
const auto& entityInstance)
82 timestamp - entityInstance.metadata().referencedTime;
87 tryCast<armarx::human::arondto::HumanPose>(entityInstance);
88 ARMARX_CHECK(aronDto) <<
"Failed casting to HumanPose";
91 fromAron(*aronDto, humanPose);
92 humanPose.timestamp = entityInstance.metadata().referencedTime;
94 humanPoses.push_back(humanPose);
115 ARMARX_DEBUG <<
"[MappingDataReader] result: " << qResult;
117 if (not qResult.success)
119 ARMARX_WARNING <<
"Failed to query data from memory: " << qResult.errorMessage;
120 return {.humanPoses = {},
122 .errorMessage = qResult.errorMessage};
126 const auto coreSegment = qResult.memory.getCoreSegment(
properties().coreSegmentName);
128 if (
query.providerName.empty())
132 std::vector<HumanPose> allHumanPoses;
134 coreSegment.forEachProviderSegment(
135 [&allHumanPoses, &
query](
const auto& providerSegment)
137 const std::vector<HumanPose> humanPoses =
140 humanPoses.begin(), humanPoses.end(), std::back_inserter(allHumanPoses));
143 if (allHumanPoses.empty())
146 return {.humanPoses = {},
148 .errorMessage =
"No entities"};
157 if (not coreSegment.hasProviderSegment(
query.providerName))
160 <<
"` does not exist (yet).";
167 coreSegment.getProviderSegment(
query.providerName);
169 if (providerSegment.
empty())
EntitySelector & all() override
const Properties & properties() const
EntitySelector & entities()
Start specifying entities.
Properties defaultProperties() const override
auto & getLatestSnapshot(int snapshotIndex=0)
Retrieve the latest entity snapshot.
SnapshotSelector & snapshots()
Start specifying entity snapshots.
bool isPositive() const
Tests whether the duration is positive (value in µs > 0).
SpamFilterDataPtr deactivateSpam(SpamFilterDataPtr const &spamFilter, float deactivationDurationSec, const std::string &identifier, bool deactivate)
std::string GetHandledExceptionString()
Use of this software is granted under one of the following two to be chosen freely by the user Boost Software License Version Marcin Kalicinski Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following must be included in all copies of the in whole or in and all derivative works of the unless such copies or derivative works are solely in the form of machine executable object code generated by a source language processor THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF FITNESS FOR A PARTICULAR TITLE AND NON INFRINGEMENT IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN TORT OR ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE The MIT Marcin Kalicinski Permission is hereby free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to copy
CoreSegmentSelector & coreSegments()
Start specifying core segments.
std::vector< HumanPose > asHumanPoses(const wm::ProviderSegment &providerSegment, const DateTime ×tamp, const Duration &maxAge)
CoreSegmentSelector & withName(const std::string &name) override
const armem::client::Reader & memoryReader() const
std::vector< HumanPose > humanPoses
Represents a point in time.
ProviderSegmentSelector & withName(const std::string &name) override
bool forEachEntity(EntityFunctionT &&func)
SnapshotSelector & beforeOrAtTime(Time timestamp)
enum armarx::armem::human::client::Reader::Result::Status status
The query::Builder class provides a fluent-style specification of hierarchical queries.
ProviderSegmentSelector & providerSegments()
Start specifying provider segments.
::armarx::armem::client::query::Builder buildQuery(const Query &query) const
ProviderSegmentSelector & all() override
QueryResult query(const QueryInput &input) const
Perform a query.
Result query(const Query &query) const
std::string propertyPrefix() const override