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


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