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


tabletop_object_detector
Author(s): Marius Muja and Matei Ciocarlie
autogenerated on Fri Jan 3 2014 11:48:47