AWViz-ROS
Loading...
Searching...
No Matches
entity_path_resolver.hpp
Go to the documentation of this file.
1// Copyright 2024 Kotaro Uetake.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef AWVIZ_COMMON__TRANSFORMATION__ENTITY_PATH_RESOLVER_HPP_
16#define AWVIZ_COMMON__TRANSFORMATION__ENTITY_PATH_RESOLVER_HPP_
17
19
20#include <memory>
21#include <mutex>
22#include <string>
23#include <unordered_map>
24
25namespace awviz_common
26{
31{
32public:
34 std::shared_ptr<TfTree> tf_tree, std::shared_ptr<std::mutex> tf_tree_mtx,
35 std::shared_ptr<std::mutex> entities_mtx);
36
37 void update_entity(const TfFrame & frame);
38
39 std::shared_ptr<std::unordered_map<std::string, std::string>> entities() const;
40
41private:
42 std::shared_ptr<TfTree> tf_tree_;
43 std::shared_ptr<std::unordered_map<std::string, std::string>> entities_;
44 std::shared_ptr<std::mutex> tf_tree_mtx_;
45 std::shared_ptr<std::mutex> entities_mtx_;
46};
47} // namespace awviz_common
48
49#endif // AWVIZ_COMMON__TRANSFORMATION__ENTITY_PATH_RESOLVER_HPP_
Default resolver that uses TfTree to build entity paths.
Definition: entity_path_resolver.hpp:31
void update_entity(const TfFrame &frame)
Definition: entity_path_resolver.cpp:38
std::shared_ptr< std::unordered_map< std::string, std::string > > entities() const
Definition: entity_path_resolver.cpp:32
A class to represent a TF frame information.
Definition: tf_tree.hpp:36
Definition: display.hpp:32