Nav2 Navigation Stack - rolling  main
ROS 2 Navigation Stack
route_exceptions.hpp
1 // Copyright (c) 2023, Samsung Research America
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__ROUTE_EXCEPTIONS_HPP_
16 #define NAV2_CORE__ROUTE_EXCEPTIONS_HPP_
17 
18 #include <stdexcept>
19 #include <string>
20 #include <memory>
21 
22 namespace nav2_core
23 {
24 
25 class RouteException : public std::runtime_error
26 {
27 public:
28  explicit RouteException(const std::string & description)
29  : std::runtime_error(description) {}
30 };
31 
33 {
34 public:
35  explicit OperationFailed(const std::string & description)
36  : RouteException(description) {}
37 };
38 
40 {
41 public:
42  explicit NoValidRouteCouldBeFound(const std::string & description)
43  : RouteException(description) {}
44 };
45 
46 class TimedOut : public RouteException
47 {
48 public:
49  explicit TimedOut(const std::string & description)
50  : RouteException(description) {}
51 };
52 
54 {
55 public:
56  explicit RouteTFError(const std::string & description)
57  : RouteException(description) {}
58 };
59 
61 {
62 public:
63  explicit NoValidGraph(const std::string & description)
64  : RouteException(description) {}
65 };
66 
68 {
69 public:
70  explicit IndeterminantNodesOnGraph(const std::string & description)
71  : RouteException(description) {}
72 };
73 
75 {
76 public:
77  explicit InvalidEdgeScorerUse(const std::string & description)
78  : RouteException(description) {}
79 };
80 
81 } // namespace nav2_core
82 
83 #endif // NAV2_CORE__ROUTE_EXCEPTIONS_HPP_