mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
Loading...
Searching...
No Matches
safety_zone.h
1// clang: TomasFormat
2#ifndef MRS_LIB_SAFETYZONE_H
3#define MRS_LIB_SAFETYZONE_H
4
5#include <mrs_lib/safety_zone/polygon.h>
6#include <eigen3/Eigen/Eigen>
7
8namespace mrs_lib
9{
10
11namespace safety_zone
12{
13
14struct BorderError : public std::exception
15{
16 const char* what() const throw() {
17 return "SafeZone: Wrong configuration for the border";
18 }
19};
20
22public:
23 SafetyZone(std::shared_ptr<Polygon> outerBorder);
24
25 SafetyZone(const Eigen::MatrixXd& outerBorderMatrix);
26
27 bool isPointValid(const double px, const double py);
28 bool isPathValid(const double p1x, const double p1y, const double p2x, const double p2y);
29
30 Polygon getBorder();
31
32private:
33 std::shared_ptr<Polygon> outerBorder;
34};
35
36} // namespace safety_zone
37 //
38} // namespace mrs_lib
39
40#endif // MRS_LIB_SAFETYZONE_H
Definition polygon.h:38
Definition safety_zone.h:21
All mrs_lib functions, classes, variables and definitions are contained in this namespace.
Definition attitude_converter.h:24
Definition safety_zone.h:15