_FindContainerActionResult.py
Go to the documentation of this file.
00001 """autogenerated by genpy from object_manipulation_msgs/FindContainerActionResult.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 object_manipulation_msgs.msg
00008 import actionlib_msgs.msg
00009 import geometry_msgs.msg
00010 import sensor_msgs.msg
00011 import genpy
00012 import std_msgs.msg
00013 
00014 class FindContainerActionResult(genpy.Message):
00015   _md5sum = "1c4fd4050a411725f1d3674520757b5d"
00016   _type = "object_manipulation_msgs/FindContainerActionResult"
00017   _has_header = True #flag to mark the presence of a Header object
00018   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00019 
00020 Header header
00021 actionlib_msgs/GoalStatus status
00022 FindContainerResult result
00023 
00024 ================================================================================
00025 MSG: std_msgs/Header
00026 # Standard metadata for higher-level stamped data types.
00027 # This is generally used to communicate timestamped data 
00028 # in a particular coordinate frame.
00029 # 
00030 # sequence ID: consecutively increasing ID 
00031 uint32 seq
00032 #Two-integer timestamp that is expressed as:
00033 # * stamp.secs: seconds (stamp_secs) since epoch
00034 # * stamp.nsecs: nanoseconds since stamp_secs
00035 # time-handling sugar is provided by the client library
00036 time stamp
00037 #Frame this data is associated with
00038 # 0: no frame
00039 # 1: global frame
00040 string frame_id
00041 
00042 ================================================================================
00043 MSG: actionlib_msgs/GoalStatus
00044 GoalID goal_id
00045 uint8 status
00046 uint8 PENDING         = 0   # The goal has yet to be processed by the action server
00047 uint8 ACTIVE          = 1   # The goal is currently being processed by the action server
00048 uint8 PREEMPTED       = 2   # The goal received a cancel request after it started executing
00049                             #   and has since completed its execution (Terminal State)
00050 uint8 SUCCEEDED       = 3   # The goal was achieved successfully by the action server (Terminal State)
00051 uint8 ABORTED         = 4   # The goal was aborted during execution by the action server due
00052                             #    to some failure (Terminal State)
00053 uint8 REJECTED        = 5   # The goal was rejected by the action server without being processed,
00054                             #    because the goal was unattainable or invalid (Terminal State)
00055 uint8 PREEMPTING      = 6   # The goal received a cancel request after it started executing
00056                             #    and has not yet completed execution
00057 uint8 RECALLING       = 7   # The goal received a cancel request before it started executing,
00058                             #    but the action server has not yet confirmed that the goal is canceled
00059 uint8 RECALLED        = 8   # The goal received a cancel request before it started executing
00060                             #    and was successfully cancelled (Terminal State)
00061 uint8 LOST            = 9   # An action client can determine that a goal is LOST. This should not be
00062                             #    sent over the wire by an action server
00063 
00064 #Allow for the user to associate a string with GoalStatus for debugging
00065 string text
00066 
00067 
00068 ================================================================================
00069 MSG: actionlib_msgs/GoalID
00070 # The stamp should store the time at which this goal was requested.
00071 # It is used by an action server when it tries to preempt all
00072 # goals that were requested before a certain time
00073 time stamp
00074 
00075 # The id provides a way to associate feedback and
00076 # result message with specific goal requests. The id
00077 # specified must be unique.
00078 string id
00079 
00080 
00081 ================================================================================
00082 MSG: object_manipulation_msgs/FindContainerResult
00083 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00084 # refined pose and dimensions of bounding box for container
00085 geometry_msgs/PoseStamped box_pose
00086 geometry_msgs/Vector3     box_dims
00087 
00088 # cloud chunks of stuff in container, and container
00089 sensor_msgs/PointCloud2   contents
00090 sensor_msgs/PointCloud2   container
00091 sensor_msgs/PointCloud2[] clusters
00092 
00093 
00094 ================================================================================
00095 MSG: geometry_msgs/PoseStamped
00096 # A Pose with reference coordinate frame and timestamp
00097 Header header
00098 Pose pose
00099 
00100 ================================================================================
00101 MSG: geometry_msgs/Pose
00102 # A representation of pose in free space, composed of postion and orientation. 
00103 Point position
00104 Quaternion orientation
00105 
00106 ================================================================================
00107 MSG: geometry_msgs/Point
00108 # This contains the position of a point in free space
00109 float64 x
00110 float64 y
00111 float64 z
00112 
00113 ================================================================================
00114 MSG: geometry_msgs/Quaternion
00115 # This represents an orientation in free space in quaternion form.
00116 
00117 float64 x
00118 float64 y
00119 float64 z
00120 float64 w
00121 
00122 ================================================================================
00123 MSG: geometry_msgs/Vector3
00124 # This represents a vector in free space. 
00125 
00126 float64 x
00127 float64 y
00128 float64 z
00129 ================================================================================
00130 MSG: sensor_msgs/PointCloud2
00131 # This message holds a collection of N-dimensional points, which may
00132 # contain additional information such as normals, intensity, etc. The
00133 # point data is stored as a binary blob, its layout described by the
00134 # contents of the "fields" array.
00135 
00136 # The point cloud data may be organized 2d (image-like) or 1d
00137 # (unordered). Point clouds organized as 2d images may be produced by
00138 # camera depth sensors such as stereo or time-of-flight.
00139 
00140 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00141 # points).
00142 Header header
00143 
00144 # 2D structure of the point cloud. If the cloud is unordered, height is
00145 # 1 and width is the length of the point cloud.
00146 uint32 height
00147 uint32 width
00148 
00149 # Describes the channels and their layout in the binary data blob.
00150 PointField[] fields
00151 
00152 bool    is_bigendian # Is this data bigendian?
00153 uint32  point_step   # Length of a point in bytes
00154 uint32  row_step     # Length of a row in bytes
00155 uint8[] data         # Actual point data, size is (row_step*height)
00156 
00157 bool is_dense        # True if there are no invalid points
00158 
00159 ================================================================================
00160 MSG: sensor_msgs/PointField
00161 # This message holds the description of one point entry in the
00162 # PointCloud2 message format.
00163 uint8 INT8    = 1
00164 uint8 UINT8   = 2
00165 uint8 INT16   = 3
00166 uint8 UINT16  = 4
00167 uint8 INT32   = 5
00168 uint8 UINT32  = 6
00169 uint8 FLOAT32 = 7
00170 uint8 FLOAT64 = 8
00171 
00172 string name      # Name of field
00173 uint32 offset    # Offset from start of point struct
00174 uint8  datatype  # Datatype enumeration, see above
00175 uint32 count     # How many elements in the field
00176 
00177 """
00178   __slots__ = ['header','status','result']
00179   _slot_types = ['std_msgs/Header','actionlib_msgs/GoalStatus','object_manipulation_msgs/FindContainerResult']
00180 
00181   def __init__(self, *args, **kwds):
00182     """
00183     Constructor. Any message fields that are implicitly/explicitly
00184     set to None will be assigned a default value. The recommend
00185     use is keyword arguments as this is more robust to future message
00186     changes.  You cannot mix in-order arguments and keyword arguments.
00187 
00188     The available fields are:
00189        header,status,result
00190 
00191     :param args: complete set of field values, in .msg order
00192     :param kwds: use keyword arguments corresponding to message field names
00193     to set specific fields.
00194     """
00195     if args or kwds:
00196       super(FindContainerActionResult, self).__init__(*args, **kwds)
00197       #message fields cannot be None, assign default values for those that are
00198       if self.header is None:
00199         self.header = std_msgs.msg.Header()
00200       if self.status is None:
00201         self.status = actionlib_msgs.msg.GoalStatus()
00202       if self.result is None:
00203         self.result = object_manipulation_msgs.msg.FindContainerResult()
00204     else:
00205       self.header = std_msgs.msg.Header()
00206       self.status = actionlib_msgs.msg.GoalStatus()
00207       self.result = object_manipulation_msgs.msg.FindContainerResult()
00208 
00209   def _get_types(self):
00210     """
00211     internal API method
00212     """
00213     return self._slot_types
00214 
00215   def serialize(self, buff):
00216     """
00217     serialize message into buffer
00218     :param buff: buffer, ``StringIO``
00219     """
00220     try:
00221       _x = self
00222       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00223       _x = self.header.frame_id
00224       length = len(_x)
00225       if python3 or type(_x) == unicode:
00226         _x = _x.encode('utf-8')
00227         length = len(_x)
00228       buff.write(struct.pack('<I%ss'%length, length, _x))
00229       _x = self
00230       buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00231       _x = self.status.goal_id.id
00232       length = len(_x)
00233       if python3 or type(_x) == unicode:
00234         _x = _x.encode('utf-8')
00235         length = len(_x)
00236       buff.write(struct.pack('<I%ss'%length, length, _x))
00237       buff.write(_struct_B.pack(self.status.status))
00238       _x = self.status.text
00239       length = len(_x)
00240       if python3 or type(_x) == unicode:
00241         _x = _x.encode('utf-8')
00242         length = len(_x)
00243       buff.write(struct.pack('<I%ss'%length, length, _x))
00244       _x = self
00245       buff.write(_struct_3I.pack(_x.result.box_pose.header.seq, _x.result.box_pose.header.stamp.secs, _x.result.box_pose.header.stamp.nsecs))
00246       _x = self.result.box_pose.header.frame_id
00247       length = len(_x)
00248       if python3 or type(_x) == unicode:
00249         _x = _x.encode('utf-8')
00250         length = len(_x)
00251       buff.write(struct.pack('<I%ss'%length, length, _x))
00252       _x = self
00253       buff.write(_struct_10d3I.pack(_x.result.box_pose.pose.position.x, _x.result.box_pose.pose.position.y, _x.result.box_pose.pose.position.z, _x.result.box_pose.pose.orientation.x, _x.result.box_pose.pose.orientation.y, _x.result.box_pose.pose.orientation.z, _x.result.box_pose.pose.orientation.w, _x.result.box_dims.x, _x.result.box_dims.y, _x.result.box_dims.z, _x.result.contents.header.seq, _x.result.contents.header.stamp.secs, _x.result.contents.header.stamp.nsecs))
00254       _x = self.result.contents.header.frame_id
00255       length = len(_x)
00256       if python3 or type(_x) == unicode:
00257         _x = _x.encode('utf-8')
00258         length = len(_x)
00259       buff.write(struct.pack('<I%ss'%length, length, _x))
00260       _x = self
00261       buff.write(_struct_2I.pack(_x.result.contents.height, _x.result.contents.width))
00262       length = len(self.result.contents.fields)
00263       buff.write(_struct_I.pack(length))
00264       for val1 in self.result.contents.fields:
00265         _x = val1.name
00266         length = len(_x)
00267         if python3 or type(_x) == unicode:
00268           _x = _x.encode('utf-8')
00269           length = len(_x)
00270         buff.write(struct.pack('<I%ss'%length, length, _x))
00271         _x = val1
00272         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00273       _x = self
00274       buff.write(_struct_B2I.pack(_x.result.contents.is_bigendian, _x.result.contents.point_step, _x.result.contents.row_step))
00275       _x = self.result.contents.data
00276       length = len(_x)
00277       # - if encoded as a list instead, serialize as bytes instead of string
00278       if type(_x) in [list, tuple]:
00279         buff.write(struct.pack('<I%sB'%length, length, *_x))
00280       else:
00281         buff.write(struct.pack('<I%ss'%length, length, _x))
00282       _x = self
00283       buff.write(_struct_B3I.pack(_x.result.contents.is_dense, _x.result.container.header.seq, _x.result.container.header.stamp.secs, _x.result.container.header.stamp.nsecs))
00284       _x = self.result.container.header.frame_id
00285       length = len(_x)
00286       if python3 or type(_x) == unicode:
00287         _x = _x.encode('utf-8')
00288         length = len(_x)
00289       buff.write(struct.pack('<I%ss'%length, length, _x))
00290       _x = self
00291       buff.write(_struct_2I.pack(_x.result.container.height, _x.result.container.width))
00292       length = len(self.result.container.fields)
00293       buff.write(_struct_I.pack(length))
00294       for val1 in self.result.container.fields:
00295         _x = val1.name
00296         length = len(_x)
00297         if python3 or type(_x) == unicode:
00298           _x = _x.encode('utf-8')
00299           length = len(_x)
00300         buff.write(struct.pack('<I%ss'%length, length, _x))
00301         _x = val1
00302         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00303       _x = self
00304       buff.write(_struct_B2I.pack(_x.result.container.is_bigendian, _x.result.container.point_step, _x.result.container.row_step))
00305       _x = self.result.container.data
00306       length = len(_x)
00307       # - if encoded as a list instead, serialize as bytes instead of string
00308       if type(_x) in [list, tuple]:
00309         buff.write(struct.pack('<I%sB'%length, length, *_x))
00310       else:
00311         buff.write(struct.pack('<I%ss'%length, length, _x))
00312       buff.write(_struct_B.pack(self.result.container.is_dense))
00313       length = len(self.result.clusters)
00314       buff.write(_struct_I.pack(length))
00315       for val1 in self.result.clusters:
00316         _v1 = val1.header
00317         buff.write(_struct_I.pack(_v1.seq))
00318         _v2 = _v1.stamp
00319         _x = _v2
00320         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00321         _x = _v1.frame_id
00322         length = len(_x)
00323         if python3 or type(_x) == unicode:
00324           _x = _x.encode('utf-8')
00325           length = len(_x)
00326         buff.write(struct.pack('<I%ss'%length, length, _x))
00327         _x = val1
00328         buff.write(_struct_2I.pack(_x.height, _x.width))
00329         length = len(val1.fields)
00330         buff.write(_struct_I.pack(length))
00331         for val2 in val1.fields:
00332           _x = val2.name
00333           length = len(_x)
00334           if python3 or type(_x) == unicode:
00335             _x = _x.encode('utf-8')
00336             length = len(_x)
00337           buff.write(struct.pack('<I%ss'%length, length, _x))
00338           _x = val2
00339           buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00340         _x = val1
00341         buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step))
00342         _x = val1.data
00343         length = len(_x)
00344         # - if encoded as a list instead, serialize as bytes instead of string
00345         if type(_x) in [list, tuple]:
00346           buff.write(struct.pack('<I%sB'%length, length, *_x))
00347         else:
00348           buff.write(struct.pack('<I%ss'%length, length, _x))
00349         buff.write(_struct_B.pack(val1.is_dense))
00350     except struct.error as se: self._check_types(se)
00351     except TypeError as te: self._check_types(te)
00352 
00353   def deserialize(self, str):
00354     """
00355     unpack serialized message in str into this message instance
00356     :param str: byte array of serialized message, ``str``
00357     """
00358     try:
00359       if self.header is None:
00360         self.header = std_msgs.msg.Header()
00361       if self.status is None:
00362         self.status = actionlib_msgs.msg.GoalStatus()
00363       if self.result is None:
00364         self.result = object_manipulation_msgs.msg.FindContainerResult()
00365       end = 0
00366       _x = self
00367       start = end
00368       end += 12
00369       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00370       start = end
00371       end += 4
00372       (length,) = _struct_I.unpack(str[start:end])
00373       start = end
00374       end += length
00375       if python3:
00376         self.header.frame_id = str[start:end].decode('utf-8')
00377       else:
00378         self.header.frame_id = str[start:end]
00379       _x = self
00380       start = end
00381       end += 8
00382       (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00383       start = end
00384       end += 4
00385       (length,) = _struct_I.unpack(str[start:end])
00386       start = end
00387       end += length
00388       if python3:
00389         self.status.goal_id.id = str[start:end].decode('utf-8')
00390       else:
00391         self.status.goal_id.id = str[start:end]
00392       start = end
00393       end += 1
00394       (self.status.status,) = _struct_B.unpack(str[start:end])
00395       start = end
00396       end += 4
00397       (length,) = _struct_I.unpack(str[start:end])
00398       start = end
00399       end += length
00400       if python3:
00401         self.status.text = str[start:end].decode('utf-8')
00402       else:
00403         self.status.text = str[start:end]
00404       _x = self
00405       start = end
00406       end += 12
00407       (_x.result.box_pose.header.seq, _x.result.box_pose.header.stamp.secs, _x.result.box_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00408       start = end
00409       end += 4
00410       (length,) = _struct_I.unpack(str[start:end])
00411       start = end
00412       end += length
00413       if python3:
00414         self.result.box_pose.header.frame_id = str[start:end].decode('utf-8')
00415       else:
00416         self.result.box_pose.header.frame_id = str[start:end]
00417       _x = self
00418       start = end
00419       end += 92
00420       (_x.result.box_pose.pose.position.x, _x.result.box_pose.pose.position.y, _x.result.box_pose.pose.position.z, _x.result.box_pose.pose.orientation.x, _x.result.box_pose.pose.orientation.y, _x.result.box_pose.pose.orientation.z, _x.result.box_pose.pose.orientation.w, _x.result.box_dims.x, _x.result.box_dims.y, _x.result.box_dims.z, _x.result.contents.header.seq, _x.result.contents.header.stamp.secs, _x.result.contents.header.stamp.nsecs,) = _struct_10d3I.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.result.contents.header.frame_id = str[start:end].decode('utf-8')
00428       else:
00429         self.result.contents.header.frame_id = str[start:end]
00430       _x = self
00431       start = end
00432       end += 8
00433       (_x.result.contents.height, _x.result.contents.width,) = _struct_2I.unpack(str[start:end])
00434       start = end
00435       end += 4
00436       (length,) = _struct_I.unpack(str[start:end])
00437       self.result.contents.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.result.contents.fields.append(val1)
00454       _x = self
00455       start = end
00456       end += 9
00457       (_x.result.contents.is_bigendian, _x.result.contents.point_step, _x.result.contents.row_step,) = _struct_B2I.unpack(str[start:end])
00458       self.result.contents.is_bigendian = bool(self.result.contents.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.result.contents.data = str[start:end].decode('utf-8')
00466       else:
00467         self.result.contents.data = str[start:end]
00468       _x = self
00469       start = end
00470       end += 13
00471       (_x.result.contents.is_dense, _x.result.container.header.seq, _x.result.container.header.stamp.secs, _x.result.container.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00472       self.result.contents.is_dense = bool(self.result.contents.is_dense)
00473       start = end
00474       end += 4
00475       (length,) = _struct_I.unpack(str[start:end])
00476       start = end
00477       end += length
00478       if python3:
00479         self.result.container.header.frame_id = str[start:end].decode('utf-8')
00480       else:
00481         self.result.container.header.frame_id = str[start:end]
00482       _x = self
00483       start = end
00484       end += 8
00485       (_x.result.container.height, _x.result.container.width,) = _struct_2I.unpack(str[start:end])
00486       start = end
00487       end += 4
00488       (length,) = _struct_I.unpack(str[start:end])
00489       self.result.container.fields = []
00490       for i in range(0, length):
00491         val1 = sensor_msgs.msg.PointField()
00492         start = end
00493         end += 4
00494         (length,) = _struct_I.unpack(str[start:end])
00495         start = end
00496         end += length
00497         if python3:
00498           val1.name = str[start:end].decode('utf-8')
00499         else:
00500           val1.name = str[start:end]
00501         _x = val1
00502         start = end
00503         end += 9
00504         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00505         self.result.container.fields.append(val1)
00506       _x = self
00507       start = end
00508       end += 9
00509       (_x.result.container.is_bigendian, _x.result.container.point_step, _x.result.container.row_step,) = _struct_B2I.unpack(str[start:end])
00510       self.result.container.is_bigendian = bool(self.result.container.is_bigendian)
00511       start = end
00512       end += 4
00513       (length,) = _struct_I.unpack(str[start:end])
00514       start = end
00515       end += length
00516       if python3:
00517         self.result.container.data = str[start:end].decode('utf-8')
00518       else:
00519         self.result.container.data = str[start:end]
00520       start = end
00521       end += 1
00522       (self.result.container.is_dense,) = _struct_B.unpack(str[start:end])
00523       self.result.container.is_dense = bool(self.result.container.is_dense)
00524       start = end
00525       end += 4
00526       (length,) = _struct_I.unpack(str[start:end])
00527       self.result.clusters = []
00528       for i in range(0, length):
00529         val1 = sensor_msgs.msg.PointCloud2()
00530         _v3 = val1.header
00531         start = end
00532         end += 4
00533         (_v3.seq,) = _struct_I.unpack(str[start:end])
00534         _v4 = _v3.stamp
00535         _x = _v4
00536         start = end
00537         end += 8
00538         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00539         start = end
00540         end += 4
00541         (length,) = _struct_I.unpack(str[start:end])
00542         start = end
00543         end += length
00544         if python3:
00545           _v3.frame_id = str[start:end].decode('utf-8')
00546         else:
00547           _v3.frame_id = str[start:end]
00548         _x = val1
00549         start = end
00550         end += 8
00551         (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
00552         start = end
00553         end += 4
00554         (length,) = _struct_I.unpack(str[start:end])
00555         val1.fields = []
00556         for i in range(0, length):
00557           val2 = sensor_msgs.msg.PointField()
00558           start = end
00559           end += 4
00560           (length,) = _struct_I.unpack(str[start:end])
00561           start = end
00562           end += length
00563           if python3:
00564             val2.name = str[start:end].decode('utf-8')
00565           else:
00566             val2.name = str[start:end]
00567           _x = val2
00568           start = end
00569           end += 9
00570           (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00571           val1.fields.append(val2)
00572         _x = val1
00573         start = end
00574         end += 9
00575         (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end])
00576         val1.is_bigendian = bool(val1.is_bigendian)
00577         start = end
00578         end += 4
00579         (length,) = _struct_I.unpack(str[start:end])
00580         start = end
00581         end += length
00582         if python3:
00583           val1.data = str[start:end].decode('utf-8')
00584         else:
00585           val1.data = str[start:end]
00586         start = end
00587         end += 1
00588         (val1.is_dense,) = _struct_B.unpack(str[start:end])
00589         val1.is_dense = bool(val1.is_dense)
00590         self.result.clusters.append(val1)
00591       return self
00592     except struct.error as e:
00593       raise genpy.DeserializationError(e) #most likely buffer underfill
00594 
00595 
00596   def serialize_numpy(self, buff, numpy):
00597     """
00598     serialize message with numpy array types into buffer
00599     :param buff: buffer, ``StringIO``
00600     :param numpy: numpy python module
00601     """
00602     try:
00603       _x = self
00604       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00605       _x = self.header.frame_id
00606       length = len(_x)
00607       if python3 or type(_x) == unicode:
00608         _x = _x.encode('utf-8')
00609         length = len(_x)
00610       buff.write(struct.pack('<I%ss'%length, length, _x))
00611       _x = self
00612       buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00613       _x = self.status.goal_id.id
00614       length = len(_x)
00615       if python3 or type(_x) == unicode:
00616         _x = _x.encode('utf-8')
00617         length = len(_x)
00618       buff.write(struct.pack('<I%ss'%length, length, _x))
00619       buff.write(_struct_B.pack(self.status.status))
00620       _x = self.status.text
00621       length = len(_x)
00622       if python3 or type(_x) == unicode:
00623         _x = _x.encode('utf-8')
00624         length = len(_x)
00625       buff.write(struct.pack('<I%ss'%length, length, _x))
00626       _x = self
00627       buff.write(_struct_3I.pack(_x.result.box_pose.header.seq, _x.result.box_pose.header.stamp.secs, _x.result.box_pose.header.stamp.nsecs))
00628       _x = self.result.box_pose.header.frame_id
00629       length = len(_x)
00630       if python3 or type(_x) == unicode:
00631         _x = _x.encode('utf-8')
00632         length = len(_x)
00633       buff.write(struct.pack('<I%ss'%length, length, _x))
00634       _x = self
00635       buff.write(_struct_10d3I.pack(_x.result.box_pose.pose.position.x, _x.result.box_pose.pose.position.y, _x.result.box_pose.pose.position.z, _x.result.box_pose.pose.orientation.x, _x.result.box_pose.pose.orientation.y, _x.result.box_pose.pose.orientation.z, _x.result.box_pose.pose.orientation.w, _x.result.box_dims.x, _x.result.box_dims.y, _x.result.box_dims.z, _x.result.contents.header.seq, _x.result.contents.header.stamp.secs, _x.result.contents.header.stamp.nsecs))
00636       _x = self.result.contents.header.frame_id
00637       length = len(_x)
00638       if python3 or type(_x) == unicode:
00639         _x = _x.encode('utf-8')
00640         length = len(_x)
00641       buff.write(struct.pack('<I%ss'%length, length, _x))
00642       _x = self
00643       buff.write(_struct_2I.pack(_x.result.contents.height, _x.result.contents.width))
00644       length = len(self.result.contents.fields)
00645       buff.write(_struct_I.pack(length))
00646       for val1 in self.result.contents.fields:
00647         _x = val1.name
00648         length = len(_x)
00649         if python3 or type(_x) == unicode:
00650           _x = _x.encode('utf-8')
00651           length = len(_x)
00652         buff.write(struct.pack('<I%ss'%length, length, _x))
00653         _x = val1
00654         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00655       _x = self
00656       buff.write(_struct_B2I.pack(_x.result.contents.is_bigendian, _x.result.contents.point_step, _x.result.contents.row_step))
00657       _x = self.result.contents.data
00658       length = len(_x)
00659       # - if encoded as a list instead, serialize as bytes instead of string
00660       if type(_x) in [list, tuple]:
00661         buff.write(struct.pack('<I%sB'%length, length, *_x))
00662       else:
00663         buff.write(struct.pack('<I%ss'%length, length, _x))
00664       _x = self
00665       buff.write(_struct_B3I.pack(_x.result.contents.is_dense, _x.result.container.header.seq, _x.result.container.header.stamp.secs, _x.result.container.header.stamp.nsecs))
00666       _x = self.result.container.header.frame_id
00667       length = len(_x)
00668       if python3 or type(_x) == unicode:
00669         _x = _x.encode('utf-8')
00670         length = len(_x)
00671       buff.write(struct.pack('<I%ss'%length, length, _x))
00672       _x = self
00673       buff.write(_struct_2I.pack(_x.result.container.height, _x.result.container.width))
00674       length = len(self.result.container.fields)
00675       buff.write(_struct_I.pack(length))
00676       for val1 in self.result.container.fields:
00677         _x = val1.name
00678         length = len(_x)
00679         if python3 or type(_x) == unicode:
00680           _x = _x.encode('utf-8')
00681           length = len(_x)
00682         buff.write(struct.pack('<I%ss'%length, length, _x))
00683         _x = val1
00684         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00685       _x = self
00686       buff.write(_struct_B2I.pack(_x.result.container.is_bigendian, _x.result.container.point_step, _x.result.container.row_step))
00687       _x = self.result.container.data
00688       length = len(_x)
00689       # - if encoded as a list instead, serialize as bytes instead of string
00690       if type(_x) in [list, tuple]:
00691         buff.write(struct.pack('<I%sB'%length, length, *_x))
00692       else:
00693         buff.write(struct.pack('<I%ss'%length, length, _x))
00694       buff.write(_struct_B.pack(self.result.container.is_dense))
00695       length = len(self.result.clusters)
00696       buff.write(_struct_I.pack(length))
00697       for val1 in self.result.clusters:
00698         _v5 = val1.header
00699         buff.write(_struct_I.pack(_v5.seq))
00700         _v6 = _v5.stamp
00701         _x = _v6
00702         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00703         _x = _v5.frame_id
00704         length = len(_x)
00705         if python3 or type(_x) == unicode:
00706           _x = _x.encode('utf-8')
00707           length = len(_x)
00708         buff.write(struct.pack('<I%ss'%length, length, _x))
00709         _x = val1
00710         buff.write(_struct_2I.pack(_x.height, _x.width))
00711         length = len(val1.fields)
00712         buff.write(_struct_I.pack(length))
00713         for val2 in val1.fields:
00714           _x = val2.name
00715           length = len(_x)
00716           if python3 or type(_x) == unicode:
00717             _x = _x.encode('utf-8')
00718             length = len(_x)
00719           buff.write(struct.pack('<I%ss'%length, length, _x))
00720           _x = val2
00721           buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00722         _x = val1
00723         buff.write(_struct_B2I.pack(_x.is_bigendian, _x.point_step, _x.row_step))
00724         _x = val1.data
00725         length = len(_x)
00726         # - if encoded as a list instead, serialize as bytes instead of string
00727         if type(_x) in [list, tuple]:
00728           buff.write(struct.pack('<I%sB'%length, length, *_x))
00729         else:
00730           buff.write(struct.pack('<I%ss'%length, length, _x))
00731         buff.write(_struct_B.pack(val1.is_dense))
00732     except struct.error as se: self._check_types(se)
00733     except TypeError as te: self._check_types(te)
00734 
00735   def deserialize_numpy(self, str, numpy):
00736     """
00737     unpack serialized message in str into this message instance using numpy for array types
00738     :param str: byte array of serialized message, ``str``
00739     :param numpy: numpy python module
00740     """
00741     try:
00742       if self.header is None:
00743         self.header = std_msgs.msg.Header()
00744       if self.status is None:
00745         self.status = actionlib_msgs.msg.GoalStatus()
00746       if self.result is None:
00747         self.result = object_manipulation_msgs.msg.FindContainerResult()
00748       end = 0
00749       _x = self
00750       start = end
00751       end += 12
00752       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00753       start = end
00754       end += 4
00755       (length,) = _struct_I.unpack(str[start:end])
00756       start = end
00757       end += length
00758       if python3:
00759         self.header.frame_id = str[start:end].decode('utf-8')
00760       else:
00761         self.header.frame_id = str[start:end]
00762       _x = self
00763       start = end
00764       end += 8
00765       (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00766       start = end
00767       end += 4
00768       (length,) = _struct_I.unpack(str[start:end])
00769       start = end
00770       end += length
00771       if python3:
00772         self.status.goal_id.id = str[start:end].decode('utf-8')
00773       else:
00774         self.status.goal_id.id = str[start:end]
00775       start = end
00776       end += 1
00777       (self.status.status,) = _struct_B.unpack(str[start:end])
00778       start = end
00779       end += 4
00780       (length,) = _struct_I.unpack(str[start:end])
00781       start = end
00782       end += length
00783       if python3:
00784         self.status.text = str[start:end].decode('utf-8')
00785       else:
00786         self.status.text = str[start:end]
00787       _x = self
00788       start = end
00789       end += 12
00790       (_x.result.box_pose.header.seq, _x.result.box_pose.header.stamp.secs, _x.result.box_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00791       start = end
00792       end += 4
00793       (length,) = _struct_I.unpack(str[start:end])
00794       start = end
00795       end += length
00796       if python3:
00797         self.result.box_pose.header.frame_id = str[start:end].decode('utf-8')
00798       else:
00799         self.result.box_pose.header.frame_id = str[start:end]
00800       _x = self
00801       start = end
00802       end += 92
00803       (_x.result.box_pose.pose.position.x, _x.result.box_pose.pose.position.y, _x.result.box_pose.pose.position.z, _x.result.box_pose.pose.orientation.x, _x.result.box_pose.pose.orientation.y, _x.result.box_pose.pose.orientation.z, _x.result.box_pose.pose.orientation.w, _x.result.box_dims.x, _x.result.box_dims.y, _x.result.box_dims.z, _x.result.contents.header.seq, _x.result.contents.header.stamp.secs, _x.result.contents.header.stamp.nsecs,) = _struct_10d3I.unpack(str[start:end])
00804       start = end
00805       end += 4
00806       (length,) = _struct_I.unpack(str[start:end])
00807       start = end
00808       end += length
00809       if python3:
00810         self.result.contents.header.frame_id = str[start:end].decode('utf-8')
00811       else:
00812         self.result.contents.header.frame_id = str[start:end]
00813       _x = self
00814       start = end
00815       end += 8
00816       (_x.result.contents.height, _x.result.contents.width,) = _struct_2I.unpack(str[start:end])
00817       start = end
00818       end += 4
00819       (length,) = _struct_I.unpack(str[start:end])
00820       self.result.contents.fields = []
00821       for i in range(0, length):
00822         val1 = sensor_msgs.msg.PointField()
00823         start = end
00824         end += 4
00825         (length,) = _struct_I.unpack(str[start:end])
00826         start = end
00827         end += length
00828         if python3:
00829           val1.name = str[start:end].decode('utf-8')
00830         else:
00831           val1.name = str[start:end]
00832         _x = val1
00833         start = end
00834         end += 9
00835         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00836         self.result.contents.fields.append(val1)
00837       _x = self
00838       start = end
00839       end += 9
00840       (_x.result.contents.is_bigendian, _x.result.contents.point_step, _x.result.contents.row_step,) = _struct_B2I.unpack(str[start:end])
00841       self.result.contents.is_bigendian = bool(self.result.contents.is_bigendian)
00842       start = end
00843       end += 4
00844       (length,) = _struct_I.unpack(str[start:end])
00845       start = end
00846       end += length
00847       if python3:
00848         self.result.contents.data = str[start:end].decode('utf-8')
00849       else:
00850         self.result.contents.data = str[start:end]
00851       _x = self
00852       start = end
00853       end += 13
00854       (_x.result.contents.is_dense, _x.result.container.header.seq, _x.result.container.header.stamp.secs, _x.result.container.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00855       self.result.contents.is_dense = bool(self.result.contents.is_dense)
00856       start = end
00857       end += 4
00858       (length,) = _struct_I.unpack(str[start:end])
00859       start = end
00860       end += length
00861       if python3:
00862         self.result.container.header.frame_id = str[start:end].decode('utf-8')
00863       else:
00864         self.result.container.header.frame_id = str[start:end]
00865       _x = self
00866       start = end
00867       end += 8
00868       (_x.result.container.height, _x.result.container.width,) = _struct_2I.unpack(str[start:end])
00869       start = end
00870       end += 4
00871       (length,) = _struct_I.unpack(str[start:end])
00872       self.result.container.fields = []
00873       for i in range(0, length):
00874         val1 = sensor_msgs.msg.PointField()
00875         start = end
00876         end += 4
00877         (length,) = _struct_I.unpack(str[start:end])
00878         start = end
00879         end += length
00880         if python3:
00881           val1.name = str[start:end].decode('utf-8')
00882         else:
00883           val1.name = str[start:end]
00884         _x = val1
00885         start = end
00886         end += 9
00887         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00888         self.result.container.fields.append(val1)
00889       _x = self
00890       start = end
00891       end += 9
00892       (_x.result.container.is_bigendian, _x.result.container.point_step, _x.result.container.row_step,) = _struct_B2I.unpack(str[start:end])
00893       self.result.container.is_bigendian = bool(self.result.container.is_bigendian)
00894       start = end
00895       end += 4
00896       (length,) = _struct_I.unpack(str[start:end])
00897       start = end
00898       end += length
00899       if python3:
00900         self.result.container.data = str[start:end].decode('utf-8')
00901       else:
00902         self.result.container.data = str[start:end]
00903       start = end
00904       end += 1
00905       (self.result.container.is_dense,) = _struct_B.unpack(str[start:end])
00906       self.result.container.is_dense = bool(self.result.container.is_dense)
00907       start = end
00908       end += 4
00909       (length,) = _struct_I.unpack(str[start:end])
00910       self.result.clusters = []
00911       for i in range(0, length):
00912         val1 = sensor_msgs.msg.PointCloud2()
00913         _v7 = val1.header
00914         start = end
00915         end += 4
00916         (_v7.seq,) = _struct_I.unpack(str[start:end])
00917         _v8 = _v7.stamp
00918         _x = _v8
00919         start = end
00920         end += 8
00921         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00922         start = end
00923         end += 4
00924         (length,) = _struct_I.unpack(str[start:end])
00925         start = end
00926         end += length
00927         if python3:
00928           _v7.frame_id = str[start:end].decode('utf-8')
00929         else:
00930           _v7.frame_id = str[start:end]
00931         _x = val1
00932         start = end
00933         end += 8
00934         (_x.height, _x.width,) = _struct_2I.unpack(str[start:end])
00935         start = end
00936         end += 4
00937         (length,) = _struct_I.unpack(str[start:end])
00938         val1.fields = []
00939         for i in range(0, length):
00940           val2 = sensor_msgs.msg.PointField()
00941           start = end
00942           end += 4
00943           (length,) = _struct_I.unpack(str[start:end])
00944           start = end
00945           end += length
00946           if python3:
00947             val2.name = str[start:end].decode('utf-8')
00948           else:
00949             val2.name = str[start:end]
00950           _x = val2
00951           start = end
00952           end += 9
00953           (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00954           val1.fields.append(val2)
00955         _x = val1
00956         start = end
00957         end += 9
00958         (_x.is_bigendian, _x.point_step, _x.row_step,) = _struct_B2I.unpack(str[start:end])
00959         val1.is_bigendian = bool(val1.is_bigendian)
00960         start = end
00961         end += 4
00962         (length,) = _struct_I.unpack(str[start:end])
00963         start = end
00964         end += length
00965         if python3:
00966           val1.data = str[start:end].decode('utf-8')
00967         else:
00968           val1.data = str[start:end]
00969         start = end
00970         end += 1
00971         (val1.is_dense,) = _struct_B.unpack(str[start:end])
00972         val1.is_dense = bool(val1.is_dense)
00973         self.result.clusters.append(val1)
00974       return self
00975     except struct.error as e:
00976       raise genpy.DeserializationError(e) #most likely buffer underfill
00977 
00978 _struct_I = genpy.struct_I
00979 _struct_IBI = struct.Struct("<IBI")
00980 _struct_B = struct.Struct("<B")
00981 _struct_10d3I = struct.Struct("<10d3I")
00982 _struct_3I = struct.Struct("<3I")
00983 _struct_B3I = struct.Struct("<B3I")
00984 _struct_B2I = struct.Struct("<B2I")
00985 _struct_2I = struct.Struct("<2I")


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