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