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


sr_robot_msgs
Author(s): Ugo Cupcic/ugo@shadowrobot.com
autogenerated on Mon Oct 6 2014 07:40:05