|
| 1 | +/* |
| 2 | + * This file is part of the CoverageControl library |
| 3 | + * |
| 4 | + * Author: Saurav Agarwal |
| 5 | + |
| 6 | + * Repository: https://github.com/KumarRobotics/CoverageControl |
| 7 | + * |
| 8 | + * Copyright (c) 2024, Saurav Agarwal |
| 9 | + * |
| 10 | + * The CoverageControl library is free software: you can redistribute it and/or |
| 11 | + * modify it under the terms of the GNU General Public License as published by |
| 12 | + * the Free Software Foundation, either version 3 of the License, or (at your |
| 13 | + * option) any later version. |
| 14 | + * |
| 15 | + * The CoverageControl library is distributed in the hope that it will be |
| 16 | + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| 18 | + * Public License for more details. |
| 19 | + * |
| 20 | + * You should have received a copy of the GNU General Public License along with |
| 21 | + * CoverageControl library. If not, see <https://www.gnu.org/licenses/>. |
| 22 | + */ |
| 23 | + |
| 24 | +/*! |
| 25 | + * \file abstract_controller.h |
| 26 | + * \brief Contains the abstract class for coverage control algorithms |
| 27 | + */ |
| 28 | + |
| 29 | +#ifndef CPPSRC_CORE_INCLUDE_COVERAGECONTROL_ALGORITHMS_ABSTRACT_CONTROLLER_H_ |
| 30 | +#define CPPSRC_CORE_INCLUDE_COVERAGECONTROL_ALGORITHMS_ABSTRACT_CONTROLLER_H_ |
| 31 | + |
| 32 | +#include "CoverageControl/typedefs.h" |
| 33 | +#include "CoverageControl/parameters.h" |
| 34 | +#include "CoverageControl/coverage_system.h" |
| 35 | + |
| 36 | +namespace CoverageControl { |
| 37 | + |
| 38 | +/*! |
| 39 | + * \addtogroup cpp_api |
| 40 | + * @{ |
| 41 | + * \class AbstractController |
| 42 | + * @} |
| 43 | + * The class AbstractController is an abstract class for coverage control |
| 44 | + *algorithms. It provides a common interface for all coverage control |
| 45 | + *algorithms. Pure virtual functions: GetActions and ComputeActions |
| 46 | + **/ |
| 47 | +class AbstractController { |
| 48 | + public: |
| 49 | + /*! |
| 50 | + * Pure virtual function to get the actions for the robots |
| 51 | + * \return The actions for the robots |
| 52 | + **/ |
| 53 | + virtual PointVector GetActions() = 0; |
| 54 | + |
| 55 | + /*! |
| 56 | + * Pure virtual function to compute the actions for the robots |
| 57 | + * \return True if the actions are computed successfully, false otherwise |
| 58 | + **/ |
| 59 | + virtual bool ComputeActions() = 0; |
| 60 | +}; |
| 61 | + |
| 62 | +} /* namespace CoverageControl */ |
| 63 | +#endif // CPPSRC_CORE_INCLUDE_COVERAGECONTROL_ALGORITHMS_ABSTRACT_CONTROLLER_H_ |
0 commit comments