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