00001 """autogenerated by genpy from point_cloud_server/StoreCloudResult.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 std_msgs.msg
00008 import sensor_msgs.msg
00009
00010 class StoreCloudResult(genpy.Message):
00011 _md5sum = "2961eff5597c2ddf0251a9a59d88d423"
00012 _type = "point_cloud_server/StoreCloudResult"
00013 _has_header = False
00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00015
00016 # The cloud that was stored (if return_cloud was true)
00017 sensor_msgs/PointCloud2 cloud
00018
00019 # Any text that might be needed...
00020 int32 result
00021
00022 int32 SUCCESS = 0
00023 int32 NAME_ERROR = 1
00024 int32 TOPIC_ERROR = 2
00025 int32 TF_ERROR = 3
00026 int32 OTHER_ERROR = 4
00027
00028
00029 ================================================================================
00030 MSG: sensor_msgs/PointCloud2
00031 # This message holds a collection of N-dimensional points, which may
00032 # contain additional information such as normals, intensity, etc. The
00033 # point data is stored as a binary blob, its layout described by the
00034 # contents of the "fields" array.
00035
00036 # The point cloud data may be organized 2d (image-like) or 1d
00037 # (unordered). Point clouds organized as 2d images may be produced by
00038 # camera depth sensors such as stereo or time-of-flight.
00039
00040 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00041 # points).
00042 Header header
00043
00044 # 2D structure of the point cloud. If the cloud is unordered, height is
00045 # 1 and width is the length of the point cloud.
00046 uint32 height
00047 uint32 width
00048
00049 # Describes the channels and their layout in the binary data blob.
00050 PointField[] fields
00051
00052 bool is_bigendian # Is this data bigendian?
00053 uint32 point_step # Length of a point in bytes
00054 uint32 row_step # Length of a row in bytes
00055 uint8[] data # Actual point data, size is (row_step*height)
00056
00057 bool is_dense # True if there are no invalid points
00058
00059 ================================================================================
00060 MSG: std_msgs/Header
00061 # Standard metadata for higher-level stamped data types.
00062 # This is generally used to communicate timestamped data
00063 # in a particular coordinate frame.
00064 #
00065 # sequence ID: consecutively increasing ID
00066 uint32 seq
00067 #Two-integer timestamp that is expressed as:
00068 # * stamp.secs: seconds (stamp_secs) since epoch
00069 # * stamp.nsecs: nanoseconds since stamp_secs
00070 # time-handling sugar is provided by the client library
00071 time stamp
00072 #Frame this data is associated with
00073 # 0: no frame
00074 # 1: global frame
00075 string frame_id
00076
00077 ================================================================================
00078 MSG: sensor_msgs/PointField
00079 # This message holds the description of one point entry in the
00080 # PointCloud2 message format.
00081 uint8 INT8 = 1
00082 uint8 UINT8 = 2
00083 uint8 INT16 = 3
00084 uint8 UINT16 = 4
00085 uint8 INT32 = 5
00086 uint8 UINT32 = 6
00087 uint8 FLOAT32 = 7
00088 uint8 FLOAT64 = 8
00089
00090 string name # Name of field
00091 uint32 offset # Offset from start of point struct
00092 uint8 datatype # Datatype enumeration, see above
00093 uint32 count # How many elements in the field
00094
00095 """
00096
00097 SUCCESS = 0
00098 NAME_ERROR = 1
00099 TOPIC_ERROR = 2
00100 TF_ERROR = 3
00101 OTHER_ERROR = 4
00102
00103 __slots__ = ['cloud','result']
00104 _slot_types = ['sensor_msgs/PointCloud2','int32']
00105
00106 def __init__(self, *args, **kwds):
00107 """
00108 Constructor. Any message fields that are implicitly/explicitly
00109 set to None will be assigned a default value. The recommend
00110 use is keyword arguments as this is more robust to future message
00111 changes. You cannot mix in-order arguments and keyword arguments.
00112
00113 The available fields are:
00114 cloud,result
00115
00116 :param args: complete set of field values, in .msg order
00117 :param kwds: use keyword arguments corresponding to message field names
00118 to set specific fields.
00119 """
00120 if args or kwds:
00121 super(StoreCloudResult, self).__init__(*args, **kwds)
00122
00123 if self.cloud is None:
00124 self.cloud = sensor_msgs.msg.PointCloud2()
00125 if self.result is None:
00126 self.result = 0
00127 else:
00128 self.cloud = sensor_msgs.msg.PointCloud2()
00129 self.result = 0
00130
00131 def _get_types(self):
00132 """
00133 internal API method
00134 """
00135 return self._slot_types
00136
00137 def serialize(self, buff):
00138 """
00139 serialize message into buffer
00140 :param buff: buffer, ``StringIO``
00141 """
00142 try:
00143 _x = self
00144 buff.write(_struct_3I.pack(_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs))
00145 _x = self.cloud.header.frame_id
00146 length = len(_x)
00147 if python3 or type(_x) == unicode:
00148 _x = _x.encode('utf-8')
00149 length = len(_x)
00150 buff.write(struct.pack('<I%ss'%length, length, _x))
00151 _x = self
00152 buff.write(_struct_2I.pack(_x.cloud.height, _x.cloud.width))
00153 length = len(self.cloud.fields)
00154 buff.write(_struct_I.pack(length))
00155 for val1 in self.cloud.fields:
00156 _x = val1.name
00157 length = len(_x)
00158 if python3 or type(_x) == unicode:
00159 _x = _x.encode('utf-8')
00160 length = len(_x)
00161 buff.write(struct.pack('<I%ss'%length, length, _x))
00162 _x = val1
00163 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00164 _x = self
00165 buff.write(_struct_B2I.pack(_x.cloud.is_bigendian, _x.cloud.point_step, _x.cloud.row_step))
00166 _x = self.cloud.data
00167 length = len(_x)
00168
00169 if type(_x) in [list, tuple]:
00170 buff.write(struct.pack('<I%sB'%length, length, *_x))
00171 else:
00172 buff.write(struct.pack('<I%ss'%length, length, _x))
00173 _x = self
00174 buff.write(_struct_Bi.pack(_x.cloud.is_dense, _x.result))
00175 except struct.error as se: self._check_types(se)
00176 except TypeError as te: self._check_types(te)
00177
00178 def deserialize(self, str):
00179 """
00180 unpack serialized message in str into this message instance
00181 :param str: byte array of serialized message, ``str``
00182 """
00183 try:
00184 if self.cloud is None:
00185 self.cloud = sensor_msgs.msg.PointCloud2()
00186 end = 0
00187 _x = self
00188 start = end
00189 end += 12
00190 (_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00191 start = end
00192 end += 4
00193 (length,) = _struct_I.unpack(str[start:end])
00194 start = end
00195 end += length
00196 if python3:
00197 self.cloud.header.frame_id = str[start:end].decode('utf-8')
00198 else:
00199 self.cloud.header.frame_id = str[start:end]
00200 _x = self
00201 start = end
00202 end += 8
00203 (_x.cloud.height, _x.cloud.width,) = _struct_2I.unpack(str[start:end])
00204 start = end
00205 end += 4
00206 (length,) = _struct_I.unpack(str[start:end])
00207 self.cloud.fields = []
00208 for i in range(0, length):
00209 val1 = sensor_msgs.msg.PointField()
00210 start = end
00211 end += 4
00212 (length,) = _struct_I.unpack(str[start:end])
00213 start = end
00214 end += length
00215 if python3:
00216 val1.name = str[start:end].decode('utf-8')
00217 else:
00218 val1.name = str[start:end]
00219 _x = val1
00220 start = end
00221 end += 9
00222 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00223 self.cloud.fields.append(val1)
00224 _x = self
00225 start = end
00226 end += 9
00227 (_x.cloud.is_bigendian, _x.cloud.point_step, _x.cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00228 self.cloud.is_bigendian = bool(self.cloud.is_bigendian)
00229 start = end
00230 end += 4
00231 (length,) = _struct_I.unpack(str[start:end])
00232 start = end
00233 end += length
00234 if python3:
00235 self.cloud.data = str[start:end].decode('utf-8')
00236 else:
00237 self.cloud.data = str[start:end]
00238 _x = self
00239 start = end
00240 end += 5
00241 (_x.cloud.is_dense, _x.result,) = _struct_Bi.unpack(str[start:end])
00242 self.cloud.is_dense = bool(self.cloud.is_dense)
00243 return self
00244 except struct.error as e:
00245 raise genpy.DeserializationError(e)
00246
00247
00248 def serialize_numpy(self, buff, numpy):
00249 """
00250 serialize message with numpy array types into buffer
00251 :param buff: buffer, ``StringIO``
00252 :param numpy: numpy python module
00253 """
00254 try:
00255 _x = self
00256 buff.write(_struct_3I.pack(_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs))
00257 _x = self.cloud.header.frame_id
00258 length = len(_x)
00259 if python3 or type(_x) == unicode:
00260 _x = _x.encode('utf-8')
00261 length = len(_x)
00262 buff.write(struct.pack('<I%ss'%length, length, _x))
00263 _x = self
00264 buff.write(_struct_2I.pack(_x.cloud.height, _x.cloud.width))
00265 length = len(self.cloud.fields)
00266 buff.write(_struct_I.pack(length))
00267 for val1 in self.cloud.fields:
00268 _x = val1.name
00269 length = len(_x)
00270 if python3 or type(_x) == unicode:
00271 _x = _x.encode('utf-8')
00272 length = len(_x)
00273 buff.write(struct.pack('<I%ss'%length, length, _x))
00274 _x = val1
00275 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00276 _x = self
00277 buff.write(_struct_B2I.pack(_x.cloud.is_bigendian, _x.cloud.point_step, _x.cloud.row_step))
00278 _x = self.cloud.data
00279 length = len(_x)
00280
00281 if type(_x) in [list, tuple]:
00282 buff.write(struct.pack('<I%sB'%length, length, *_x))
00283 else:
00284 buff.write(struct.pack('<I%ss'%length, length, _x))
00285 _x = self
00286 buff.write(_struct_Bi.pack(_x.cloud.is_dense, _x.result))
00287 except struct.error as se: self._check_types(se)
00288 except TypeError as te: self._check_types(te)
00289
00290 def deserialize_numpy(self, str, numpy):
00291 """
00292 unpack serialized message in str into this message instance using numpy for array types
00293 :param str: byte array of serialized message, ``str``
00294 :param numpy: numpy python module
00295 """
00296 try:
00297 if self.cloud is None:
00298 self.cloud = sensor_msgs.msg.PointCloud2()
00299 end = 0
00300 _x = self
00301 start = end
00302 end += 12
00303 (_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00304 start = end
00305 end += 4
00306 (length,) = _struct_I.unpack(str[start:end])
00307 start = end
00308 end += length
00309 if python3:
00310 self.cloud.header.frame_id = str[start:end].decode('utf-8')
00311 else:
00312 self.cloud.header.frame_id = str[start:end]
00313 _x = self
00314 start = end
00315 end += 8
00316 (_x.cloud.height, _x.cloud.width,) = _struct_2I.unpack(str[start:end])
00317 start = end
00318 end += 4
00319 (length,) = _struct_I.unpack(str[start:end])
00320 self.cloud.fields = []
00321 for i in range(0, length):
00322 val1 = sensor_msgs.msg.PointField()
00323 start = end
00324 end += 4
00325 (length,) = _struct_I.unpack(str[start:end])
00326 start = end
00327 end += length
00328 if python3:
00329 val1.name = str[start:end].decode('utf-8')
00330 else:
00331 val1.name = str[start:end]
00332 _x = val1
00333 start = end
00334 end += 9
00335 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00336 self.cloud.fields.append(val1)
00337 _x = self
00338 start = end
00339 end += 9
00340 (_x.cloud.is_bigendian, _x.cloud.point_step, _x.cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00341 self.cloud.is_bigendian = bool(self.cloud.is_bigendian)
00342 start = end
00343 end += 4
00344 (length,) = _struct_I.unpack(str[start:end])
00345 start = end
00346 end += length
00347 if python3:
00348 self.cloud.data = str[start:end].decode('utf-8')
00349 else:
00350 self.cloud.data = str[start:end]
00351 _x = self
00352 start = end
00353 end += 5
00354 (_x.cloud.is_dense, _x.result,) = _struct_Bi.unpack(str[start:end])
00355 self.cloud.is_dense = bool(self.cloud.is_dense)
00356 return self
00357 except struct.error as e:
00358 raise genpy.DeserializationError(e)
00359
00360 _struct_I = genpy.struct_I
00361 _struct_IBI = struct.Struct("<IBI")
00362 _struct_3I = struct.Struct("<3I")
00363 _struct_2I = struct.Struct("<2I")
00364 _struct_B2I = struct.Struct("<B2I")
00365 _struct_Bi = struct.Struct("<Bi")