orwell 0.0.0
StoppingCriterion.hpp
1/*
2 Copyright (c) Tobias Löw
3 Written by Tobias Löw <https://tobiloew.ch>
4
5 This file is part of orwell.
6
7 gafro is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 3 as
9 published by the Free Software Foundation.
10
11 gafro is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with gafro. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#pragma once
21
22namespace orwell
23{
24
25 template <int dof>
27
34 template <int dof>
36 {
37 public:
42 StoppingCriterion() = default;
43
48 virtual ~StoppingCriterion() = default;
49
57 virtual bool isFinished(const RobotState<dof> &robot_state) const = 0;
58
59 protected:
60 private:
61 };
62
63} // namespace orwell
describes the RobotState
base class for a stopping criterion for a Controller
virtual bool isFinished(const RobotState< dof > &robot_state) const =0
implement this function in derived classes to check whether the stopping criterion has been reached