Nav2 Navigation Stack - rolling  main
ROS 2 Navigation Stack
docking_exceptions.hpp
1 // Copyright (c) 2024 Open Navigation LLC
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 OPENNAV_DOCKING_CORE__DOCKING_EXCEPTIONS_HPP_
16 #define OPENNAV_DOCKING_CORE__DOCKING_EXCEPTIONS_HPP_
17 
18 #include <stdexcept>
19 #include <string>
20 #include <memory>
21 
22 namespace opennav_docking_core
23 {
24 
29 class DockingException : public std::runtime_error
30 {
31 public:
32  explicit DockingException(const std::string & description)
33  : std::runtime_error(description) {}
34 };
35 
41 {
42 public:
43  explicit DockingTFError(const std::string & description)
44  : DockingException(description) {}
45 };
46 
52 {
53 public:
54  explicit DockNotInDB(const std::string & description)
55  : DockingException(description) {}
56 };
57 
63 {
64 public:
65  explicit DockNotValid(const std::string & description)
66  : DockingException(description) {}
67 };
68 
74 {
75 public:
76  explicit FailedToStage(const std::string & description)
77  : DockingException(description) {}
78 };
79 
85 {
86 public:
87  explicit FailedToDetectDock(const std::string & description)
88  : DockingException(description) {}
89 };
90 
96 {
97 public:
98  explicit FailedToControl(const std::string & description)
99  : DockingException(description) {}
100 };
101 
107 {
108 public:
109  explicit FailedToCharge(const std::string & description)
110  : DockingException(description) {}
111 };
112 
113 } // namespace opennav_docking_core
114 
115 #endif // OPENNAV_DOCKING_CORE__DOCKING_EXCEPTIONS_HPP_
Dock was not found in the provided dock database.
Dock plugin provided in the database or action was invalid.
A required transform was unavailable or stale.
Failed to control into or out of the dock.
Failed to detect the charging dock.
Failed to navigate to the staging pose.