Nav2 Navigation Stack - rolling  main
ROS 2 Navigation Stack
smoother_exceptions.hpp
1 // Copyright (c) 2022 Joshua Wallace
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 #ifndef NAV2_CORE__SMOOTHER_EXCEPTIONS_HPP_
16 #define NAV2_CORE__SMOOTHER_EXCEPTIONS_HPP_
17 
18 #include <stdexcept>
19 #include <string>
20 
21 namespace nav2_core
22 {
23 
24 class SmootherException : public std::runtime_error
25 {
26 public:
27  explicit SmootherException(const std::string & description)
28  : std::runtime_error(description) {}
29 };
30 
32 {
33 public:
34  explicit InvalidSmoother(const std::string & description)
35  : SmootherException(description) {}
36 };
37 
38 class InvalidPath : public SmootherException
39 {
40 public:
41  explicit InvalidPath(const std::string & description)
42  : SmootherException(description) {}
43 };
44 
46 {
47 public:
48  explicit SmootherTimedOut(const std::string & description)
49  : SmootherException(description) {}
50 };
51 
53 {
54 public:
55  explicit SmoothedPathInCollision(const std::string & description)
56  : SmootherException(description) {}
57 };
58 
60 {
61 public:
62  explicit FailedToSmoothPath(const std::string & description)
63  : SmootherException(description) {}
64 };
65 
66 } // namespace nav2_core
67 #endif // NAV2_CORE__SMOOTHER_EXCEPTIONS_HPP_