_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(se)
00219     except TypeError as te: self._check_types(te)
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       if python3:
00284         self.cloud.data = str[start:end].decode('utf-8')
00285       else:
00286         self.cloud.data = str[start:end]
00287       _x = self
00288       start = end
00289       end += 13
00290       (_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])
00291       self.cloud.is_dense = bool(self.cloud.is_dense)
00292       start = end
00293       end += 4
00294       (length,) = _struct_I.unpack(str[start:end])
00295       start = end
00296       end += length
00297       if python3:
00298         self.box_pose.header.frame_id = str[start:end].decode('utf-8')
00299       else:
00300         self.box_pose.header.frame_id = str[start:end]
00301       _x = self
00302       start = end
00303       end += 104
00304       (_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])
00305       return self
00306     except struct.error as e:
00307       raise genpy.DeserializationError(e) #most likely buffer underfill
00308 
00309 
00310   def serialize_numpy(self, buff, numpy):
00311     """
00312     serialize message with numpy array types into buffer
00313     :param buff: buffer, ``StringIO``
00314     :param numpy: numpy python module
00315     """
00316     try:
00317       _x = self
00318       buff.write(_struct_3I.pack(_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs))
00319       _x = self.cloud.header.frame_id
00320       length = len(_x)
00321       if python3 or type(_x) == unicode:
00322         _x = _x.encode('utf-8')
00323         length = len(_x)
00324       buff.write(struct.pack('<I%ss'%length, length, _x))
00325       _x = self
00326       buff.write(_struct_2I.pack(_x.cloud.height, _x.cloud.width))
00327       length = len(self.cloud.fields)
00328       buff.write(_struct_I.pack(length))
00329       for val1 in self.cloud.fields:
00330         _x = val1.name
00331         length = len(_x)
00332         if python3 or type(_x) == unicode:
00333           _x = _x.encode('utf-8')
00334           length = len(_x)
00335         buff.write(struct.pack('<I%ss'%length, length, _x))
00336         _x = val1
00337         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00338       _x = self
00339       buff.write(_struct_B2I.pack(_x.cloud.is_bigendian, _x.cloud.point_step, _x.cloud.row_step))
00340       _x = self.cloud.data
00341       length = len(_x)
00342       # - if encoded as a list instead, serialize as bytes instead of string
00343       if type(_x) in [list, tuple]:
00344         buff.write(struct.pack('<I%sB'%length, length, *_x))
00345       else:
00346         buff.write(struct.pack('<I%ss'%length, length, _x))
00347       _x = self
00348       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))
00349       _x = self.box_pose.header.frame_id
00350       length = len(_x)
00351       if python3 or type(_x) == unicode:
00352         _x = _x.encode('utf-8')
00353         length = len(_x)
00354       buff.write(struct.pack('<I%ss'%length, length, _x))
00355       _x = self
00356       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))
00357     except struct.error as se: self._check_types(se)
00358     except TypeError as te: self._check_types(te)
00359 
00360   def deserialize_numpy(self, str, numpy):
00361     """
00362     unpack serialized message in str into this message instance using numpy for array types
00363     :param str: byte array of serialized message, ``str``
00364     :param numpy: numpy python module
00365     """
00366     try:
00367       if self.cloud is None:
00368         self.cloud = sensor_msgs.msg.PointCloud2()
00369       if self.box_pose is None:
00370         self.box_pose = geometry_msgs.msg.PoseStamped()
00371       if self.box_dims is None:
00372         self.box_dims = geometry_msgs.msg.Vector3()
00373       if self.opening_dir is None:
00374         self.opening_dir = geometry_msgs.msg.Vector3()
00375       end = 0
00376       _x = self
00377       start = end
00378       end += 12
00379       (_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00380       start = end
00381       end += 4
00382       (length,) = _struct_I.unpack(str[start:end])
00383       start = end
00384       end += length
00385       if python3:
00386         self.cloud.header.frame_id = str[start:end].decode('utf-8')
00387       else:
00388         self.cloud.header.frame_id = str[start:end]
00389       _x = self
00390       start = end
00391       end += 8
00392       (_x.cloud.height, _x.cloud.width,) = _struct_2I.unpack(str[start:end])
00393       start = end
00394       end += 4
00395       (length,) = _struct_I.unpack(str[start:end])
00396       self.cloud.fields = []
00397       for i in range(0, length):
00398         val1 = sensor_msgs.msg.PointField()
00399         start = end
00400         end += 4
00401         (length,) = _struct_I.unpack(str[start:end])
00402         start = end
00403         end += length
00404         if python3:
00405           val1.name = str[start:end].decode('utf-8')
00406         else:
00407           val1.name = str[start:end]
00408         _x = val1
00409         start = end
00410         end += 9
00411         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00412         self.cloud.fields.append(val1)
00413       _x = self
00414       start = end
00415       end += 9
00416       (_x.cloud.is_bigendian, _x.cloud.point_step, _x.cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00417       self.cloud.is_bigendian = bool(self.cloud.is_bigendian)
00418       start = end
00419       end += 4
00420       (length,) = _struct_I.unpack(str[start:end])
00421       start = end
00422       end += length
00423       if python3:
00424         self.cloud.data = str[start:end].decode('utf-8')
00425       else:
00426         self.cloud.data = str[start:end]
00427       _x = self
00428       start = end
00429       end += 13
00430       (_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])
00431       self.cloud.is_dense = bool(self.cloud.is_dense)
00432       start = end
00433       end += 4
00434       (length,) = _struct_I.unpack(str[start:end])
00435       start = end
00436       end += length
00437       if python3:
00438         self.box_pose.header.frame_id = str[start:end].decode('utf-8')
00439       else:
00440         self.box_pose.header.frame_id = str[start:end]
00441       _x = self
00442       start = end
00443       end += 104
00444       (_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])
00445       return self
00446     except struct.error as e:
00447       raise genpy.DeserializationError(e) #most likely buffer underfill
00448 
00449 _struct_I = genpy.struct_I
00450 _struct_IBI = struct.Struct("<IBI")
00451 _struct_13d = struct.Struct("<13d")
00452 _struct_3I = struct.Struct("<3I")
00453 _struct_B3I = struct.Struct("<B3I")
00454 _struct_B2I = struct.Struct("<B2I")
00455 _struct_2I = struct.Struct("<2I")


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