Easy Navigation
Loading...
Searching...
No Matches
DummyLocalizer.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
22
23#ifndef EASYNAV_LOCALIZER__DUMMYLOCALIZER_HPP_
24#define EASYNAV_LOCALIZER__DUMMYLOCALIZER_HPP_
25
26#include <expected>
27
28#include "nav_msgs/msg/odometry.hpp"
29#include "easynav_core/LocalizerMethodBase.hpp"
30#include "tf2_ros/transform_broadcaster.h"
31
32namespace easynav
33{
34
42class DummyLocalizer : public easynav::LocalizerMethodBase
43{
44public:
46 DummyLocalizer() = default;
47
49 ~DummyLocalizer() = default;
50
56 virtual std::expected<void, std::string> on_initialize() override;
57
65 virtual void update_rt(NavState & nav_state) override;
66
74 virtual void update(NavState & nav_state) override;
75
76private:
78 nav_msgs::msg::Odometry robot_pose_;
79
80 std::unique_ptr<tf2_ros::TransformBroadcaster> tf_broadcaster_;
81
82 double cycle_time_rt_ {0.0};
83 double cycle_time_nort_ {0.0};
84};
85
86} // namespace easynav
87
88#endif // EASYNAV_LOCALIZER__DUMMYLOCALIZER_HPP_
virtual void update(NavState &nav_state) override
Update the localization using the current navigation state.
Definition DummyLocalizer.cpp:62
DummyLocalizer()=default
Default constructor.
virtual void update_rt(NavState &nav_state) override
Update the localization using the current navigation state.
Definition DummyLocalizer.cpp:46
virtual std::expected< void, std::string > on_initialize() override
Plugin-specific initialization logic.
Definition DummyLocalizer.cpp:31
~DummyLocalizer()=default
Default destructor.
A generic, type-safe, lock-free blackboard to hold runtime state.
Definition NavState.hpp:62
Definition RTTFBuffer.hpp:30