_StoreCloudActionResult.py
Go to the documentation of this file.
00001 """autogenerated by genpy from point_cloud_server/StoreCloudActionResult.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 sensor_msgs.msg
00008 import point_cloud_server.msg
00009 import genpy
00010 import actionlib_msgs.msg
00011 import std_msgs.msg
00012 
00013 class StoreCloudActionResult(genpy.Message):
00014   _md5sum = "56433c41ffc71f25e105fdb7bb83e9bd"
00015   _type = "point_cloud_server/StoreCloudActionResult"
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 StoreCloudResult 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: point_cloud_server/StoreCloudResult
00082 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00083 
00084 # The cloud that was stored (if return_cloud was true)
00085 sensor_msgs/PointCloud2 cloud
00086 
00087 # Any text that might be needed...
00088 int32 result
00089 
00090 int32 SUCCESS  = 0
00091 int32 NAME_ERROR  = 1
00092 int32 TOPIC_ERROR  = 2 
00093 int32 TF_ERROR = 3
00094 int32 OTHER_ERROR = 4
00095 
00096 
00097 ================================================================================
00098 MSG: sensor_msgs/PointCloud2
00099 # This message holds a collection of N-dimensional points, which may
00100 # contain additional information such as normals, intensity, etc. The
00101 # point data is stored as a binary blob, its layout described by the
00102 # contents of the "fields" array.
00103 
00104 # The point cloud data may be organized 2d (image-like) or 1d
00105 # (unordered). Point clouds organized as 2d images may be produced by
00106 # camera depth sensors such as stereo or time-of-flight.
00107 
00108 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00109 # points).
00110 Header header
00111 
00112 # 2D structure of the point cloud. If the cloud is unordered, height is
00113 # 1 and width is the length of the point cloud.
00114 uint32 height
00115 uint32 width
00116 
00117 # Describes the channels and their layout in the binary data blob.
00118 PointField[] fields
00119 
00120 bool    is_bigendian # Is this data bigendian?
00121 uint32  point_step   # Length of a point in bytes
00122 uint32  row_step     # Length of a row in bytes
00123 uint8[] data         # Actual point data, size is (row_step*height)
00124 
00125 bool is_dense        # True if there are no invalid points
00126 
00127 ================================================================================
00128 MSG: sensor_msgs/PointField
00129 # This message holds the description of one point entry in the
00130 # PointCloud2 message format.
00131 uint8 INT8    = 1
00132 uint8 UINT8   = 2
00133 uint8 INT16   = 3
00134 uint8 UINT16  = 4
00135 uint8 INT32   = 5
00136 uint8 UINT32  = 6
00137 uint8 FLOAT32 = 7
00138 uint8 FLOAT64 = 8
00139 
00140 string name      # Name of field
00141 uint32 offset    # Offset from start of point struct
00142 uint8  datatype  # Datatype enumeration, see above
00143 uint32 count     # How many elements in the field
00144 
00145 """
00146   __slots__ = ['header','status','result']
00147   _slot_types = ['std_msgs/Header','actionlib_msgs/GoalStatus','point_cloud_server/StoreCloudResult']
00148 
00149   def __init__(self, *args, **kwds):
00150     """
00151     Constructor. Any message fields that are implicitly/explicitly
00152     set to None will be assigned a default value. The recommend
00153     use is keyword arguments as this is more robust to future message
00154     changes.  You cannot mix in-order arguments and keyword arguments.
00155 
00156     The available fields are:
00157        header,status,result
00158 
00159     :param args: complete set of field values, in .msg order
00160     :param kwds: use keyword arguments corresponding to message field names
00161     to set specific fields.
00162     """
00163     if args or kwds:
00164       super(StoreCloudActionResult, self).__init__(*args, **kwds)
00165       #message fields cannot be None, assign default values for those that are
00166       if self.header is None:
00167         self.header = std_msgs.msg.Header()
00168       if self.status is None:
00169         self.status = actionlib_msgs.msg.GoalStatus()
00170       if self.result is None:
00171         self.result = point_cloud_server.msg.StoreCloudResult()
00172     else:
00173       self.header = std_msgs.msg.Header()
00174       self.status = actionlib_msgs.msg.GoalStatus()
00175       self.result = point_cloud_server.msg.StoreCloudResult()
00176 
00177   def _get_types(self):
00178     """
00179     internal API method
00180     """
00181     return self._slot_types
00182 
00183   def serialize(self, buff):
00184     """
00185     serialize message into buffer
00186     :param buff: buffer, ``StringIO``
00187     """
00188     try:
00189       _x = self
00190       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00191       _x = self.header.frame_id
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 = self
00198       buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00199       _x = self.status.goal_id.id
00200       length = len(_x)
00201       if python3 or type(_x) == unicode:
00202         _x = _x.encode('utf-8')
00203         length = len(_x)
00204       buff.write(struct.pack('<I%ss'%length, length, _x))
00205       buff.write(_struct_B.pack(self.status.status))
00206       _x = self.status.text
00207       length = len(_x)
00208       if python3 or type(_x) == unicode:
00209         _x = _x.encode('utf-8')
00210         length = len(_x)
00211       buff.write(struct.pack('<I%ss'%length, length, _x))
00212       _x = self
00213       buff.write(_struct_3I.pack(_x.result.cloud.header.seq, _x.result.cloud.header.stamp.secs, _x.result.cloud.header.stamp.nsecs))
00214       _x = self.result.cloud.header.frame_id
00215       length = len(_x)
00216       if python3 or type(_x) == unicode:
00217         _x = _x.encode('utf-8')
00218         length = len(_x)
00219       buff.write(struct.pack('<I%ss'%length, length, _x))
00220       _x = self
00221       buff.write(_struct_2I.pack(_x.result.cloud.height, _x.result.cloud.width))
00222       length = len(self.result.cloud.fields)
00223       buff.write(_struct_I.pack(length))
00224       for val1 in self.result.cloud.fields:
00225         _x = val1.name
00226         length = len(_x)
00227         if python3 or type(_x) == unicode:
00228           _x = _x.encode('utf-8')
00229           length = len(_x)
00230         buff.write(struct.pack('<I%ss'%length, length, _x))
00231         _x = val1
00232         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00233       _x = self
00234       buff.write(_struct_B2I.pack(_x.result.cloud.is_bigendian, _x.result.cloud.point_step, _x.result.cloud.row_step))
00235       _x = self.result.cloud.data
00236       length = len(_x)
00237       # - if encoded as a list instead, serialize as bytes instead of string
00238       if type(_x) in [list, tuple]:
00239         buff.write(struct.pack('<I%sB'%length, length, *_x))
00240       else:
00241         buff.write(struct.pack('<I%ss'%length, length, _x))
00242       _x = self
00243       buff.write(_struct_Bi.pack(_x.result.cloud.is_dense, _x.result.result))
00244     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00245     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00246 
00247   def deserialize(self, str):
00248     """
00249     unpack serialized message in str into this message instance
00250     :param str: byte array of serialized message, ``str``
00251     """
00252     try:
00253       if self.header is None:
00254         self.header = std_msgs.msg.Header()
00255       if self.status is None:
00256         self.status = actionlib_msgs.msg.GoalStatus()
00257       if self.result is None:
00258         self.result = point_cloud_server.msg.StoreCloudResult()
00259       end = 0
00260       _x = self
00261       start = end
00262       end += 12
00263       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00264       start = end
00265       end += 4
00266       (length,) = _struct_I.unpack(str[start:end])
00267       start = end
00268       end += length
00269       if python3:
00270         self.header.frame_id = str[start:end].decode('utf-8')
00271       else:
00272         self.header.frame_id = str[start:end]
00273       _x = self
00274       start = end
00275       end += 8
00276       (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00277       start = end
00278       end += 4
00279       (length,) = _struct_I.unpack(str[start:end])
00280       start = end
00281       end += length
00282       if python3:
00283         self.status.goal_id.id = str[start:end].decode('utf-8')
00284       else:
00285         self.status.goal_id.id = str[start:end]
00286       start = end
00287       end += 1
00288       (self.status.status,) = _struct_B.unpack(str[start:end])
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.status.text = str[start:end].decode('utf-8')
00296       else:
00297         self.status.text = str[start:end]
00298       _x = self
00299       start = end
00300       end += 12
00301       (_x.result.cloud.header.seq, _x.result.cloud.header.stamp.secs, _x.result.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00302       start = end
00303       end += 4
00304       (length,) = _struct_I.unpack(str[start:end])
00305       start = end
00306       end += length
00307       if python3:
00308         self.result.cloud.header.frame_id = str[start:end].decode('utf-8')
00309       else:
00310         self.result.cloud.header.frame_id = str[start:end]
00311       _x = self
00312       start = end
00313       end += 8
00314       (_x.result.cloud.height, _x.result.cloud.width,) = _struct_2I.unpack(str[start:end])
00315       start = end
00316       end += 4
00317       (length,) = _struct_I.unpack(str[start:end])
00318       self.result.cloud.fields = []
00319       for i in range(0, length):
00320         val1 = sensor_msgs.msg.PointField()
00321         start = end
00322         end += 4
00323         (length,) = _struct_I.unpack(str[start:end])
00324         start = end
00325         end += length
00326         if python3:
00327           val1.name = str[start:end].decode('utf-8')
00328         else:
00329           val1.name = str[start:end]
00330         _x = val1
00331         start = end
00332         end += 9
00333         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00334         self.result.cloud.fields.append(val1)
00335       _x = self
00336       start = end
00337       end += 9
00338       (_x.result.cloud.is_bigendian, _x.result.cloud.point_step, _x.result.cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00339       self.result.cloud.is_bigendian = bool(self.result.cloud.is_bigendian)
00340       start = end
00341       end += 4
00342       (length,) = _struct_I.unpack(str[start:end])
00343       start = end
00344       end += length
00345       self.result.cloud.data = str[start:end]
00346       _x = self
00347       start = end
00348       end += 5
00349       (_x.result.cloud.is_dense, _x.result.result,) = _struct_Bi.unpack(str[start:end])
00350       self.result.cloud.is_dense = bool(self.result.cloud.is_dense)
00351       return self
00352     except struct.error as e:
00353       raise genpy.DeserializationError(e) #most likely buffer underfill
00354 
00355 
00356   def serialize_numpy(self, buff, numpy):
00357     """
00358     serialize message with numpy array types into buffer
00359     :param buff: buffer, ``StringIO``
00360     :param numpy: numpy python module
00361     """
00362     try:
00363       _x = self
00364       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00365       _x = self.header.frame_id
00366       length = len(_x)
00367       if python3 or type(_x) == unicode:
00368         _x = _x.encode('utf-8')
00369         length = len(_x)
00370       buff.write(struct.pack('<I%ss'%length, length, _x))
00371       _x = self
00372       buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00373       _x = self.status.goal_id.id
00374       length = len(_x)
00375       if python3 or type(_x) == unicode:
00376         _x = _x.encode('utf-8')
00377         length = len(_x)
00378       buff.write(struct.pack('<I%ss'%length, length, _x))
00379       buff.write(_struct_B.pack(self.status.status))
00380       _x = self.status.text
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       _x = self
00387       buff.write(_struct_3I.pack(_x.result.cloud.header.seq, _x.result.cloud.header.stamp.secs, _x.result.cloud.header.stamp.nsecs))
00388       _x = self.result.cloud.header.frame_id
00389       length = len(_x)
00390       if python3 or type(_x) == unicode:
00391         _x = _x.encode('utf-8')
00392         length = len(_x)
00393       buff.write(struct.pack('<I%ss'%length, length, _x))
00394       _x = self
00395       buff.write(_struct_2I.pack(_x.result.cloud.height, _x.result.cloud.width))
00396       length = len(self.result.cloud.fields)
00397       buff.write(_struct_I.pack(length))
00398       for val1 in self.result.cloud.fields:
00399         _x = val1.name
00400         length = len(_x)
00401         if python3 or type(_x) == unicode:
00402           _x = _x.encode('utf-8')
00403           length = len(_x)
00404         buff.write(struct.pack('<I%ss'%length, length, _x))
00405         _x = val1
00406         buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00407       _x = self
00408       buff.write(_struct_B2I.pack(_x.result.cloud.is_bigendian, _x.result.cloud.point_step, _x.result.cloud.row_step))
00409       _x = self.result.cloud.data
00410       length = len(_x)
00411       # - if encoded as a list instead, serialize as bytes instead of string
00412       if type(_x) in [list, tuple]:
00413         buff.write(struct.pack('<I%sB'%length, length, *_x))
00414       else:
00415         buff.write(struct.pack('<I%ss'%length, length, _x))
00416       _x = self
00417       buff.write(_struct_Bi.pack(_x.result.cloud.is_dense, _x.result.result))
00418     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00419     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00420 
00421   def deserialize_numpy(self, str, numpy):
00422     """
00423     unpack serialized message in str into this message instance using numpy for array types
00424     :param str: byte array of serialized message, ``str``
00425     :param numpy: numpy python module
00426     """
00427     try:
00428       if self.header is None:
00429         self.header = std_msgs.msg.Header()
00430       if self.status is None:
00431         self.status = actionlib_msgs.msg.GoalStatus()
00432       if self.result is None:
00433         self.result = point_cloud_server.msg.StoreCloudResult()
00434       end = 0
00435       _x = self
00436       start = end
00437       end += 12
00438       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00439       start = end
00440       end += 4
00441       (length,) = _struct_I.unpack(str[start:end])
00442       start = end
00443       end += length
00444       if python3:
00445         self.header.frame_id = str[start:end].decode('utf-8')
00446       else:
00447         self.header.frame_id = str[start:end]
00448       _x = self
00449       start = end
00450       end += 8
00451       (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00452       start = end
00453       end += 4
00454       (length,) = _struct_I.unpack(str[start:end])
00455       start = end
00456       end += length
00457       if python3:
00458         self.status.goal_id.id = str[start:end].decode('utf-8')
00459       else:
00460         self.status.goal_id.id = str[start:end]
00461       start = end
00462       end += 1
00463       (self.status.status,) = _struct_B.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.text = str[start:end].decode('utf-8')
00471       else:
00472         self.status.text = str[start:end]
00473       _x = self
00474       start = end
00475       end += 12
00476       (_x.result.cloud.header.seq, _x.result.cloud.header.stamp.secs, _x.result.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00477       start = end
00478       end += 4
00479       (length,) = _struct_I.unpack(str[start:end])
00480       start = end
00481       end += length
00482       if python3:
00483         self.result.cloud.header.frame_id = str[start:end].decode('utf-8')
00484       else:
00485         self.result.cloud.header.frame_id = str[start:end]
00486       _x = self
00487       start = end
00488       end += 8
00489       (_x.result.cloud.height, _x.result.cloud.width,) = _struct_2I.unpack(str[start:end])
00490       start = end
00491       end += 4
00492       (length,) = _struct_I.unpack(str[start:end])
00493       self.result.cloud.fields = []
00494       for i in range(0, length):
00495         val1 = sensor_msgs.msg.PointField()
00496         start = end
00497         end += 4
00498         (length,) = _struct_I.unpack(str[start:end])
00499         start = end
00500         end += length
00501         if python3:
00502           val1.name = str[start:end].decode('utf-8')
00503         else:
00504           val1.name = str[start:end]
00505         _x = val1
00506         start = end
00507         end += 9
00508         (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00509         self.result.cloud.fields.append(val1)
00510       _x = self
00511       start = end
00512       end += 9
00513       (_x.result.cloud.is_bigendian, _x.result.cloud.point_step, _x.result.cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00514       self.result.cloud.is_bigendian = bool(self.result.cloud.is_bigendian)
00515       start = end
00516       end += 4
00517       (length,) = _struct_I.unpack(str[start:end])
00518       start = end
00519       end += length
00520       self.result.cloud.data = str[start:end]
00521       _x = self
00522       start = end
00523       end += 5
00524       (_x.result.cloud.is_dense, _x.result.result,) = _struct_Bi.unpack(str[start:end])
00525       self.result.cloud.is_dense = bool(self.result.cloud.is_dense)
00526       return self
00527     except struct.error as e:
00528       raise genpy.DeserializationError(e) #most likely buffer underfill
00529 
00530 _struct_I = genpy.struct_I
00531 _struct_IBI = struct.Struct("<IBI")
00532 _struct_B = struct.Struct("<B")
00533 _struct_Bi = struct.Struct("<Bi")
00534 _struct_3I = struct.Struct("<3I")
00535 _struct_B2I = struct.Struct("<B2I")
00536 _struct_2I = struct.Struct("<2I")


point_cloud_server
Author(s): Adam Leeper
autogenerated on Mon Oct 6 2014 03:01:14