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


pr2_create_object_model
Author(s): Kaijen Hsiao
autogenerated on Mon Oct 6 2014 11:49:24