-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathPositionCommand.h
400 lines (319 loc) · 11.1 KB
/
PositionCommand.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
// Generated by gencpp from file quadrotor_msgs/PositionCommand.msg
// DO NOT EDIT!
#ifndef QUADROTOR_MSGS_MESSAGE_POSITIONCOMMAND_H
#define QUADROTOR_MSGS_MESSAGE_POSITIONCOMMAND_H
#include <string>
#include <vector>
#include <map>
#include <ros/types.h>
#include <ros/serialization.h>
#include <ros/builtin_message_traits.h>
#include <ros/message_operations.h>
#include <std_msgs/Header.h>
#include <geometry_msgs/Point.h>
#include <geometry_msgs/Vector3.h>
#include <geometry_msgs/Vector3.h>
namespace quadrotor_msgs
{
template <class ContainerAllocator>
struct PositionCommand_
{
typedef PositionCommand_<ContainerAllocator> Type;
PositionCommand_()
: header()
, position()
, velocity()
, acceleration()
, yaw(0.0)
, yaw_dot(0.0)
, kx()
, kv()
, trajectory_id(0)
, trajectory_flag(0) {
kx.assign(0.0);
kv.assign(0.0);
}
PositionCommand_(const ContainerAllocator& _alloc)
: header(_alloc)
, position(_alloc)
, velocity(_alloc)
, acceleration(_alloc)
, yaw(0.0)
, yaw_dot(0.0)
, kx()
, kv()
, trajectory_id(0)
, trajectory_flag(0) {
(void)_alloc;
kx.assign(0.0);
kv.assign(0.0);
}
typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
_header_type header;
typedef ::geometry_msgs::Point_<ContainerAllocator> _position_type;
_position_type position;
typedef ::geometry_msgs::Vector3_<ContainerAllocator> _velocity_type;
_velocity_type velocity;
typedef ::geometry_msgs::Vector3_<ContainerAllocator> _acceleration_type;
_acceleration_type acceleration;
typedef double _yaw_type;
_yaw_type yaw;
typedef double _yaw_dot_type;
_yaw_dot_type yaw_dot;
typedef boost::array<double, 3> _kx_type;
_kx_type kx;
typedef boost::array<double, 3> _kv_type;
_kv_type kv;
typedef uint32_t _trajectory_id_type;
_trajectory_id_type trajectory_id;
typedef uint8_t _trajectory_flag_type;
_trajectory_flag_type trajectory_flag;
// reducing the odds to have name collisions with Windows.h
#if defined(_WIN32) && defined(TRAJECTORY_STATUS_EMPTY)
#undef TRAJECTORY_STATUS_EMPTY
#endif
#if defined(_WIN32) && defined(TRAJECTORY_STATUS_READY)
#undef TRAJECTORY_STATUS_READY
#endif
#if defined(_WIN32) && defined(TRAJECTORY_STATUS_COMPLETED)
#undef TRAJECTORY_STATUS_COMPLETED
#endif
#if defined(_WIN32) && defined(TRAJECTROY_STATUS_ABORT)
#undef TRAJECTROY_STATUS_ABORT
#endif
#if defined(_WIN32) && defined(TRAJECTORY_STATUS_ILLEGAL_START)
#undef TRAJECTORY_STATUS_ILLEGAL_START
#endif
#if defined(_WIN32) && defined(TRAJECTORY_STATUS_ILLEGAL_FINAL)
#undef TRAJECTORY_STATUS_ILLEGAL_FINAL
#endif
#if defined(_WIN32) && defined(TRAJECTORY_STATUS_IMPOSSIBLE)
#undef TRAJECTORY_STATUS_IMPOSSIBLE
#endif
enum {
TRAJECTORY_STATUS_EMPTY = 0u,
TRAJECTORY_STATUS_READY = 1u,
TRAJECTORY_STATUS_COMPLETED = 3u,
TRAJECTROY_STATUS_ABORT = 4u,
TRAJECTORY_STATUS_ILLEGAL_START = 5u,
TRAJECTORY_STATUS_ILLEGAL_FINAL = 6u,
TRAJECTORY_STATUS_IMPOSSIBLE = 7u,
};
typedef boost::shared_ptr< ::quadrotor_msgs::PositionCommand_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::quadrotor_msgs::PositionCommand_<ContainerAllocator> const> ConstPtr;
}; // struct PositionCommand_
typedef ::quadrotor_msgs::PositionCommand_<std::allocator<void> > PositionCommand;
typedef boost::shared_ptr< ::quadrotor_msgs::PositionCommand > PositionCommandPtr;
typedef boost::shared_ptr< ::quadrotor_msgs::PositionCommand const> PositionCommandConstPtr;
// constants requiring out of line definition
template<typename ContainerAllocator>
std::ostream& operator<<(std::ostream& s, const ::quadrotor_msgs::PositionCommand_<ContainerAllocator> & v)
{
ros::message_operations::Printer< ::quadrotor_msgs::PositionCommand_<ContainerAllocator> >::stream(s, "", v);
return s;
}
template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator==(const ::quadrotor_msgs::PositionCommand_<ContainerAllocator1> & lhs, const ::quadrotor_msgs::PositionCommand_<ContainerAllocator2> & rhs)
{
return lhs.header == rhs.header &&
lhs.position == rhs.position &&
lhs.velocity == rhs.velocity &&
lhs.acceleration == rhs.acceleration &&
lhs.yaw == rhs.yaw &&
lhs.yaw_dot == rhs.yaw_dot &&
lhs.kx == rhs.kx &&
lhs.kv == rhs.kv &&
lhs.trajectory_id == rhs.trajectory_id &&
lhs.trajectory_flag == rhs.trajectory_flag;
}
template<typename ContainerAllocator1, typename ContainerAllocator2>
bool operator!=(const ::quadrotor_msgs::PositionCommand_<ContainerAllocator1> & lhs, const ::quadrotor_msgs::PositionCommand_<ContainerAllocator2> & rhs)
{
return !(lhs == rhs);
}
} // namespace quadrotor_msgs
namespace ros
{
namespace message_traits
{
template <class ContainerAllocator>
struct IsFixedSize< ::quadrotor_msgs::PositionCommand_<ContainerAllocator> >
: FalseType
{ };
template <class ContainerAllocator>
struct IsFixedSize< ::quadrotor_msgs::PositionCommand_<ContainerAllocator> const>
: FalseType
{ };
template <class ContainerAllocator>
struct IsMessage< ::quadrotor_msgs::PositionCommand_<ContainerAllocator> >
: TrueType
{ };
template <class ContainerAllocator>
struct IsMessage< ::quadrotor_msgs::PositionCommand_<ContainerAllocator> const>
: TrueType
{ };
template <class ContainerAllocator>
struct HasHeader< ::quadrotor_msgs::PositionCommand_<ContainerAllocator> >
: TrueType
{ };
template <class ContainerAllocator>
struct HasHeader< ::quadrotor_msgs::PositionCommand_<ContainerAllocator> const>
: TrueType
{ };
template<class ContainerAllocator>
struct MD5Sum< ::quadrotor_msgs::PositionCommand_<ContainerAllocator> >
{
static const char* value()
{
return "4712f0609ca29a79af79a35ca3e3967a";
}
static const char* value(const ::quadrotor_msgs::PositionCommand_<ContainerAllocator>&) { return value(); }
static const uint64_t static_value1 = 0x4712f0609ca29a79ULL;
static const uint64_t static_value2 = 0xaf79a35ca3e3967aULL;
};
template<class ContainerAllocator>
struct DataType< ::quadrotor_msgs::PositionCommand_<ContainerAllocator> >
{
static const char* value()
{
return "quadrotor_msgs/PositionCommand";
}
static const char* value(const ::quadrotor_msgs::PositionCommand_<ContainerAllocator>&) { return value(); }
};
template<class ContainerAllocator>
struct Definition< ::quadrotor_msgs::PositionCommand_<ContainerAllocator> >
{
static const char* value()
{
return "Header header\n"
"geometry_msgs/Point position\n"
"geometry_msgs/Vector3 velocity\n"
"geometry_msgs/Vector3 acceleration\n"
"float64 yaw\n"
"float64 yaw_dot\n"
"float64[3] kx\n"
"float64[3] kv \n"
"\n"
"uint32 trajectory_id\n"
"\n"
"uint8 TRAJECTORY_STATUS_EMPTY = 0\n"
"uint8 TRAJECTORY_STATUS_READY = 1\n"
"uint8 TRAJECTORY_STATUS_COMPLETED = 3\n"
"uint8 TRAJECTROY_STATUS_ABORT = 4\n"
"uint8 TRAJECTORY_STATUS_ILLEGAL_START = 5\n"
"uint8 TRAJECTORY_STATUS_ILLEGAL_FINAL = 6\n"
"uint8 TRAJECTORY_STATUS_IMPOSSIBLE = 7\n"
"\n"
"# Its ID number will start from 1, allowing you comparing it with 0.\n"
"uint8 trajectory_flag\n"
"\n"
"================================================================================\n"
"MSG: std_msgs/Header\n"
"# Standard metadata for higher-level stamped data types.\n"
"# This is generally used to communicate timestamped data \n"
"# in a particular coordinate frame.\n"
"# \n"
"# sequence ID: consecutively increasing ID \n"
"uint32 seq\n"
"#Two-integer timestamp that is expressed as:\n"
"# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')\n"
"# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')\n"
"# time-handling sugar is provided by the client library\n"
"time stamp\n"
"#Frame this data is associated with\n"
"string frame_id\n"
"\n"
"================================================================================\n"
"MSG: geometry_msgs/Point\n"
"# This contains the position of a point in free space\n"
"float64 x\n"
"float64 y\n"
"float64 z\n"
"\n"
"================================================================================\n"
"MSG: geometry_msgs/Vector3\n"
"# This represents a vector in free space. \n"
"# It is only meant to represent a direction. Therefore, it does not\n"
"# make sense to apply a translation to it (e.g., when applying a \n"
"# generic rigid transformation to a Vector3, tf2 will only apply the\n"
"# rotation). If you want your data to be translatable too, use the\n"
"# geometry_msgs/Point message instead.\n"
"\n"
"float64 x\n"
"float64 y\n"
"float64 z\n"
;
}
static const char* value(const ::quadrotor_msgs::PositionCommand_<ContainerAllocator>&) { return value(); }
};
} // namespace message_traits
} // namespace ros
namespace ros
{
namespace serialization
{
template<class ContainerAllocator> struct Serializer< ::quadrotor_msgs::PositionCommand_<ContainerAllocator> >
{
template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
{
stream.next(m.header);
stream.next(m.position);
stream.next(m.velocity);
stream.next(m.acceleration);
stream.next(m.yaw);
stream.next(m.yaw_dot);
stream.next(m.kx);
stream.next(m.kv);
stream.next(m.trajectory_id);
stream.next(m.trajectory_flag);
}
ROS_DECLARE_ALLINONE_SERIALIZER
}; // struct PositionCommand_
} // namespace serialization
} // namespace ros
namespace ros
{
namespace message_operations
{
template<class ContainerAllocator>
struct Printer< ::quadrotor_msgs::PositionCommand_<ContainerAllocator> >
{
template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::quadrotor_msgs::PositionCommand_<ContainerAllocator>& v)
{
s << indent << "header: ";
s << std::endl;
Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
s << indent << "position: ";
s << std::endl;
Printer< ::geometry_msgs::Point_<ContainerAllocator> >::stream(s, indent + " ", v.position);
s << indent << "velocity: ";
s << std::endl;
Printer< ::geometry_msgs::Vector3_<ContainerAllocator> >::stream(s, indent + " ", v.velocity);
s << indent << "acceleration: ";
s << std::endl;
Printer< ::geometry_msgs::Vector3_<ContainerAllocator> >::stream(s, indent + " ", v.acceleration);
s << indent << "yaw: ";
Printer<double>::stream(s, indent + " ", v.yaw);
s << indent << "yaw_dot: ";
Printer<double>::stream(s, indent + " ", v.yaw_dot);
s << indent << "kx[]" << std::endl;
for (size_t i = 0; i < v.kx.size(); ++i)
{
s << indent << " kx[" << i << "]: ";
Printer<double>::stream(s, indent + " ", v.kx[i]);
}
s << indent << "kv[]" << std::endl;
for (size_t i = 0; i < v.kv.size(); ++i)
{
s << indent << " kv[" << i << "]: ";
Printer<double>::stream(s, indent + " ", v.kv[i]);
}
s << indent << "trajectory_id: ";
Printer<uint32_t>::stream(s, indent + " ", v.trajectory_id);
s << indent << "trajectory_flag: ";
Printer<uint8_t>::stream(s, indent + " ", v.trajectory_flag);
}
};
} // namespace message_operations
} // namespace ros
#endif // QUADROTOR_MSGS_MESSAGE_POSITIONCOMMAND_H