Skip to content
Snippets Groups Projects
Commit 08d826b1 authored by Fabian Reister's avatar Fabian Reister
Browse files

HumanPoseReader: query with optional provider name

parent 11cdfc41
No related branches found
No related tags found
1 merge request!139adding HumanPoseReader and native types for human pose
......@@ -2,8 +2,8 @@
#include <RobotAPI/libraries/armem/util/util.h>
#include <VisionX/libraries/armem_human/aron_conversions.h>
#include <VisionX/libraries/armem_human/aron/BODY_25Pose.aron.generated.h>
#include <VisionX/libraries/armem_human/aron_conversions.h>
namespace armarx::armem::human::client
......@@ -15,13 +15,23 @@ namespace armarx::armem::human::client
{
armarx::armem::client::query::Builder qb;
// clang-format off
qb
.coreSegments().withName(properties().coreSegmentName)
.providerSegments().withName(query.providerName)
.entities().withName("3DDetections")
.snapshots().beforeOrAtTime(query.timestamp);
// clang-format on
armarx::armem::client::query::CoreSegmentSelector& coreSegmentQuery =
qb.coreSegments().withName(properties().coreSegmentName);
armarx::armem::client::query::ProviderSegmentSelector& providerQuery =
[&]() -> armem::client::query::ProviderSegmentSelector&
{
if (query.providerName.empty())
{
return coreSegmentQuery.providerSegments().withName(query.providerName);
}
return coreSegmentQuery.providerSegments().all();
}();
providerQuery.entities()
.withName("3DDetections")
.snapshots()
.beforeOrAtTime(query.timestamp);
return qb;
}
......
......@@ -38,6 +38,7 @@ namespace armarx::armem::human::client
struct Query
{
// if empty, will query all providers
std::string providerName;
armem::Time timestamp;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment