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 
27 
28 #include "interfaces.h"
29 
31 {
32  /**
33  * @defgroup Component-ExampleClient ExampleClient
34  * @ingroup RobotAPI-Components
35  * A description of the component ExampleClient.
36  *
37  * @class TransformReader
38  * @ingroup Component-ExampleClient
39  * @brief Brief description of class ExampleClient.
40  *
41  * Detailed description of class ExampleClient.
42  */
44  {
45  public:
46  TransformReader() = default;
48 
49  ~TransformReader() override;
50 
51  void connect(armem::client::MemoryNameSystem& memoryNameSystem) override;
52 
53  TransformResult getGlobalPose(const std::string& agentName,
54  const std::string& robotRootFrame,
55  const armem::Time& timestamp) const override;
56 
57  TransformResult lookupTransform(const TransformQuery& query) const override;
58 
60 
61  private:
62  armem::client::Reader memoryReader;
63  mutable std::mutex memoryReaderMutex;
64 
65  // Properties
66  struct Properties
67  {
68  std::string memoryName = "RobotState";
69  std::string localizationSegment = "Localization";
70  } properties;
71 
72  const std::string propertyPrefix = "mem.robot_state.";
73  };
74 } // namespace armarx::armem::client::robot_state::localization
armarx::armem::client::Reader
Reads data from a memory server.
Definition: Reader.h:24
armarx::armem::robot_state::client::localization::TransformReader::getGlobalPose
TransformResult getGlobalPose(const std::string &agentName, const std::string &robotRootFrame, const armem::Time &timestamp) const override
Definition: TransformReader.cpp:102
Reader.h
armarx::armem::robot_state::client::localization::TransformReader::lookupTransform
TransformResult lookupTransform(const TransformQuery &query) const override
Definition: TransformReader.cpp:137
interfaces.h
armarx::armem::robot_state::client::localization::TransformReader::~TransformReader
~TransformReader() override
armarx::armem::robot_state::localization::TransformQuery
Definition: types.h:74
armarx::armem::robot_state::client::localization
Definition: interfaces.h:33
armarx::armem::robot_state::client::localization::TransformReader::connect
void connect(armem::client::MemoryNameSystem &memoryNameSystem) override
Definition: TransformReader.cpp:85
armarx::armem::robot_state::client::localization::TransformReader
Brief description of class ExampleClient.
Definition: TransformReader.h:43
armarx::armem::robot_state::client::localization::TransformReader::TransformReader
TransformReader()=default
armarx::armem::robot_state::client::localization::TransformReader::registerPropertyDefinitions
void registerPropertyDefinitions(::armarx::PropertyDefinitionsPtr &def) override
Definition: TransformReader.cpp:71
armarx::core::time::DateTime
Represents a point in time.
Definition: DateTime.h:24
armarx::armem::robot_state::localization::TransformResult
Definition: types.h:33
armarx::armem::laser_scans::constants::memoryName
const std::string memoryName
Definition: constants.h:28
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::armem::client::MemoryNameSystem
The memory name system (MNS) client.
Definition: MemoryNameSystem.h:69
MemoryNameSystem.h
armarx::armem::robot_state::client::localization::TransformReaderInterface
Definition: interfaces.h:48