_TableDetectionServ.py
Go to the documentation of this file.
00001 """autogenerated by genpy from coverage_3d_tools/TableDetectionServRequest.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 TableDetectionServRequest(genpy.Message):
00009   _md5sum = "de103e18d4860fc762bd5a4178b3a259"
00010   _type = "coverage_3d_tools/TableDetectionServRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """int64 type
00013 int64 redetect
00014 
00015 """
00016   __slots__ = ['type','redetect']
00017   _slot_types = ['int64','int64']
00018 
00019   def __init__(self, *args, **kwds):
00020     """
00021     Constructor. Any message fields that are implicitly/explicitly
00022     set to None will be assigned a default value. The recommend
00023     use is keyword arguments as this is more robust to future message
00024     changes.  You cannot mix in-order arguments and keyword arguments.
00025 
00026     The available fields are:
00027        type,redetect
00028 
00029     :param args: complete set of field values, in .msg order
00030     :param kwds: use keyword arguments corresponding to message field names
00031     to set specific fields.
00032     """
00033     if args or kwds:
00034       super(TableDetectionServRequest, self).__init__(*args, **kwds)
00035       #message fields cannot be None, assign default values for those that are
00036       if self.type is None:
00037         self.type = 0
00038       if self.redetect is None:
00039         self.redetect = 0
00040     else:
00041       self.type = 0
00042       self.redetect = 0
00043 
00044   def _get_types(self):
00045     """
00046     internal API method
00047     """
00048     return self._slot_types
00049 
00050   def serialize(self, buff):
00051     """
00052     serialize message into buffer
00053     :param buff: buffer, ``StringIO``
00054     """
00055     try:
00056       _x = self
00057       buff.write(_struct_2q.pack(_x.type, _x.redetect))
00058     except struct.error as se: self._check_types(se)
00059     except TypeError as te: self._check_types(te)
00060 
00061   def deserialize(self, str):
00062     """
00063     unpack serialized message in str into this message instance
00064     :param str: byte array of serialized message, ``str``
00065     """
00066     try:
00067       end = 0
00068       _x = self
00069       start = end
00070       end += 16
00071       (_x.type, _x.redetect,) = _struct_2q.unpack(str[start:end])
00072       return self
00073     except struct.error as e:
00074       raise genpy.DeserializationError(e) #most likely buffer underfill
00075 
00076 
00077   def serialize_numpy(self, buff, numpy):
00078     """
00079     serialize message with numpy array types into buffer
00080     :param buff: buffer, ``StringIO``
00081     :param numpy: numpy python module
00082     """
00083     try:
00084       _x = self
00085       buff.write(_struct_2q.pack(_x.type, _x.redetect))
00086     except struct.error as se: self._check_types(se)
00087     except TypeError as te: self._check_types(te)
00088 
00089   def deserialize_numpy(self, str, numpy):
00090     """
00091     unpack serialized message in str into this message instance using numpy for array types
00092     :param str: byte array of serialized message, ``str``
00093     :param numpy: numpy python module
00094     """
00095     try:
00096       end = 0
00097       _x = self
00098       start = end
00099       end += 16
00100       (_x.type, _x.redetect,) = _struct_2q.unpack(str[start:end])
00101       return self
00102     except struct.error as e:
00103       raise genpy.DeserializationError(e) #most likely buffer underfill
00104 
00105 _struct_I = genpy.struct_I
00106 _struct_2q = struct.Struct("<2q")
00107 """autogenerated by genpy from coverage_3d_tools/TableDetectionServResponse.msg. Do not edit."""
00108 import sys
00109 python3 = True if sys.hexversion > 0x03000000 else False
00110 import genpy
00111 import struct
00112 
00113 import geometry_msgs.msg
00114 import coverage_3d_msgs.msg
00115 import std_msgs.msg
00116 
00117 class TableDetectionServResponse(genpy.Message):
00118   _md5sum = "838ce8f0cb28b1afff051bc28d6c3d87"
00119   _type = "coverage_3d_tools/TableDetectionServResponse"
00120   _has_header = False #flag to mark the presence of a Header object
00121   _full_text = """coverage_3d_msgs/TableDetection table
00122 
00123 
00124 ================================================================================
00125 MSG: coverage_3d_msgs/TableDetection
00126 #This message holds a collection of 3d points, plus optional additional information about each point.
00127 #Each Point32 should be interpreted as a 3d point in the frame given in the header
00128 
00129 Header header
00130 int32 type #0: rectangle, 1:convex hull, 2:concave hull
00131 geometry_msgs/Pose center
00132 geometry_msgs/Point scale # not used for the convex hull
00133 geometry_msgs/Point[] points  #Array of 3d points on the outline of the table where spanning vectors intersect table boundary
00134 geometry_msgs/Point[] hull #Array containing convex or concave hull, this was requested
00135 
00136 ================================================================================
00137 MSG: std_msgs/Header
00138 # Standard metadata for higher-level stamped data types.
00139 # This is generally used to communicate timestamped data 
00140 # in a particular coordinate frame.
00141 # 
00142 # sequence ID: consecutively increasing ID 
00143 uint32 seq
00144 #Two-integer timestamp that is expressed as:
00145 # * stamp.secs: seconds (stamp_secs) since epoch
00146 # * stamp.nsecs: nanoseconds since stamp_secs
00147 # time-handling sugar is provided by the client library
00148 time stamp
00149 #Frame this data is associated with
00150 # 0: no frame
00151 # 1: global frame
00152 string frame_id
00153 
00154 ================================================================================
00155 MSG: geometry_msgs/Pose
00156 # A representation of pose in free space, composed of postion and orientation. 
00157 Point position
00158 Quaternion orientation
00159 
00160 ================================================================================
00161 MSG: geometry_msgs/Point
00162 # This contains the position of a point in free space
00163 float64 x
00164 float64 y
00165 float64 z
00166 
00167 ================================================================================
00168 MSG: geometry_msgs/Quaternion
00169 # This represents an orientation in free space in quaternion form.
00170 
00171 float64 x
00172 float64 y
00173 float64 z
00174 float64 w
00175 
00176 """
00177   __slots__ = ['table']
00178   _slot_types = ['coverage_3d_msgs/TableDetection']
00179 
00180   def __init__(self, *args, **kwds):
00181     """
00182     Constructor. Any message fields that are implicitly/explicitly
00183     set to None will be assigned a default value. The recommend
00184     use is keyword arguments as this is more robust to future message
00185     changes.  You cannot mix in-order arguments and keyword arguments.
00186 
00187     The available fields are:
00188        table
00189 
00190     :param args: complete set of field values, in .msg order
00191     :param kwds: use keyword arguments corresponding to message field names
00192     to set specific fields.
00193     """
00194     if args or kwds:
00195       super(TableDetectionServResponse, self).__init__(*args, **kwds)
00196       #message fields cannot be None, assign default values for those that are
00197       if self.table is None:
00198         self.table = coverage_3d_msgs.msg.TableDetection()
00199     else:
00200       self.table = coverage_3d_msgs.msg.TableDetection()
00201 
00202   def _get_types(self):
00203     """
00204     internal API method
00205     """
00206     return self._slot_types
00207 
00208   def serialize(self, buff):
00209     """
00210     serialize message into buffer
00211     :param buff: buffer, ``StringIO``
00212     """
00213     try:
00214       _x = self
00215       buff.write(_struct_3I.pack(_x.table.header.seq, _x.table.header.stamp.secs, _x.table.header.stamp.nsecs))
00216       _x = self.table.header.frame_id
00217       length = len(_x)
00218       if python3 or type(_x) == unicode:
00219         _x = _x.encode('utf-8')
00220         length = len(_x)
00221       buff.write(struct.pack('<I%ss'%length, length, _x))
00222       _x = self
00223       buff.write(_struct_i10d.pack(_x.table.type, _x.table.center.position.x, _x.table.center.position.y, _x.table.center.position.z, _x.table.center.orientation.x, _x.table.center.orientation.y, _x.table.center.orientation.z, _x.table.center.orientation.w, _x.table.scale.x, _x.table.scale.y, _x.table.scale.z))
00224       length = len(self.table.points)
00225       buff.write(_struct_I.pack(length))
00226       for val1 in self.table.points:
00227         _x = val1
00228         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00229       length = len(self.table.hull)
00230       buff.write(_struct_I.pack(length))
00231       for val1 in self.table.hull:
00232         _x = val1
00233         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00234     except struct.error as se: self._check_types(se)
00235     except TypeError as te: self._check_types(te)
00236 
00237   def deserialize(self, str):
00238     """
00239     unpack serialized message in str into this message instance
00240     :param str: byte array of serialized message, ``str``
00241     """
00242     try:
00243       if self.table is None:
00244         self.table = coverage_3d_msgs.msg.TableDetection()
00245       end = 0
00246       _x = self
00247       start = end
00248       end += 12
00249       (_x.table.header.seq, _x.table.header.stamp.secs, _x.table.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00250       start = end
00251       end += 4
00252       (length,) = _struct_I.unpack(str[start:end])
00253       start = end
00254       end += length
00255       if python3:
00256         self.table.header.frame_id = str[start:end].decode('utf-8')
00257       else:
00258         self.table.header.frame_id = str[start:end]
00259       _x = self
00260       start = end
00261       end += 84
00262       (_x.table.type, _x.table.center.position.x, _x.table.center.position.y, _x.table.center.position.z, _x.table.center.orientation.x, _x.table.center.orientation.y, _x.table.center.orientation.z, _x.table.center.orientation.w, _x.table.scale.x, _x.table.scale.y, _x.table.scale.z,) = _struct_i10d.unpack(str[start:end])
00263       start = end
00264       end += 4
00265       (length,) = _struct_I.unpack(str[start:end])
00266       self.table.points = []
00267       for i in range(0, length):
00268         val1 = geometry_msgs.msg.Point()
00269         _x = val1
00270         start = end
00271         end += 24
00272         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00273         self.table.points.append(val1)
00274       start = end
00275       end += 4
00276       (length,) = _struct_I.unpack(str[start:end])
00277       self.table.hull = []
00278       for i in range(0, length):
00279         val1 = geometry_msgs.msg.Point()
00280         _x = val1
00281         start = end
00282         end += 24
00283         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00284         self.table.hull.append(val1)
00285       return self
00286     except struct.error as e:
00287       raise genpy.DeserializationError(e) #most likely buffer underfill
00288 
00289 
00290   def serialize_numpy(self, buff, numpy):
00291     """
00292     serialize message with numpy array types into buffer
00293     :param buff: buffer, ``StringIO``
00294     :param numpy: numpy python module
00295     """
00296     try:
00297       _x = self
00298       buff.write(_struct_3I.pack(_x.table.header.seq, _x.table.header.stamp.secs, _x.table.header.stamp.nsecs))
00299       _x = self.table.header.frame_id
00300       length = len(_x)
00301       if python3 or type(_x) == unicode:
00302         _x = _x.encode('utf-8')
00303         length = len(_x)
00304       buff.write(struct.pack('<I%ss'%length, length, _x))
00305       _x = self
00306       buff.write(_struct_i10d.pack(_x.table.type, _x.table.center.position.x, _x.table.center.position.y, _x.table.center.position.z, _x.table.center.orientation.x, _x.table.center.orientation.y, _x.table.center.orientation.z, _x.table.center.orientation.w, _x.table.scale.x, _x.table.scale.y, _x.table.scale.z))
00307       length = len(self.table.points)
00308       buff.write(_struct_I.pack(length))
00309       for val1 in self.table.points:
00310         _x = val1
00311         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00312       length = len(self.table.hull)
00313       buff.write(_struct_I.pack(length))
00314       for val1 in self.table.hull:
00315         _x = val1
00316         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00317     except struct.error as se: self._check_types(se)
00318     except TypeError as te: self._check_types(te)
00319 
00320   def deserialize_numpy(self, str, numpy):
00321     """
00322     unpack serialized message in str into this message instance using numpy for array types
00323     :param str: byte array of serialized message, ``str``
00324     :param numpy: numpy python module
00325     """
00326     try:
00327       if self.table is None:
00328         self.table = coverage_3d_msgs.msg.TableDetection()
00329       end = 0
00330       _x = self
00331       start = end
00332       end += 12
00333       (_x.table.header.seq, _x.table.header.stamp.secs, _x.table.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00334       start = end
00335       end += 4
00336       (length,) = _struct_I.unpack(str[start:end])
00337       start = end
00338       end += length
00339       if python3:
00340         self.table.header.frame_id = str[start:end].decode('utf-8')
00341       else:
00342         self.table.header.frame_id = str[start:end]
00343       _x = self
00344       start = end
00345       end += 84
00346       (_x.table.type, _x.table.center.position.x, _x.table.center.position.y, _x.table.center.position.z, _x.table.center.orientation.x, _x.table.center.orientation.y, _x.table.center.orientation.z, _x.table.center.orientation.w, _x.table.scale.x, _x.table.scale.y, _x.table.scale.z,) = _struct_i10d.unpack(str[start:end])
00347       start = end
00348       end += 4
00349       (length,) = _struct_I.unpack(str[start:end])
00350       self.table.points = []
00351       for i in range(0, length):
00352         val1 = geometry_msgs.msg.Point()
00353         _x = val1
00354         start = end
00355         end += 24
00356         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00357         self.table.points.append(val1)
00358       start = end
00359       end += 4
00360       (length,) = _struct_I.unpack(str[start:end])
00361       self.table.hull = []
00362       for i in range(0, length):
00363         val1 = geometry_msgs.msg.Point()
00364         _x = val1
00365         start = end
00366         end += 24
00367         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00368         self.table.hull.append(val1)
00369       return self
00370     except struct.error as e:
00371       raise genpy.DeserializationError(e) #most likely buffer underfill
00372 
00373 _struct_I = genpy.struct_I
00374 _struct_3I = struct.Struct("<3I")
00375 _struct_i10d = struct.Struct("<i10d")
00376 _struct_3d = struct.Struct("<3d")
00377 class TableDetectionServ(object):
00378   _type          = 'coverage_3d_tools/TableDetectionServ'
00379   _md5sum = '1b87d54b73884f88fe67b2ddff4e7675'
00380   _request_class  = TableDetectionServRequest
00381   _response_class = TableDetectionServResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


coverage_3d_tools
Author(s): Juergen Hess
autogenerated on Wed Dec 26 2012 15:25:37