Easy Navigation
Toggle main menu visibility
Loading...
Searching...
No Matches
easynav_maps_manager
include
easynav_maps_manager
fault_injection
FaultyMapsManager.hpp
Go to the documentation of this file.
1
// Copyright 2026 Intelligent Robotics Lab
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
18
19
#ifndef EASYNAV_MAPS_MANAGER__FAULT_INJECTION__FAULTYMAPSMANAGER_HPP_
20
#define EASYNAV_MAPS_MANAGER__FAULT_INJECTION__FAULTYMAPSMANAGER_HPP_
21
22
#include <string>
23
24
#include "easynav_core/MapsManagerBase.hpp"
25
26
namespace
easynav
27
{
28
39
class
FaultyMapsManager
:
public
MapsManagerBase
40
{
41
public
:
43
void
on_initialize
()
override
;
44
46
void
update
(
NavState
& nav_state)
override
;
47
49
[[nodiscard]]
int
updates
()
const
{
return
updates_;}
50
51
private
:
52
std::string fault_ {
"none"
};
53
int
fault_after_ {0};
54
double
hang_time_ {1.0};
55
56
int
updates_ {0};
57
};
58
59
}
// namespace easynav
60
61
#endif
// EASYNAV_MAPS_MANAGER__FAULT_INJECTION__FAULTYMAPSMANAGER_HPP_
easynav::FaultyMapsManager
Maps manager that misbehaves on purpose, to test how EasyNav copes with it.
Definition
FaultyMapsManager.hpp:40
easynav::FaultyMapsManager::update
void update(NavState &nav_state) override
Does nothing, or injects the fault.
Definition
FaultyMapsManager.cpp:52
easynav::FaultyMapsManager::updates
int updates() const
Updates run so far (to check that it keeps being called).
Definition
FaultyMapsManager.hpp:49
easynav::FaultyMapsManager::on_initialize
void on_initialize() override
Reads the parameters; throws on an unknown fault.
Definition
FaultyMapsManager.cpp:32
easynav::NavState
A generic, type-safe, thread-safe blackboard to hold runtime state.
Definition
NavState.hpp:87
easynav
Definition
CircularBuffer.hpp:24
Generated by
1.18.0