_GetFootprint.py
Go to the documentation of this file.
00001 """autogenerated by genpy from cob_footprint_observer/GetFootprintRequest.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 GetFootprintRequest(genpy.Message):
00009   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00010   _type = "cob_footprint_observer/GetFootprintRequest"
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(GetFootprintRequest, 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 cob_footprint_observer/GetFootprintResponse.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 geometry_msgs.msg
00093 import std_msgs.msg
00094 
00095 class GetFootprintResponse(genpy.Message):
00096   _md5sum = "f40d48f5ad16c4c6dbedafd967306675"
00097   _type = "cob_footprint_observer/GetFootprintResponse"
00098   _has_header = False #flag to mark the presence of a Header object
00099   _full_text = """geometry_msgs/PolygonStamped footprint
00100 std_msgs/Bool success
00101 
00102 
00103 ================================================================================
00104 MSG: geometry_msgs/PolygonStamped
00105 # This represents a Polygon with reference coordinate frame and timestamp
00106 Header header
00107 Polygon polygon
00108 
00109 ================================================================================
00110 MSG: std_msgs/Header
00111 # Standard metadata for higher-level stamped data types.
00112 # This is generally used to communicate timestamped data 
00113 # in a particular coordinate frame.
00114 # 
00115 # sequence ID: consecutively increasing ID 
00116 uint32 seq
00117 #Two-integer timestamp that is expressed as:
00118 # * stamp.secs: seconds (stamp_secs) since epoch
00119 # * stamp.nsecs: nanoseconds since stamp_secs
00120 # time-handling sugar is provided by the client library
00121 time stamp
00122 #Frame this data is associated with
00123 # 0: no frame
00124 # 1: global frame
00125 string frame_id
00126 
00127 ================================================================================
00128 MSG: geometry_msgs/Polygon
00129 #A specification of a polygon where the first and last points are assumed to be connected
00130 Point32[] points
00131 
00132 ================================================================================
00133 MSG: geometry_msgs/Point32
00134 # This contains the position of a point in free space(with 32 bits of precision).
00135 # It is recommeded to use Point wherever possible instead of Point32.  
00136 # 
00137 # This recommendation is to promote interoperability.  
00138 #
00139 # This message is designed to take up less space when sending
00140 # lots of points at once, as in the case of a PointCloud.  
00141 
00142 float32 x
00143 float32 y
00144 float32 z
00145 ================================================================================
00146 MSG: std_msgs/Bool
00147 bool data
00148 """
00149   __slots__ = ['footprint','success']
00150   _slot_types = ['geometry_msgs/PolygonStamped','std_msgs/Bool']
00151 
00152   def __init__(self, *args, **kwds):
00153     """
00154     Constructor. Any message fields that are implicitly/explicitly
00155     set to None will be assigned a default value. The recommend
00156     use is keyword arguments as this is more robust to future message
00157     changes.  You cannot mix in-order arguments and keyword arguments.
00158 
00159     The available fields are:
00160        footprint,success
00161 
00162     :param args: complete set of field values, in .msg order
00163     :param kwds: use keyword arguments corresponding to message field names
00164     to set specific fields.
00165     """
00166     if args or kwds:
00167       super(GetFootprintResponse, self).__init__(*args, **kwds)
00168       #message fields cannot be None, assign default values for those that are
00169       if self.footprint is None:
00170         self.footprint = geometry_msgs.msg.PolygonStamped()
00171       if self.success is None:
00172         self.success = std_msgs.msg.Bool()
00173     else:
00174       self.footprint = geometry_msgs.msg.PolygonStamped()
00175       self.success = std_msgs.msg.Bool()
00176 
00177   def _get_types(self):
00178     """
00179     internal API method
00180     """
00181     return self._slot_types
00182 
00183   def serialize(self, buff):
00184     """
00185     serialize message into buffer
00186     :param buff: buffer, ``StringIO``
00187     """
00188     try:
00189       _x = self
00190       buff.write(_struct_3I.pack(_x.footprint.header.seq, _x.footprint.header.stamp.secs, _x.footprint.header.stamp.nsecs))
00191       _x = self.footprint.header.frame_id
00192       length = len(_x)
00193       if python3 or type(_x) == unicode:
00194         _x = _x.encode('utf-8')
00195         length = len(_x)
00196       buff.write(struct.pack('<I%ss'%length, length, _x))
00197       length = len(self.footprint.polygon.points)
00198       buff.write(_struct_I.pack(length))
00199       for val1 in self.footprint.polygon.points:
00200         _x = val1
00201         buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00202       buff.write(_struct_B.pack(self.success.data))
00203     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00204     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00205 
00206   def deserialize(self, str):
00207     """
00208     unpack serialized message in str into this message instance
00209     :param str: byte array of serialized message, ``str``
00210     """
00211     try:
00212       if self.footprint is None:
00213         self.footprint = geometry_msgs.msg.PolygonStamped()
00214       if self.success is None:
00215         self.success = std_msgs.msg.Bool()
00216       end = 0
00217       _x = self
00218       start = end
00219       end += 12
00220       (_x.footprint.header.seq, _x.footprint.header.stamp.secs, _x.footprint.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00221       start = end
00222       end += 4
00223       (length,) = _struct_I.unpack(str[start:end])
00224       start = end
00225       end += length
00226       if python3:
00227         self.footprint.header.frame_id = str[start:end].decode('utf-8')
00228       else:
00229         self.footprint.header.frame_id = str[start:end]
00230       start = end
00231       end += 4
00232       (length,) = _struct_I.unpack(str[start:end])
00233       self.footprint.polygon.points = []
00234       for i in range(0, length):
00235         val1 = geometry_msgs.msg.Point32()
00236         _x = val1
00237         start = end
00238         end += 12
00239         (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00240         self.footprint.polygon.points.append(val1)
00241       start = end
00242       end += 1
00243       (self.success.data,) = _struct_B.unpack(str[start:end])
00244       self.success.data = bool(self.success.data)
00245       return self
00246     except struct.error as e:
00247       raise genpy.DeserializationError(e) #most likely buffer underfill
00248 
00249 
00250   def serialize_numpy(self, buff, numpy):
00251     """
00252     serialize message with numpy array types into buffer
00253     :param buff: buffer, ``StringIO``
00254     :param numpy: numpy python module
00255     """
00256     try:
00257       _x = self
00258       buff.write(_struct_3I.pack(_x.footprint.header.seq, _x.footprint.header.stamp.secs, _x.footprint.header.stamp.nsecs))
00259       _x = self.footprint.header.frame_id
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       length = len(self.footprint.polygon.points)
00266       buff.write(_struct_I.pack(length))
00267       for val1 in self.footprint.polygon.points:
00268         _x = val1
00269         buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00270       buff.write(_struct_B.pack(self.success.data))
00271     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00272     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00273 
00274   def deserialize_numpy(self, str, numpy):
00275     """
00276     unpack serialized message in str into this message instance using numpy for array types
00277     :param str: byte array of serialized message, ``str``
00278     :param numpy: numpy python module
00279     """
00280     try:
00281       if self.footprint is None:
00282         self.footprint = geometry_msgs.msg.PolygonStamped()
00283       if self.success is None:
00284         self.success = std_msgs.msg.Bool()
00285       end = 0
00286       _x = self
00287       start = end
00288       end += 12
00289       (_x.footprint.header.seq, _x.footprint.header.stamp.secs, _x.footprint.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00290       start = end
00291       end += 4
00292       (length,) = _struct_I.unpack(str[start:end])
00293       start = end
00294       end += length
00295       if python3:
00296         self.footprint.header.frame_id = str[start:end].decode('utf-8')
00297       else:
00298         self.footprint.header.frame_id = str[start:end]
00299       start = end
00300       end += 4
00301       (length,) = _struct_I.unpack(str[start:end])
00302       self.footprint.polygon.points = []
00303       for i in range(0, length):
00304         val1 = geometry_msgs.msg.Point32()
00305         _x = val1
00306         start = end
00307         end += 12
00308         (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00309         self.footprint.polygon.points.append(val1)
00310       start = end
00311       end += 1
00312       (self.success.data,) = _struct_B.unpack(str[start:end])
00313       self.success.data = bool(self.success.data)
00314       return self
00315     except struct.error as e:
00316       raise genpy.DeserializationError(e) #most likely buffer underfill
00317 
00318 _struct_I = genpy.struct_I
00319 _struct_3I = struct.Struct("<3I")
00320 _struct_B = struct.Struct("<B")
00321 _struct_3f = struct.Struct("<3f")
00322 class GetFootprint(object):
00323   _type          = 'cob_footprint_observer/GetFootprint'
00324   _md5sum = 'f40d48f5ad16c4c6dbedafd967306675'
00325   _request_class  = GetFootprintRequest
00326   _response_class = GetFootprintResponse


cob_footprint_observer
Author(s): Matthias Gruhler
autogenerated on Sun Oct 5 2014 23:03:46