Easy Navigation
Loading...
Searching...
No Matches
RTTFBuffer.hpp
Go to the documentation of this file.
1// Copyright 2025 Intelligent Robotics Lab
2//
3// This file is part of the project Easy Navigation (EasyNav in short)
4// licensed under the GNU General Public License v3.0.
5// See <http://www.gnu.org/licenses/> for details.
6//
7// Easy Navigation program is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// This program is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20
21#ifndef EASYNAV_COMMON_TYPES__RTTFBUFFER_HPP_
22#define EASYNAV_COMMON_TYPES__RTTFBUFFER_HPP_
23
25
26#include "tf2_ros/buffer.h"
27#include "rclcpp/rclcpp.hpp"
28
29namespace easynav
30{
31
36class RTTFBuffer : public tf2_ros::Buffer, public Singleton<RTTFBuffer>
37{
38public:
39 explicit RTTFBuffer(const rclcpp::Clock::SharedPtr & clock)
40 : tf2_ros::Buffer(clock)
41 {}
42
43 explicit RTTFBuffer()
44 : Buffer(std::make_shared<rclcpp::Clock>(RCL_ROS_TIME))
45 {
46 RCLCPP_WARN(rclcpp::get_logger("RTTFBuffer"),
47 "You should be creating this RTTFBuffer with your clock."
48 "Using default clock RCL_ROS_TIME");
49 }
50
52};
53
54} // namespace easynav
55
56
57#endif // EASYNAV_COMMON_TYPES__RTTFBUFFER_HPP_
#define SINGLETON_DEFINITIONS(ClassName)
Definition Singleton.hpp:75
Provides functionality for RTTFBuffer.
Definition RTTFBuffer.hpp:37
RTTFBuffer()
Definition RTTFBuffer.hpp:43
RTTFBuffer(const rclcpp::Clock::SharedPtr &clock)
Definition RTTFBuffer.hpp:39
Definition RTTFBuffer.hpp:30
Definition PointPerception.hpp:56