SegmentationZone.cpp
Go to the documentation of this file.
1 
12 // RAIL Segmentation
14 
15 // C++ Standard Library
16 #include <limits>
17 
18 using namespace std;
19 using namespace rail::segmentation;
20 
21 SegmentationZone::SegmentationZone(const string &name, const string &parent_frame_id, const string &child_frame_id,
22  const string &bounding_frame_id, const string &segmentation_frame_id)
23  : name_(name), parent_frame_id_(parent_frame_id), child_frame_id_(child_frame_id),
24  bounding_frame_id_(bounding_frame_id), segmentation_frame_id_(segmentation_frame_id)
25 {
26  // default remove and require surface
27  remove_surface_ = true;
28  require_surface_ = false;
29 
30  // set default limits
31  roll_min_ = -numeric_limits<double>::infinity();
32  pitch_min_ = -numeric_limits<double>::infinity();
33  yaw_min_ = -numeric_limits<double>::infinity();
34  x_min_ = -numeric_limits<double>::infinity();
35  y_min_ = -numeric_limits<double>::infinity();
36  z_min_ = -numeric_limits<double>::infinity();
37 
38  roll_max_ = numeric_limits<double>::infinity();
39  pitch_max_ = numeric_limits<double>::infinity();
40  yaw_max_ = numeric_limits<double>::infinity();
41  x_max_ = numeric_limits<double>::infinity();
42  y_max_ = numeric_limits<double>::infinity();
43  z_max_ = numeric_limits<double>::infinity();
44 }
45 
46 void SegmentationZone::setRemoveSurface(const bool remove_surface)
47 {
48  remove_surface_ = remove_surface;
49 }
50 
52 {
53  return remove_surface_;
54 }
55 
56 void SegmentationZone::setRequireSurface(const bool require_surface)
57 {
58  require_surface_ = require_surface;
59 }
60 
62 {
63  return require_surface_;
64 }
65 
66 void SegmentationZone::setName(const string &name)
67 {
68  name_ = name;
69 }
70 
71 const string &SegmentationZone::getName() const
72 {
73  return name_;
74 }
75 
76 void SegmentationZone::setParentFrameID(const string &parent_frame_id)
77 {
78  parent_frame_id_ = parent_frame_id;
79 }
80 
82 {
83  return parent_frame_id_;
84 }
85 
86 void SegmentationZone::setChildFrameID(const string &child_frame_id)
87 {
88  child_frame_id_ = child_frame_id;
89 }
90 
91 const string &SegmentationZone::getChildFrameID() const
92 {
93  return child_frame_id_;
94 }
95 
96 void SegmentationZone::setSegmentationFrameID(const string &segmentation_frame_id)
97 {
98  segmentation_frame_id_ = segmentation_frame_id;
99 }
100 
102 {
103  return segmentation_frame_id_;
104 }
105 
106 void SegmentationZone::setBoundingFrameID(const string &bounding_frame_id)
107 {
108  bounding_frame_id_ = bounding_frame_id;
109 }
110 
112 {
113  return bounding_frame_id_;
114 }
115 
116 void SegmentationZone::setRollMin(const double roll_min)
117 {
118  roll_min_ = roll_min;
119 }
120 
122 {
123  return roll_min_;
124 }
125 
126 void SegmentationZone::setRollMax(const double roll_max)
127 {
128  roll_max_ = roll_max;
129 }
130 
132 {
133  return roll_max_;
134 }
135 
136 void SegmentationZone::setPitchMin(const double pitch_min)
137 {
138  pitch_min_ = pitch_min;
139 }
140 
142 {
143  return pitch_min_;
144 }
145 
146 void SegmentationZone::setPitchMax(const double pitch_max)
147 {
148  pitch_max_ = pitch_max;
149 }
150 
152 {
153  return pitch_max_;
154 }
155 
156 void SegmentationZone::setYawMin(const double yaw_min)
157 {
158  yaw_min_ = yaw_min;
159 }
160 
162 {
163  return yaw_min_;
164 }
165 
166 void SegmentationZone::setYawMax(const double yaw_max)
167 {
168  yaw_max_ = yaw_max;
169 }
170 
172 {
173  return yaw_max_;
174 }
175 
176 
177 void SegmentationZone::setXMin(const double x_min)
178 {
179  x_min_ = x_min;
180 }
181 
183 {
184  return x_min_;
185 }
186 
187 void SegmentationZone::setXMax(const double x_max)
188 {
189  x_max_ = x_max;
190 }
191 
193 {
194  return x_max_;
195 }
196 
197 void SegmentationZone::setYMin(const double y_min)
198 {
199  y_min_ = y_min;
200 }
201 
203 {
204  return y_min_;
205 }
206 
207 void SegmentationZone::setYMax(const double y_max)
208 {
209  y_max_ = y_max;
210 }
211 
213 {
214  return y_max_;
215 }
216 
217 void SegmentationZone::setZMin(const double z_min)
218 {
219  z_min_ = z_min;
220 }
221 
223 {
224  return z_min_;
225 }
226 
227 void SegmentationZone::setZMax(const double z_max)
228 {
229  z_max_ = z_max;
230 }
231 
233 {
234  return z_max_;
235 }
void setName(const std::string &name)
Name value mutator.
bool getRequireSurface() const
Remove surface value accessor.
double getYawMax() const
Yaw max value accessor.
double getYMax() const
Y max value accessor.
void setYawMin(const double yaw_min)
Yaw min value mutator.
bool getRemoveSurface() const
Remove surface value accessor.
double getZMin() const
Z min value accessor.
void setZMin(const double z_min)
Z min value mutator.
double getYMin() const
Y min value accessor.
void setBoundingFrameID(const std::string &bounding_frame_id)
Bounding frame ID value mutator.
const std::string & getBoundingFrameID() const
Segmentation frame ID value accessor.
void setYawMax(const double yaw_max)
Yaw max value mutator.
double getYawMin() const
Yaw min value accessor.
double getXMax() const
X max value accessor.
double getXMin() const
X min value accessor.
void setPitchMin(const double pitch_min)
Pitch min value mutator.
void setChildFrameID(const std::string &child_frame_id)
Child frame ID value mutator.
void setPitchMax(const double pitch_max)
Pitch max value mutator.
const std::string & getName() const
Name value accessor.
void setRollMin(const double roll_min)
Roll min value mutator.
void setYMin(const double y_min)
Y min value mutator.
double getRollMin() const
Roll min value accessor.
void setRequireSurface(const bool require_surface)
Require surface value mutator.
void setXMax(const double x_max)
X max value mutator.
void setZMax(const double z_max)
Z max value mutator.
double getPitchMax() const
Pitch max value accessor.
void setParentFrameID(const std::string &parent_frame_id)
Parent frame ID value mutator.
The criteria for a segmentation zone.
double getZMax() const
Z max value accessor.
const std::string & getParentFrameID() const
Parent frame ID value accessor.
double getRollMax() const
Roll max value accessor.
double getPitchMin() const
Pitch min value accessor.
const std::string & getChildFrameID() const
Child frame ID value accessor.
void setXMin(const double x_min)
X min value mutator.
void setRollMax(const double roll_max)
Roll max value mutator.
void setYMax(const double y_max)
Y max value mutator.
void setSegmentationFrameID(const std::string &segmentation_frame_id)
Segmentation frame ID value mutator.
const std::string & getSegmentationFrameID() const
Segmentation frame ID value accessor.
void setRemoveSurface(const bool remove_surface)
Remove surface value mutator.


rail_segmentation
Author(s): Russell Toris , David Kent
autogenerated on Mon Feb 28 2022 23:23:51