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