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
8
namespace
mrs_lib
9
{
10
11
namespace
safety_zone
12
{
13
14
struct
BorderError
:
public
std::exception
15
{
16
const
char
* what()
const
throw
() {
17
return
"SafeZone: Wrong configuration for the border"
;
18
}
19
};
20
21
class
SafetyZone
{
22
public
:
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
32
private
:
33
std::shared_ptr<Polygon> outerBorder;
34
};
35
36
}
// namespace safety_zone
37
//
38
}
// namespace mrs_lib
39
40
#endif
// MRS_LIB_SAFETYZONE_H
mrs_lib::safety_zone::Polygon
Definition
polygon.h:38
mrs_lib::safety_zone::SafetyZone
Definition
safety_zone.h:21
mrs_lib
All mrs_lib functions, classes, variables and definitions are contained in this namespace.
Definition
attitude_converter.h:24
mrs_lib::safety_zone::BorderError
Definition
safety_zone.h:15
include
mrs_lib
safety_zone.h
Generated by
1.9.8