00001 """autogenerated by genpy from iri_perception_msgs/CapturePointCloud2Request.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007
00008 class CapturePointCloud2Request(genpy.Message):
00009 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00010 _type = "iri_perception_msgs/CapturePointCloud2Request"
00011 _has_header = False
00012 _full_text = """
00013
00014 """
00015 __slots__ = []
00016 _slot_types = []
00017
00018 def __init__(self, *args, **kwds):
00019 """
00020 Constructor. Any message fields that are implicitly/explicitly
00021 set to None will be assigned a default value. The recommend
00022 use is keyword arguments as this is more robust to future message
00023 changes. You cannot mix in-order arguments and keyword arguments.
00024
00025 The available fields are:
00026
00027
00028 :param args: complete set of field values, in .msg order
00029 :param kwds: use keyword arguments corresponding to message field names
00030 to set specific fields.
00031 """
00032 if args or kwds:
00033 super(CapturePointCloud2Request, self).__init__(*args, **kwds)
00034
00035 def _get_types(self):
00036 """
00037 internal API method
00038 """
00039 return self._slot_types
00040
00041 def serialize(self, buff):
00042 """
00043 serialize message into buffer
00044 :param buff: buffer, ``StringIO``
00045 """
00046 try:
00047 pass
00048 except struct.error as se: self._check_types(se)
00049 except TypeError as te: self._check_types(te)
00050
00051 def deserialize(self, str):
00052 """
00053 unpack serialized message in str into this message instance
00054 :param str: byte array of serialized message, ``str``
00055 """
00056 try:
00057 end = 0
00058 return self
00059 except struct.error as e:
00060 raise genpy.DeserializationError(e)
00061
00062
00063 def serialize_numpy(self, buff, numpy):
00064 """
00065 serialize message with numpy array types into buffer
00066 :param buff: buffer, ``StringIO``
00067 :param numpy: numpy python module
00068 """
00069 try:
00070 pass
00071 except struct.error as se: self._check_types(se)
00072 except TypeError as te: self._check_types(te)
00073
00074 def deserialize_numpy(self, str, numpy):
00075 """
00076 unpack serialized message in str into this message instance using numpy for array types
00077 :param str: byte array of serialized message, ``str``
00078 :param numpy: numpy python module
00079 """
00080 try:
00081 end = 0
00082 return self
00083 except struct.error as e:
00084 raise genpy.DeserializationError(e)
00085
00086 _struct_I = genpy.struct_I
00087 """autogenerated by genpy from iri_perception_msgs/CapturePointCloud2Response.msg. Do not edit."""
00088 import sys
00089 python3 = True if sys.hexversion > 0x03000000 else False
00090 import genpy
00091 import struct
00092
00093 import std_msgs.msg
00094 import sensor_msgs.msg
00095
00096 class CapturePointCloud2Response(genpy.Message):
00097 _md5sum = "56680b720436a8fbd002ea7abe6966e1"
00098 _type = "iri_perception_msgs/CapturePointCloud2Response"
00099 _has_header = False
00100 _full_text = """
00101 sensor_msgs/PointCloud2 pointcloud
00102
00103
00104 ================================================================================
00105 MSG: sensor_msgs/PointCloud2
00106 # This message holds a collection of N-dimensional points, which may
00107 # contain additional information such as normals, intensity, etc. The
00108 # point data is stored as a binary blob, its layout described by the
00109 # contents of the "fields" array.
00110
00111 # The point cloud data may be organized 2d (image-like) or 1d
00112 # (unordered). Point clouds organized as 2d images may be produced by
00113 # camera depth sensors such as stereo or time-of-flight.
00114
00115 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00116 # points).
00117 Header header
00118
00119 # 2D structure of the point cloud. If the cloud is unordered, height is
00120 # 1 and width is the length of the point cloud.
00121 uint32 height
00122 uint32 width
00123
00124 # Describes the channels and their layout in the binary data blob.
00125 PointField[] fields
00126
00127 bool is_bigendian # Is this data bigendian?
00128 uint32 point_step # Length of a point in bytes
00129 uint32 row_step # Length of a row in bytes
00130 uint8[] data # Actual point data, size is (row_step*height)
00131
00132 bool is_dense # True if there are no invalid points
00133
00134 ================================================================================
00135 MSG: std_msgs/Header
00136 # Standard metadata for higher-level stamped data types.
00137 # This is generally used to communicate timestamped data
00138 # in a particular coordinate frame.
00139 #
00140 # sequence ID: consecutively increasing ID
00141 uint32 seq
00142 #Two-integer timestamp that is expressed as:
00143 # * stamp.secs: seconds (stamp_secs) since epoch
00144 # * stamp.nsecs: nanoseconds since stamp_secs
00145 # time-handling sugar is provided by the client library
00146 time stamp
00147 #Frame this data is associated with
00148 # 0: no frame
00149 # 1: global frame
00150 string frame_id
00151
00152 ================================================================================
00153 MSG: sensor_msgs/PointField
00154 # This message holds the description of one point entry in the
00155 # PointCloud2 message format.
00156 uint8 INT8 = 1
00157 uint8 UINT8 = 2
00158 uint8 INT16 = 3
00159 uint8 UINT16 = 4
00160 uint8 INT32 = 5
00161 uint8 UINT32 = 6
00162 uint8 FLOAT32 = 7
00163 uint8 FLOAT64 = 8
00164
00165 string name # Name of field
00166 uint32 offset # Offset from start of point struct
00167 uint8 datatype # Datatype enumeration, see above
00168 uint32 count # How many elements in the field
00169
00170 """
00171 __slots__ = ['pointcloud']
00172 _slot_types = ['sensor_msgs/PointCloud2']
00173
00174 def __init__(self, *args, **kwds):
00175 """
00176 Constructor. Any message fields that are implicitly/explicitly
00177 set to None will be assigned a default value. The recommend
00178 use is keyword arguments as this is more robust to future message
00179 changes. You cannot mix in-order arguments and keyword arguments.
00180
00181 The available fields are:
00182 pointcloud
00183
00184 :param args: complete set of field values, in .msg order
00185 :param kwds: use keyword arguments corresponding to message field names
00186 to set specific fields.
00187 """
00188 if args or kwds:
00189 super(CapturePointCloud2Response, self).__init__(*args, **kwds)
00190
00191 if self.pointcloud is None:
00192 self.pointcloud = sensor_msgs.msg.PointCloud2()
00193 else:
00194 self.pointcloud = sensor_msgs.msg.PointCloud2()
00195
00196 def _get_types(self):
00197 """
00198 internal API method
00199 """
00200 return self._slot_types
00201
00202 def serialize(self, buff):
00203 """
00204 serialize message into buffer
00205 :param buff: buffer, ``StringIO``
00206 """
00207 try:
00208 _x = self
00209 buff.write(_struct_3I.pack(_x.pointcloud.header.seq, _x.pointcloud.header.stamp.secs, _x.pointcloud.header.stamp.nsecs))
00210 _x = self.pointcloud.header.frame_id
00211 length = len(_x)
00212 if python3 or type(_x) == unicode:
00213 _x = _x.encode('utf-8')
00214 length = len(_x)
00215 buff.write(struct.pack('<I%ss'%length, length, _x))
00216 _x = self
00217 buff.write(_struct_2I.pack(_x.pointcloud.height, _x.pointcloud.width))
00218 length = len(self.pointcloud.fields)
00219 buff.write(_struct_I.pack(length))
00220 for val1 in self.pointcloud.fields:
00221 _x = val1.name
00222 length = len(_x)
00223 if python3 or type(_x) == unicode:
00224 _x = _x.encode('utf-8')
00225 length = len(_x)
00226 buff.write(struct.pack('<I%ss'%length, length, _x))
00227 _x = val1
00228 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00229 _x = self
00230 buff.write(_struct_B2I.pack(_x.pointcloud.is_bigendian, _x.pointcloud.point_step, _x.pointcloud.row_step))
00231 _x = self.pointcloud.data
00232 length = len(_x)
00233
00234 if type(_x) in [list, tuple]:
00235 buff.write(struct.pack('<I%sB'%length, length, *_x))
00236 else:
00237 buff.write(struct.pack('<I%ss'%length, length, _x))
00238 buff.write(_struct_B.pack(self.pointcloud.is_dense))
00239 except struct.error as se: self._check_types(se)
00240 except TypeError as te: self._check_types(te)
00241
00242 def deserialize(self, str):
00243 """
00244 unpack serialized message in str into this message instance
00245 :param str: byte array of serialized message, ``str``
00246 """
00247 try:
00248 if self.pointcloud is None:
00249 self.pointcloud = sensor_msgs.msg.PointCloud2()
00250 end = 0
00251 _x = self
00252 start = end
00253 end += 12
00254 (_x.pointcloud.header.seq, _x.pointcloud.header.stamp.secs, _x.pointcloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00255 start = end
00256 end += 4
00257 (length,) = _struct_I.unpack(str[start:end])
00258 start = end
00259 end += length
00260 if python3:
00261 self.pointcloud.header.frame_id = str[start:end].decode('utf-8')
00262 else:
00263 self.pointcloud.header.frame_id = str[start:end]
00264 _x = self
00265 start = end
00266 end += 8
00267 (_x.pointcloud.height, _x.pointcloud.width,) = _struct_2I.unpack(str[start:end])
00268 start = end
00269 end += 4
00270 (length,) = _struct_I.unpack(str[start:end])
00271 self.pointcloud.fields = []
00272 for i in range(0, length):
00273 val1 = sensor_msgs.msg.PointField()
00274 start = end
00275 end += 4
00276 (length,) = _struct_I.unpack(str[start:end])
00277 start = end
00278 end += length
00279 if python3:
00280 val1.name = str[start:end].decode('utf-8')
00281 else:
00282 val1.name = str[start:end]
00283 _x = val1
00284 start = end
00285 end += 9
00286 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00287 self.pointcloud.fields.append(val1)
00288 _x = self
00289 start = end
00290 end += 9
00291 (_x.pointcloud.is_bigendian, _x.pointcloud.point_step, _x.pointcloud.row_step,) = _struct_B2I.unpack(str[start:end])
00292 self.pointcloud.is_bigendian = bool(self.pointcloud.is_bigendian)
00293 start = end
00294 end += 4
00295 (length,) = _struct_I.unpack(str[start:end])
00296 start = end
00297 end += length
00298 if python3:
00299 self.pointcloud.data = str[start:end].decode('utf-8')
00300 else:
00301 self.pointcloud.data = str[start:end]
00302 start = end
00303 end += 1
00304 (self.pointcloud.is_dense,) = _struct_B.unpack(str[start:end])
00305 self.pointcloud.is_dense = bool(self.pointcloud.is_dense)
00306 return self
00307 except struct.error as e:
00308 raise genpy.DeserializationError(e)
00309
00310
00311 def serialize_numpy(self, buff, numpy):
00312 """
00313 serialize message with numpy array types into buffer
00314 :param buff: buffer, ``StringIO``
00315 :param numpy: numpy python module
00316 """
00317 try:
00318 _x = self
00319 buff.write(_struct_3I.pack(_x.pointcloud.header.seq, _x.pointcloud.header.stamp.secs, _x.pointcloud.header.stamp.nsecs))
00320 _x = self.pointcloud.header.frame_id
00321 length = len(_x)
00322 if python3 or type(_x) == unicode:
00323 _x = _x.encode('utf-8')
00324 length = len(_x)
00325 buff.write(struct.pack('<I%ss'%length, length, _x))
00326 _x = self
00327 buff.write(_struct_2I.pack(_x.pointcloud.height, _x.pointcloud.width))
00328 length = len(self.pointcloud.fields)
00329 buff.write(_struct_I.pack(length))
00330 for val1 in self.pointcloud.fields:
00331 _x = val1.name
00332 length = len(_x)
00333 if python3 or type(_x) == unicode:
00334 _x = _x.encode('utf-8')
00335 length = len(_x)
00336 buff.write(struct.pack('<I%ss'%length, length, _x))
00337 _x = val1
00338 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00339 _x = self
00340 buff.write(_struct_B2I.pack(_x.pointcloud.is_bigendian, _x.pointcloud.point_step, _x.pointcloud.row_step))
00341 _x = self.pointcloud.data
00342 length = len(_x)
00343
00344 if type(_x) in [list, tuple]:
00345 buff.write(struct.pack('<I%sB'%length, length, *_x))
00346 else:
00347 buff.write(struct.pack('<I%ss'%length, length, _x))
00348 buff.write(_struct_B.pack(self.pointcloud.is_dense))
00349 except struct.error as se: self._check_types(se)
00350 except TypeError as te: self._check_types(te)
00351
00352 def deserialize_numpy(self, str, numpy):
00353 """
00354 unpack serialized message in str into this message instance using numpy for array types
00355 :param str: byte array of serialized message, ``str``
00356 :param numpy: numpy python module
00357 """
00358 try:
00359 if self.pointcloud is None:
00360 self.pointcloud = sensor_msgs.msg.PointCloud2()
00361 end = 0
00362 _x = self
00363 start = end
00364 end += 12
00365 (_x.pointcloud.header.seq, _x.pointcloud.header.stamp.secs, _x.pointcloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00366 start = end
00367 end += 4
00368 (length,) = _struct_I.unpack(str[start:end])
00369 start = end
00370 end += length
00371 if python3:
00372 self.pointcloud.header.frame_id = str[start:end].decode('utf-8')
00373 else:
00374 self.pointcloud.header.frame_id = str[start:end]
00375 _x = self
00376 start = end
00377 end += 8
00378 (_x.pointcloud.height, _x.pointcloud.width,) = _struct_2I.unpack(str[start:end])
00379 start = end
00380 end += 4
00381 (length,) = _struct_I.unpack(str[start:end])
00382 self.pointcloud.fields = []
00383 for i in range(0, length):
00384 val1 = sensor_msgs.msg.PointField()
00385 start = end
00386 end += 4
00387 (length,) = _struct_I.unpack(str[start:end])
00388 start = end
00389 end += length
00390 if python3:
00391 val1.name = str[start:end].decode('utf-8')
00392 else:
00393 val1.name = str[start:end]
00394 _x = val1
00395 start = end
00396 end += 9
00397 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00398 self.pointcloud.fields.append(val1)
00399 _x = self
00400 start = end
00401 end += 9
00402 (_x.pointcloud.is_bigendian, _x.pointcloud.point_step, _x.pointcloud.row_step,) = _struct_B2I.unpack(str[start:end])
00403 self.pointcloud.is_bigendian = bool(self.pointcloud.is_bigendian)
00404 start = end
00405 end += 4
00406 (length,) = _struct_I.unpack(str[start:end])
00407 start = end
00408 end += length
00409 if python3:
00410 self.pointcloud.data = str[start:end].decode('utf-8')
00411 else:
00412 self.pointcloud.data = str[start:end]
00413 start = end
00414 end += 1
00415 (self.pointcloud.is_dense,) = _struct_B.unpack(str[start:end])
00416 self.pointcloud.is_dense = bool(self.pointcloud.is_dense)
00417 return self
00418 except struct.error as e:
00419 raise genpy.DeserializationError(e)
00420
00421 _struct_I = genpy.struct_I
00422 _struct_IBI = struct.Struct("<IBI")
00423 _struct_3I = struct.Struct("<3I")
00424 _struct_B = struct.Struct("<B")
00425 _struct_2I = struct.Struct("<2I")
00426 _struct_B2I = struct.Struct("<B2I")
00427 class CapturePointCloud2(object):
00428 _type = 'iri_perception_msgs/CapturePointCloud2'
00429 _md5sum = '56680b720436a8fbd002ea7abe6966e1'
00430 _request_class = CapturePointCloud2Request
00431 _response_class = CapturePointCloud2Response