KnownGraspCandidateReader.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @author Fabian Reister ( fabian dot reister at kit dot edu )
17 * @date 2021
18 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19 * GNU General Public License
20 */
21
22#pragma once
23
24#include <mutex>
25#include <optional>
26
28
31#include <RobotAPI/libraries/armem_grasping/aron/KnownGraspCandidate.aron.generated.h>
32
34{
35 class Reader
36 {
37 public:
38 Reader() = default;
39 virtual ~Reader() = default;
40
42 void connect(armem::client::MemoryNameSystem& memoryNameSystem);
43
44 std::optional<armem::grasping::arondto::KnownGraspInfo>
45 queryKnownGraspInfoByEntityName(const std::string&, const armem::Time&);
46 std::optional<armem::grasping::arondto::KnownGraspInfo>
48
49 private:
50 struct Properties
51 {
52 std::string memoryName = "Grasp";
53 std::string coreSegmentName = "KnownGraspCandidate";
54 } properties;
55
56 const std::string propertyPrefix = "mem.grasping.knowngrasps.";
57
58 armem::client::Reader memoryReader;
59 };
60
61
62} // namespace armarx::armem::grasping::known_grasps
The memory name system (MNS) client.
Reads data from a memory server.
Definition Reader.h:25
std::optional< armem::grasping::arondto::KnownGraspInfo > queryKnownGraspInfoByEntityName(const std::string &, const armem::Time &)
void connect(armem::client::MemoryNameSystem &memoryNameSystem)
std::optional< armem::grasping::arondto::KnownGraspInfo > queryKnownGraspInfo(const armem::wm::Memory &memory, const armem::Time &)
void registerPropertyDefinitions(armarx::PropertyDefinitionsPtr &def)
Client-side working memory.
Brief description of class memory.
Definition memory.h:39
armarx::core::time::DateTime Time
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.