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