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


map_msgs
Author(s): Stéphane Magnenat
autogenerated on Fri May 31 2013 08:22:01