TransformReader.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 * @package RobotAPI::ArmarXObjects::
17 * @author Fabian Reister ( fabian dot reister at kit dot edu )
18 * @date 2021
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
25#include <mutex>
26
29
30#include "interfaces.h"
31
33{
34 /**
35 * @defgroup Component-ExampleClient ExampleClient
36 * @ingroup RobotAPI-Components
37 * A description of the component ExampleClient.
38 *
39 * @class TransformReader
40 * @ingroup Component-ExampleClient
41 * @brief Brief description of class ExampleClient.
42 *
43 * Detailed description of class ExampleClient.
44 */
46 {
47 public:
48 TransformReader() = default;
50
51 ~TransformReader() override;
52
53 void connect(armem::client::MemoryNameSystem& memoryNameSystem) override;
54
55 TransformResult getGlobalPose(const std::string& agentName,
56 const std::string& robotRootFrame,
57 const armem::Time& timestamp) const override;
58
60
62
65 {
66 return memoryReader;
67 }
68
69 private:
70 armem::client::Reader memoryReader;
71 mutable std::mutex memoryReaderMutex;
72
73 // Properties
74 struct Properties
75 {
76 std::string memoryName = "RobotState";
77 std::string localizationSegment = "Localization";
78 } properties;
79
80 const std::string propertyPrefix = "mem.robot_state.";
81 };
82} // namespace armarx::armem::robot_state::client::localization
std::string timestamp()
The memory name system (MNS) client.
Reads data from a memory server.
Definition Reader.h:25
void registerPropertyDefinitions(::armarx::PropertyDefinitionsPtr &def) override
TransformResult getGlobalPose(const std::string &agentName, const std::string &robotRootFrame, const armem::Time &timestamp) const override
TransformResult lookupTransform(const TransformQuery &query) const override
void connect(armem::client::MemoryNameSystem &memoryNameSystem) override
armarx::core::time::DateTime Time
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.