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

ObjectPoseClient: fetchObjectPose

parent b48f27ad
No related branches found
No related tags found
1 merge request!225Feature/object pose client extension
#include "ObjectPoseClient.h"
#include <optional>
#include "RobotAPI/libraries/ArmarXObjects/ObjectPose.h"
namespace armarx::objpose
......@@ -54,7 +56,21 @@ namespace armarx::objpose
}
return map;
}
std::optional<ObjectPose> ObjectPoseClient::fetchObjectPose(const ObjectID& objectID)
{
const auto *object = findObjectPoseByID(fetchObjectPoses(), objectID);
if(object != nullptr)
{
return *object;
}
return std::nullopt;
}
ObjectPoseSeq ObjectPoseClient::fetchObjectPosesFromProvider(const std::string& providerName)
{
if (!objectPoseStorage)
......@@ -66,7 +82,6 @@ namespace armarx::objpose
}
const ObjectPoseStorageInterfacePrx&
ObjectPoseClient::getObjectPoseStorage() const
{
......
#pragma once
#include "RobotAPI/libraries/ArmarXObjects/ObjectID.h"
#include <RobotAPI/interface/objectpose/ObjectPoseStorageInterface.h>
#include <RobotAPI/libraries/ArmarXObjects/ObjectFinder.h>
#include <RobotAPI/libraries/ArmarXObjects/ObjectPose.h>
......@@ -31,10 +32,12 @@ namespace armarx::objpose
ObjectPoseMap
fetchObjectPosesAsMap();
std::optional<ObjectPose>
fetchObjectPose(const ObjectID& objectID);
ObjectPoseSeq
fetchObjectPosesFromProvider(const std::string& providerName);
const ObjectPoseStorageInterfacePrx&
getObjectPoseStorage() const;
......
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