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


object_manipulation_msgs
Author(s): Matei Ciocarlie
autogenerated on Thu Jan 2 2014 11:38:11