Nav2 Navigation Stack - kilted  kilted
ROS 2 Navigation Stack
controller_exceptions.hpp
1 // Copyright (c) 2022. Joshua Wallace
2 // Licensed under the Apache License, Version 2.0 (the "License");
3 // you may not use this file except in compliance with the License.
4 // You may obtain a copy of the License at
5 //
6 // http://www.apache.org/licenses/LICENSE-2.0
7 //
8 // Unless required by applicable law or agreed to in writing, software
9 // distributed under the License is distributed on an "AS IS" BASIS,
10 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 // See the License for the specific language governing permissions and
12 // limitations under the License.
13 
14 #ifndef NAV2_CORE__CONTROLLER_EXCEPTIONS_HPP_
15 #define NAV2_CORE__CONTROLLER_EXCEPTIONS_HPP_
16 
17 #include <stdexcept>
18 #include <string>
19 
20 namespace nav2_core
21 {
22 
23 class ControllerException : public std::runtime_error
24 {
25 public:
26  explicit ControllerException(const std::string & description)
27  : std::runtime_error(description) {}
28 };
29 
31 {
32 public:
33  explicit InvalidController(const std::string & description)
34  : ControllerException(description) {}
35 };
36 
38 {
39 public:
40  explicit ControllerTFError(const std::string & description)
41  : ControllerException(description) {}
42 };
43 
45 {
46 public:
47  explicit FailedToMakeProgress(const std::string & description)
48  : ControllerException(description) {}
49 };
50 
52 {
53 public:
54  explicit PatienceExceeded(const std::string & description)
55  : ControllerException(description) {}
56 };
57 
59 {
60 public:
61  explicit InvalidPath(const std::string & description)
62  : ControllerException(description) {}
63 };
64 
66 {
67 public:
68  explicit NoValidControl(const std::string & description)
69  : ControllerException(description) {}
70 };
71 
73 {
74 public:
75  explicit ControllerTimedOut(const std::string & description)
76  : ControllerException(description) {}
77 };
78 
79 } // namespace nav2_core
80 
81 #endif // NAV2_CORE__CONTROLLER_EXCEPTIONS_HPP_