TransformHelper.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 <optional>
25 #include <vector>
26 
27 #include <Eigen/Core>
28 #include <Eigen/Geometry>
29 
32 
34 {
37 
39  {
40  public:
41  static TransformResult
43  const TransformQuery& query);
44 
45  static TransformResult
47  const TransformQuery& query);
48 
49 
52  const TransformQuery& query);
53 
56  const TransformQuery& query);
57 
58 
59  private:
60  template <class... Args>
61  static TransformResult
63  const TransformQuery& query);
64 
65 
66  template <class... Args>
69  const TransformQuery& query);
70 
71 
72  template <class... Args>
73  static std::vector<std::string>
75  const TransformQuery& query);
76 
77 
78  template <class... Args>
79  static std::vector<Eigen::Isometry3f>
81  const std::vector<std::string>& tfChain,
82  const std::string& agent,
83  const armem::Time& timestamp);
84 
85 
86  template <class... Args>
87  static Eigen::Isometry3f
88  _obtainTransform(const std::string& entityName,
89  const armem::base::ProviderSegmentBase<Args...>& agentProviderSegment,
90  const armem::Time& timestamp);
91 
92  template <class... Args>
93  static std::optional<armarx::core::time::DateTime>
95  const armem::Time& timestamp);
96 
97  static Eigen::Isometry3f _interpolateTransform(
98  const std::vector<::armarx::armem::robot_state::localization::Transform>& queue,
99  armem::Time timestamp);
100 
101  static ::armarx::armem::robot_state::localization::Transform
102  _convertEntityToTransform(const armem::wm::EntityInstance& item);
103  };
104 } // namespace armarx::armem::robot_state::localization
armarx::armem::base::ProviderSegmentBase
Data of a provider segment containing multiple entities.
Definition: ProviderSegmentBase.h:22
armarx::armem::robot_state::localization
Definition: aron_conversions.cpp:11
armarx::armem::wm::EntityInstance
Client-side working entity instance.
Definition: memory_definitions.h:32
forward_declarations.h
types.h
armarx::armem::robot_state::localization::TransformHelper::lookupTransformChain
static TransformChainResult lookupTransformChain(const armem::wm::CoreSegment &localizationCoreSegment, const TransformQuery &query)
Definition: TransformHelper.cpp:418
armarx::armem::robot_state::localization::TransformQuery
Definition: types.h:74
armarx::armem::base::CoreSegmentBase
Data of a core segment containing multiple provider segments.
Definition: CoreSegmentBase.h:22
armarx::armem::wm::CoreSegment
Client-side working memory core segment.
Definition: memory_definitions.h:119
armarx::armem::robot_state::localization::TransformChainResult
Definition: types.h:53
armarx::armem::robot_state::localization::TransformHelper::lookupTransform
static TransformResult lookupTransform(const armem::wm::CoreSegment &localizationCoreSegment, const TransformQuery &query)
Definition: TransformHelper.cpp:404
armarx::armem::robot_state::localization::TransformHelper
Definition: TransformHelper.h:38
armarx::armem::server::wm::CoreSegment
base::CoreSegmentBase
Definition: memory_definitions.h:86
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::robot_state::constants::localizationCoreSegment
const std::string localizationCoreSegment
Definition: constants.h:29