_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(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00153     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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       self.cluster.data = str[start:end]
00212       start = end
00213       end += 1
00214       (self.cluster.is_dense,) = _struct_B.unpack(str[start:end])
00215       self.cluster.is_dense = bool(self.cluster.is_dense)
00216       return self
00217     except struct.error as e:
00218       raise genpy.DeserializationError(e) #most likely buffer underfill
00219 
00220 
00221   def serialize_numpy(self, buff, numpy):
00222     """
00223     serialize message with numpy array types into buffer
00224     :param buff: buffer, ``StringIO``
00225     :param numpy: numpy python module
00226     """
00227     try:
00228       _x = self
00229       buff.write(_struct_3I.pack(_x.cluster.header.seq, _x.cluster.header.stamp.secs, _x.cluster.header.stamp.nsecs))
00230       _x = self.cluster.header.frame_id
00231       length = len(_x)
00232       if python3 or type(_x) == unicode:
00233         _x = _x.encode('utf-8')
00234         length = len(_x)
00235       buff.write(struct.pack('<I%ss'%length, length, _x))
00236       _x = self
00237       buff.write(_struct_2I.pack(_x.cluster.height, _x.cluster.width))
00238       length = len(self.cluster.fields)
00239       buff.write(_struct_I.pack(length))
00240       for val1 in self.cluster.fields:
00241         _x = val1.name
00242         length = len(_x)
00243         if python3 or type(_x) == unicode:
00244           _x = _x.encode('utf-8')
00245           length = len(_x)
00246         buff.write(struct.pack('<I%ss'%length, length, _x))
00247         _x = val1
00248         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00249       _x = self
00250       buff.write(_struct_B2I.pack(_x.cluster.is_bigendian, _x.cluster.point_step, _x.cluster.row_step))
00251       _x = self.cluster.data
00252       length = len(_x)
00253       # - if encoded as a list instead, serialize as bytes instead of string
00254       if type(_x) in [list, tuple]:
00255         buff.write(struct.pack('<I%sB'%length, length, *_x))
00256       else:
00257         buff.write(struct.pack('<I%ss'%length, length, _x))
00258       buff.write(_struct_B.pack(self.cluster.is_dense))
00259     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00260     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00261 
00262   def deserialize_numpy(self, str, numpy):
00263     """
00264     unpack serialized message in str into this message instance using numpy for array types
00265     :param str: byte array of serialized message, ``str``
00266     :param numpy: numpy python module
00267     """
00268     try:
00269       if self.cluster is None:
00270         self.cluster = sensor_msgs.msg.PointCloud2()
00271       end = 0
00272       _x = self
00273       start = end
00274       end += 12
00275       (_x.cluster.header.seq, _x.cluster.header.stamp.secs, _x.cluster.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00276       start = end
00277       end += 4
00278       (length,) = _struct_I.unpack(str[start:end])
00279       start = end
00280       end += length
00281       if python3:
00282         self.cluster.header.frame_id = str[start:end].decode('utf-8')
00283       else:
00284         self.cluster.header.frame_id = str[start:end]
00285       _x = self
00286       start = end
00287       end += 8
00288       (_x.cluster.height, _x.cluster.width,) = _struct_2I.unpack(str[start:end])
00289       start = end
00290       end += 4
00291       (length,) = _struct_I.unpack(str[start:end])
00292       self.cluster.fields = []
00293       for i in range(0, length):
00294         val1 = sensor_msgs.msg.PointField()
00295         start = end
00296         end += 4
00297         (length,) = _struct_I.unpack(str[start:end])
00298         start = end
00299         end += length
00300         if python3:
00301           val1.name = str[start:end].decode('utf-8')
00302         else:
00303           val1.name = str[start:end]
00304         _x = val1
00305         start = end
00306         end += 9
00307         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00308         self.cluster.fields.append(val1)
00309       _x = self
00310       start = end
00311       end += 9
00312       (_x.cluster.is_bigendian, _x.cluster.point_step, _x.cluster.row_step,) = _struct_B2I.unpack(str[start:end])
00313       self.cluster.is_bigendian = bool(self.cluster.is_bigendian)
00314       start = end
00315       end += 4
00316       (length,) = _struct_I.unpack(str[start:end])
00317       start = end
00318       end += length
00319       self.cluster.data = str[start:end]
00320       start = end
00321       end += 1
00322       (self.cluster.is_dense,) = _struct_B.unpack(str[start:end])
00323       self.cluster.is_dense = bool(self.cluster.is_dense)
00324       return self
00325     except struct.error as e:
00326       raise genpy.DeserializationError(e) #most likely buffer underfill
00327 
00328 _struct_I = genpy.struct_I
00329 _struct_IBI = struct.Struct("<IBI")
00330 _struct_3I = struct.Struct("<3I")
00331 _struct_B = struct.Struct("<B")
00332 _struct_2I = struct.Struct("<2I")
00333 _struct_B2I = struct.Struct("<B2I")
00334 """autogenerated by genpy from object_manipulation_msgs/FindClusterBoundingBox2Response.msg. Do not edit."""
00335 import sys
00336 python3 = True if sys.hexversion > 0x03000000 else False
00337 import genpy
00338 import struct
00339 
00340 import geometry_msgs.msg
00341 import std_msgs.msg
00342 
00343 class FindClusterBoundingBox2Response(genpy.Message):
00344   _md5sum = "981e2c8ffa160e77589dcf98a63a81cd"
00345   _type = "object_manipulation_msgs/FindClusterBoundingBox2Response"
00346   _has_header = False #flag to mark the presence of a Header object
00347   _full_text = """
00348 
00349 geometry_msgs/PoseStamped pose
00350 
00351 
00352 geometry_msgs/Vector3 box_dims
00353 
00354 
00355 int32 SUCCESS=0
00356 int32 TF_ERROR=1
00357 int32 error_code
00358 
00359 ================================================================================
00360 MSG: geometry_msgs/PoseStamped
00361 # A Pose with reference coordinate frame and timestamp
00362 Header header
00363 Pose pose
00364 
00365 ================================================================================
00366 MSG: std_msgs/Header
00367 # Standard metadata for higher-level stamped data types.
00368 # This is generally used to communicate timestamped data 
00369 # in a particular coordinate frame.
00370 # 
00371 # sequence ID: consecutively increasing ID 
00372 uint32 seq
00373 #Two-integer timestamp that is expressed as:
00374 # * stamp.secs: seconds (stamp_secs) since epoch
00375 # * stamp.nsecs: nanoseconds since stamp_secs
00376 # time-handling sugar is provided by the client library
00377 time stamp
00378 #Frame this data is associated with
00379 # 0: no frame
00380 # 1: global frame
00381 string frame_id
00382 
00383 ================================================================================
00384 MSG: geometry_msgs/Pose
00385 # A representation of pose in free space, composed of postion and orientation. 
00386 Point position
00387 Quaternion orientation
00388 
00389 ================================================================================
00390 MSG: geometry_msgs/Point
00391 # This contains the position of a point in free space
00392 float64 x
00393 float64 y
00394 float64 z
00395 
00396 ================================================================================
00397 MSG: geometry_msgs/Quaternion
00398 # This represents an orientation in free space in quaternion form.
00399 
00400 float64 x
00401 float64 y
00402 float64 z
00403 float64 w
00404 
00405 ================================================================================
00406 MSG: geometry_msgs/Vector3
00407 # This represents a vector in free space. 
00408 
00409 float64 x
00410 float64 y
00411 float64 z
00412 """
00413   # Pseudo-constants
00414   SUCCESS = 0
00415   TF_ERROR = 1
00416 
00417   __slots__ = ['pose','box_dims','error_code']
00418   _slot_types = ['geometry_msgs/PoseStamped','geometry_msgs/Vector3','int32']
00419 
00420   def __init__(self, *args, **kwds):
00421     """
00422     Constructor. Any message fields that are implicitly/explicitly
00423     set to None will be assigned a default value. The recommend
00424     use is keyword arguments as this is more robust to future message
00425     changes.  You cannot mix in-order arguments and keyword arguments.
00426 
00427     The available fields are:
00428        pose,box_dims,error_code
00429 
00430     :param args: complete set of field values, in .msg order
00431     :param kwds: use keyword arguments corresponding to message field names
00432     to set specific fields.
00433     """
00434     if args or kwds:
00435       super(FindClusterBoundingBox2Response, self).__init__(*args, **kwds)
00436       #message fields cannot be None, assign default values for those that are
00437       if self.pose is None:
00438         self.pose = geometry_msgs.msg.PoseStamped()
00439       if self.box_dims is None:
00440         self.box_dims = geometry_msgs.msg.Vector3()
00441       if self.error_code is None:
00442         self.error_code = 0
00443     else:
00444       self.pose = geometry_msgs.msg.PoseStamped()
00445       self.box_dims = geometry_msgs.msg.Vector3()
00446       self.error_code = 0
00447 
00448   def _get_types(self):
00449     """
00450     internal API method
00451     """
00452     return self._slot_types
00453 
00454   def serialize(self, buff):
00455     """
00456     serialize message into buffer
00457     :param buff: buffer, ``StringIO``
00458     """
00459     try:
00460       _x = self
00461       buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00462       _x = self.pose.header.frame_id
00463       length = len(_x)
00464       if python3 or type(_x) == unicode:
00465         _x = _x.encode('utf-8')
00466         length = len(_x)
00467       buff.write(struct.pack('<I%ss'%length, length, _x))
00468       _x = self
00469       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))
00470     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00471     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00472 
00473   def deserialize(self, str):
00474     """
00475     unpack serialized message in str into this message instance
00476     :param str: byte array of serialized message, ``str``
00477     """
00478     try:
00479       if self.pose is None:
00480         self.pose = geometry_msgs.msg.PoseStamped()
00481       if self.box_dims is None:
00482         self.box_dims = geometry_msgs.msg.Vector3()
00483       end = 0
00484       _x = self
00485       start = end
00486       end += 12
00487       (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00488       start = end
00489       end += 4
00490       (length,) = _struct_I.unpack(str[start:end])
00491       start = end
00492       end += length
00493       if python3:
00494         self.pose.header.frame_id = str[start:end].decode('utf-8')
00495       else:
00496         self.pose.header.frame_id = str[start:end]
00497       _x = self
00498       start = end
00499       end += 84
00500       (_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])
00501       return self
00502     except struct.error as e:
00503       raise genpy.DeserializationError(e) #most likely buffer underfill
00504 
00505 
00506   def serialize_numpy(self, buff, numpy):
00507     """
00508     serialize message with numpy array types into buffer
00509     :param buff: buffer, ``StringIO``
00510     :param numpy: numpy python module
00511     """
00512     try:
00513       _x = self
00514       buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00515       _x = self.pose.header.frame_id
00516       length = len(_x)
00517       if python3 or type(_x) == unicode:
00518         _x = _x.encode('utf-8')
00519         length = len(_x)
00520       buff.write(struct.pack('<I%ss'%length, length, _x))
00521       _x = self
00522       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))
00523     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00524     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00525 
00526   def deserialize_numpy(self, str, numpy):
00527     """
00528     unpack serialized message in str into this message instance using numpy for array types
00529     :param str: byte array of serialized message, ``str``
00530     :param numpy: numpy python module
00531     """
00532     try:
00533       if self.pose is None:
00534         self.pose = geometry_msgs.msg.PoseStamped()
00535       if self.box_dims is None:
00536         self.box_dims = geometry_msgs.msg.Vector3()
00537       end = 0
00538       _x = self
00539       start = end
00540       end += 12
00541       (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00542       start = end
00543       end += 4
00544       (length,) = _struct_I.unpack(str[start:end])
00545       start = end
00546       end += length
00547       if python3:
00548         self.pose.header.frame_id = str[start:end].decode('utf-8')
00549       else:
00550         self.pose.header.frame_id = str[start:end]
00551       _x = self
00552       start = end
00553       end += 84
00554       (_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])
00555       return self
00556     except struct.error as e:
00557       raise genpy.DeserializationError(e) #most likely buffer underfill
00558 
00559 _struct_I = genpy.struct_I
00560 _struct_3I = struct.Struct("<3I")
00561 _struct_10di = struct.Struct("<10di")
00562 class FindClusterBoundingBox2(object):
00563   _type          = 'object_manipulation_msgs/FindClusterBoundingBox2'
00564   _md5sum = 'e44a593509bdc6447cb33bb20d08e973'
00565   _request_class  = FindClusterBoundingBox2Request
00566   _response_class = FindClusterBoundingBox2Response


object_manipulation_msgs
Author(s): Matei Ciocarlie
autogenerated on Mon Oct 6 2014 02:58:11