include
psen_scan_v2
zoneset_msg_builder.h
Go to the documentation of this file.
1
// Copyright (c) 2021 Pilz GmbH & Co. KG
2
//
3
// This program is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU Lesser General Public License as published by
5
// the Free Software Foundation, either version 3 of the License, or
6
// (at your option) any later version.
7
//
8
// This program is distributed in the hope that it will be useful,
9
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
// GNU Lesser General Public License for more details.
12
//
13
// You should have received a copy of the GNU Lesser General Public License
14
// along with this program. If not, see <https://www.gnu.org/licenses/>.
15
16
#ifndef PSEN_SCAN_V2_ZONESET_MSG_BUILDER_H
17
#define PSEN_SCAN_V2_ZONESET_MSG_BUILDER_H
18
19
#include <cstdint>
20
#include <string>
21
22
#include <
ros/time.h
>
23
#include <geometry_msgs/Polygon.h>
24
25
#include "psen_scan_v2/ZoneSet.h"
26
27
namespace
psen_scan_v2
28
{
29
class
ZoneSetMsgBuilder
30
{
31
public
:
32
ZoneSet
build
()
const
;
33
34
public
:
35
ZoneSetMsgBuilder
&
headerSeq
(uint32_t header_seq);
36
ZoneSetMsgBuilder
&
headerStamp
(
const
ros::Time
& header_stamp);
37
ZoneSetMsgBuilder
&
headerFrameId
(
const
std::string& header_frame_id);
38
ZoneSetMsgBuilder
&
safety1
(
const
geometry_msgs::Polygon&
safety1
);
39
ZoneSetMsgBuilder
&
safety2
(
const
geometry_msgs::Polygon&
safety2
);
40
ZoneSetMsgBuilder
&
safety3
(
const
geometry_msgs::Polygon&
safety3
);
41
ZoneSetMsgBuilder
&
warn1
(
const
geometry_msgs::Polygon&
warn1
);
42
ZoneSetMsgBuilder
&
warn2
(
const
geometry_msgs::Polygon&
warn2
);
43
ZoneSetMsgBuilder
&
muting1
(
const
geometry_msgs::Polygon&
muting1
);
44
ZoneSetMsgBuilder
&
muting2
(
const
geometry_msgs::Polygon&
muting2
);
45
ZoneSetMsgBuilder
&
safety1Sub0
(
const
geometry_msgs::Polygon& safety1_Sub0);
46
ZoneSetMsgBuilder
&
safety2Sub0
(
const
geometry_msgs::Polygon& safety2_Sub0);
47
ZoneSetMsgBuilder
&
safety3Sub0
(
const
geometry_msgs::Polygon& safety3_Sub0);
48
ZoneSetMsgBuilder
&
warn1Sub0
(
const
geometry_msgs::Polygon& warn1_Sub0);
49
ZoneSetMsgBuilder
&
warn2Sub0
(
const
geometry_msgs::Polygon& warn2_Sub0);
50
ZoneSetMsgBuilder
&
muting1Sub0
(
const
geometry_msgs::Polygon& muting1_Sub0);
51
ZoneSetMsgBuilder
&
muting2Sub0
(
const
geometry_msgs::Polygon& muting2_Sub0);
52
ZoneSetMsgBuilder
&
safety1Sub1
(
const
geometry_msgs::Polygon& safety1_Sub1);
53
ZoneSetMsgBuilder
&
safety2Sub1
(
const
geometry_msgs::Polygon& safety2_Sub1);
54
ZoneSetMsgBuilder
&
safety3Sub1
(
const
geometry_msgs::Polygon& safety3_Sub1);
55
ZoneSetMsgBuilder
&
warn1Sub1
(
const
geometry_msgs::Polygon& warn1_Sub1);
56
ZoneSetMsgBuilder
&
warn2Sub1
(
const
geometry_msgs::Polygon& warn2_Sub1);
57
ZoneSetMsgBuilder
&
muting1Sub1
(
const
geometry_msgs::Polygon& muting1_Sub1);
58
ZoneSetMsgBuilder
&
muting2Sub1
(
const
geometry_msgs::Polygon& muting2_Sub1);
59
ZoneSetMsgBuilder
&
safety1Sub2
(
const
geometry_msgs::Polygon& safety1_Sub2);
60
ZoneSetMsgBuilder
&
safety2Sub2
(
const
geometry_msgs::Polygon& safety2_Sub2);
61
ZoneSetMsgBuilder
&
safety3Sub2
(
const
geometry_msgs::Polygon& safety3_Sub2);
62
ZoneSetMsgBuilder
&
warn1Sub2
(
const
geometry_msgs::Polygon& warn1_Sub2);
63
ZoneSetMsgBuilder
&
warn2Sub2
(
const
geometry_msgs::Polygon& warn2_Sub2);
64
ZoneSetMsgBuilder
&
muting1Sub2
(
const
geometry_msgs::Polygon& muting1_Sub2);
65
ZoneSetMsgBuilder
&
muting2Sub2
(
const
geometry_msgs::Polygon& muting2_Sub2);
66
ZoneSetMsgBuilder
&
speedLower
(
const
float
& speed_lower);
67
ZoneSetMsgBuilder
&
speedUpper
(
const
float
& speed_upper);
68
69
private
:
70
ZoneSet
zoneset_msg_
;
71
};
72
73
inline
ZoneSet
ZoneSetMsgBuilder::build
()
const
74
{
75
return
zoneset_msg_
;
76
}
77
78
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::headerSeq
(uint32_t seq)
79
{
80
zoneset_msg_
.header.seq = seq;
81
return
*
this
;
82
}
83
84
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::headerStamp
(
const
ros::Time
& stamp)
85
{
86
zoneset_msg_
.header.stamp = stamp;
87
return
*
this
;
88
}
89
90
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::headerFrameId
(
const
std::string& frame_id)
91
{
92
zoneset_msg_
.header.frame_id = frame_id;
93
return
*
this
;
94
}
95
96
// ZoneSetMsgBuilder Master
97
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::safety1
(
const
geometry_msgs::Polygon& safety1)
98
{
99
zoneset_msg_
.safety1 =
safety1
;
100
return
*
this
;
101
}
102
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::safety2
(
const
geometry_msgs::Polygon& safety2)
103
{
104
zoneset_msg_
.safety2 =
safety2
;
105
return
*
this
;
106
}
107
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::safety3
(
const
geometry_msgs::Polygon& safety3)
108
{
109
zoneset_msg_
.safety3 =
safety3
;
110
return
*
this
;
111
}
112
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::warn1
(
const
geometry_msgs::Polygon& warn1)
113
{
114
zoneset_msg_
.warn1 =
warn1
;
115
return
*
this
;
116
}
117
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::warn2
(
const
geometry_msgs::Polygon& warn2)
118
{
119
zoneset_msg_
.warn2 =
warn2
;
120
return
*
this
;
121
}
122
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::muting1
(
const
geometry_msgs::Polygon& muting1)
123
{
124
zoneset_msg_
.muting1 =
muting1
;
125
return
*
this
;
126
}
127
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::muting2
(
const
geometry_msgs::Polygon& muting2)
128
{
129
zoneset_msg_
.muting2 =
muting2
;
130
return
*
this
;
131
}
132
133
// ZoneSetMsgBuilder Subscriber0
134
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::safety1Sub0
(
const
geometry_msgs::Polygon& safety1_Sub0)
135
{
136
zoneset_msg_
.safety1_Sub0 = safety1_Sub0;
137
return
*
this
;
138
}
139
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::safety2Sub0
(
const
geometry_msgs::Polygon& safety2_Sub0)
140
{
141
zoneset_msg_
.safety2_Sub0 = safety2_Sub0;
142
return
*
this
;
143
}
144
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::safety3Sub0
(
const
geometry_msgs::Polygon& safety3_Sub0)
145
{
146
zoneset_msg_
.safety3_Sub0 = safety3_Sub0;
147
return
*
this
;
148
}
149
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::warn1Sub0
(
const
geometry_msgs::Polygon& warn1_Sub0)
150
{
151
zoneset_msg_
.warn1_Sub0 = warn1_Sub0;
152
return
*
this
;
153
}
154
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::warn2Sub0
(
const
geometry_msgs::Polygon& warn2_Sub0)
155
{
156
zoneset_msg_
.warn2_Sub0 = warn2_Sub0;
157
return
*
this
;
158
}
159
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::muting1Sub0
(
const
geometry_msgs::Polygon& muting1_Sub0)
160
{
161
zoneset_msg_
.muting1_Sub0 = muting1_Sub0;
162
return
*
this
;
163
}
164
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::muting2Sub0
(
const
geometry_msgs::Polygon& muting2_Sub0)
165
{
166
zoneset_msg_
.muting2_Sub0 = muting2_Sub0;
167
return
*
this
;
168
}
169
170
// ZoneSetMsgBuilder Subscriber1
171
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::safety1Sub1
(
const
geometry_msgs::Polygon& safety1_Sub1)
172
{
173
zoneset_msg_
.safety1_Sub1 = safety1_Sub1;
174
return
*
this
;
175
}
176
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::safety2Sub1
(
const
geometry_msgs::Polygon& safety2_Sub1)
177
{
178
zoneset_msg_
.safety2_Sub1 = safety2_Sub1;
179
return
*
this
;
180
}
181
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::safety3Sub1
(
const
geometry_msgs::Polygon& safety3_Sub1)
182
{
183
zoneset_msg_
.safety3_Sub1 = safety3_Sub1;
184
return
*
this
;
185
}
186
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::warn1Sub1
(
const
geometry_msgs::Polygon& warn1_Sub1)
187
{
188
zoneset_msg_
.warn1_Sub1 = warn1_Sub1;
189
return
*
this
;
190
}
191
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::warn2Sub1
(
const
geometry_msgs::Polygon& warn2_Sub1)
192
{
193
zoneset_msg_
.warn2_Sub1 = warn2_Sub1;
194
return
*
this
;
195
}
196
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::muting1Sub1
(
const
geometry_msgs::Polygon& muting1_Sub1)
197
{
198
zoneset_msg_
.muting1_Sub1 = muting1_Sub1;
199
return
*
this
;
200
}
201
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::muting2Sub1
(
const
geometry_msgs::Polygon& muting2_Sub1)
202
{
203
zoneset_msg_
.muting2_Sub1 = muting2_Sub1;
204
return
*
this
;
205
}
206
207
// ZoneSetMsgBuilder Subscriber2
208
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::safety1Sub2
(
const
geometry_msgs::Polygon& safety1_Sub2)
209
{
210
zoneset_msg_
.safety1_Sub2 = safety1_Sub2;
211
return
*
this
;
212
}
213
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::safety2Sub2
(
const
geometry_msgs::Polygon& safety2_Sub2)
214
{
215
zoneset_msg_
.safety2_Sub2 = safety2_Sub2;
216
return
*
this
;
217
}
218
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::safety3Sub2
(
const
geometry_msgs::Polygon& safety3_Sub2)
219
{
220
zoneset_msg_
.safety3_Sub2 = safety3_Sub2;
221
return
*
this
;
222
}
223
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::warn1Sub2
(
const
geometry_msgs::Polygon& warn1_Sub2)
224
{
225
zoneset_msg_
.warn1_Sub2 = warn1_Sub2;
226
return
*
this
;
227
}
228
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::warn2Sub2
(
const
geometry_msgs::Polygon& warn2_Sub2)
229
{
230
zoneset_msg_
.warn2_Sub2 = warn2_Sub2;
231
return
*
this
;
232
}
233
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::muting1Sub2
(
const
geometry_msgs::Polygon& muting1_Sub2)
234
{
235
zoneset_msg_
.muting1_Sub2 = muting1_Sub2;
236
return
*
this
;
237
}
238
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::muting2Sub2
(
const
geometry_msgs::Polygon& muting2_Sub2)
239
{
240
zoneset_msg_
.muting2_Sub2 = muting2_Sub2;
241
return
*
this
;
242
}
243
244
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::speedLower
(
const
float
& speed_lower)
245
{
246
zoneset_msg_
.speed_lower = speed_lower;
247
return
*
this
;
248
}
249
250
inline
ZoneSetMsgBuilder
&
ZoneSetMsgBuilder::speedUpper
(
const
float
& speed_upper)
251
{
252
zoneset_msg_
.speed_upper = speed_upper;
253
return
*
this
;
254
}
255
256
}
// namespace psen_scan_v2
257
258
#endif // PSEN_SCAN_V2_ZONESET_MSG_BUILDER_H
psen_scan_v2::ZoneSetMsgBuilder::muting1Sub2
ZoneSetMsgBuilder & muting1Sub2(const geometry_msgs::Polygon &muting1_Sub2)
Definition:
zoneset_msg_builder.h:233
psen_scan_v2::ZoneSetMsgBuilder::muting2
ZoneSetMsgBuilder & muting2(const geometry_msgs::Polygon &muting2)
Definition:
zoneset_msg_builder.h:127
psen_scan_v2::ZoneSetMsgBuilder::safety1Sub0
ZoneSetMsgBuilder & safety1Sub0(const geometry_msgs::Polygon &safety1_Sub0)
Definition:
zoneset_msg_builder.h:134
psen_scan_v2::ZoneSetMsgBuilder::build
ZoneSet build() const
Definition:
zoneset_msg_builder.h:73
psen_scan_v2::ZoneSetMsgBuilder::warn1Sub1
ZoneSetMsgBuilder & warn1Sub1(const geometry_msgs::Polygon &warn1_Sub1)
Definition:
zoneset_msg_builder.h:186
psen_scan_v2::ZoneSetMsgBuilder::warn1Sub0
ZoneSetMsgBuilder & warn1Sub0(const geometry_msgs::Polygon &warn1_Sub0)
Definition:
zoneset_msg_builder.h:149
psen_scan_v2::ZoneSetMsgBuilder::headerStamp
ZoneSetMsgBuilder & headerStamp(const ros::Time &header_stamp)
Definition:
zoneset_msg_builder.h:84
psen_scan_v2::ZoneSetMsgBuilder::zoneset_msg_
ZoneSet zoneset_msg_
Definition:
zoneset_msg_builder.h:70
psen_scan_v2::ZoneSetMsgBuilder::safety1
ZoneSetMsgBuilder & safety1(const geometry_msgs::Polygon &safety1)
Definition:
zoneset_msg_builder.h:97
psen_scan_v2::ZoneSetMsgBuilder::muting2Sub2
ZoneSetMsgBuilder & muting2Sub2(const geometry_msgs::Polygon &muting2_Sub2)
Definition:
zoneset_msg_builder.h:238
psen_scan_v2::ZoneSetMsgBuilder::headerSeq
ZoneSetMsgBuilder & headerSeq(uint32_t header_seq)
Definition:
zoneset_msg_builder.h:78
psen_scan_v2::ZoneSetMsgBuilder::safety3Sub1
ZoneSetMsgBuilder & safety3Sub1(const geometry_msgs::Polygon &safety3_Sub1)
Definition:
zoneset_msg_builder.h:181
psen_scan_v2::ZoneSetMsgBuilder::safety3Sub0
ZoneSetMsgBuilder & safety3Sub0(const geometry_msgs::Polygon &safety3_Sub0)
Definition:
zoneset_msg_builder.h:144
psen_scan_v2::ZoneSetMsgBuilder::warn2Sub2
ZoneSetMsgBuilder & warn2Sub2(const geometry_msgs::Polygon &warn2_Sub2)
Definition:
zoneset_msg_builder.h:228
time.h
psen_scan_v2::ZoneSetMsgBuilder::safety2
ZoneSetMsgBuilder & safety2(const geometry_msgs::Polygon &safety2)
Definition:
zoneset_msg_builder.h:102
psen_scan_v2::ZoneSetMsgBuilder::safety2Sub0
ZoneSetMsgBuilder & safety2Sub0(const geometry_msgs::Polygon &safety2_Sub0)
Definition:
zoneset_msg_builder.h:139
psen_scan_v2::ZoneSetMsgBuilder::speedUpper
ZoneSetMsgBuilder & speedUpper(const float &speed_upper)
Definition:
zoneset_msg_builder.h:250
psen_scan_v2::ZoneSetMsgBuilder::speedLower
ZoneSetMsgBuilder & speedLower(const float &speed_lower)
Definition:
zoneset_msg_builder.h:244
psen_scan_v2::ZoneSetMsgBuilder::muting1Sub1
ZoneSetMsgBuilder & muting1Sub1(const geometry_msgs::Polygon &muting1_Sub1)
Definition:
zoneset_msg_builder.h:196
psen_scan_v2::ZoneSetMsgBuilder::warn2
ZoneSetMsgBuilder & warn2(const geometry_msgs::Polygon &warn2)
Definition:
zoneset_msg_builder.h:117
psen_scan_v2::ZoneSetMsgBuilder::safety3Sub2
ZoneSetMsgBuilder & safety3Sub2(const geometry_msgs::Polygon &safety3_Sub2)
Definition:
zoneset_msg_builder.h:218
psen_scan_v2::ZoneSetMsgBuilder::muting1Sub0
ZoneSetMsgBuilder & muting1Sub0(const geometry_msgs::Polygon &muting1_Sub0)
Definition:
zoneset_msg_builder.h:159
psen_scan_v2::ZoneSetMsgBuilder::muting2Sub1
ZoneSetMsgBuilder & muting2Sub1(const geometry_msgs::Polygon &muting2_Sub1)
Definition:
zoneset_msg_builder.h:201
psen_scan_v2
Root namespace for the ROS part.
Definition:
active_zoneset_node.h:29
psen_scan_v2::ZoneSetMsgBuilder::warn1Sub2
ZoneSetMsgBuilder & warn1Sub2(const geometry_msgs::Polygon &warn1_Sub2)
Definition:
zoneset_msg_builder.h:223
psen_scan_v2::ZoneSetMsgBuilder::muting1
ZoneSetMsgBuilder & muting1(const geometry_msgs::Polygon &muting1)
Definition:
zoneset_msg_builder.h:122
psen_scan_v2::ZoneSetMsgBuilder::safety2Sub1
ZoneSetMsgBuilder & safety2Sub1(const geometry_msgs::Polygon &safety2_Sub1)
Definition:
zoneset_msg_builder.h:176
psen_scan_v2::ZoneSetMsgBuilder::muting2Sub0
ZoneSetMsgBuilder & muting2Sub0(const geometry_msgs::Polygon &muting2_Sub0)
Definition:
zoneset_msg_builder.h:164
ros::Time
psen_scan_v2::ZoneSetMsgBuilder::warn2Sub1
ZoneSetMsgBuilder & warn2Sub1(const geometry_msgs::Polygon &warn2_Sub1)
Definition:
zoneset_msg_builder.h:191
psen_scan_v2::ZoneSetMsgBuilder::safety3
ZoneSetMsgBuilder & safety3(const geometry_msgs::Polygon &safety3)
Definition:
zoneset_msg_builder.h:107
psen_scan_v2::ZoneSetMsgBuilder::warn1
ZoneSetMsgBuilder & warn1(const geometry_msgs::Polygon &warn1)
Definition:
zoneset_msg_builder.h:112
psen_scan_v2::ZoneSetMsgBuilder::safety2Sub2
ZoneSetMsgBuilder & safety2Sub2(const geometry_msgs::Polygon &safety2_Sub2)
Definition:
zoneset_msg_builder.h:213
psen_scan_v2::ZoneSetMsgBuilder::warn2Sub0
ZoneSetMsgBuilder & warn2Sub0(const geometry_msgs::Polygon &warn2_Sub0)
Definition:
zoneset_msg_builder.h:154
psen_scan_v2::ZoneSetMsgBuilder::headerFrameId
ZoneSetMsgBuilder & headerFrameId(const std::string &header_frame_id)
Definition:
zoneset_msg_builder.h:90
psen_scan_v2::ZoneSetMsgBuilder::safety1Sub1
ZoneSetMsgBuilder & safety1Sub1(const geometry_msgs::Polygon &safety1_Sub1)
Definition:
zoneset_msg_builder.h:171
psen_scan_v2::ZoneSetMsgBuilder::safety1Sub2
ZoneSetMsgBuilder & safety1Sub2(const geometry_msgs::Polygon &safety1_Sub2)
Definition:
zoneset_msg_builder.h:208
psen_scan_v2::ZoneSetMsgBuilder
Definition:
zoneset_msg_builder.h:29
psen_scan_v2
Author(s): Pilz GmbH + Co. KG
autogenerated on Sat Jun 22 2024 02:46:12