00001 """autogenerated by genpy from pr2_laser_snapshotter/TiltLaserSnapshotActionResult.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 actionlib_msgs.msg
00008 import geometry_msgs.msg
00009 import pr2_laser_snapshotter.msg
00010 import sensor_msgs.msg
00011 import genpy
00012 import std_msgs.msg
00013
00014 class TiltLaserSnapshotActionResult(genpy.Message):
00015 _md5sum = "ace0030a3097af6fe220872fe01d4e18"
00016 _type = "pr2_laser_snapshotter/TiltLaserSnapshotActionResult"
00017 _has_header = True
00018 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00019
00020 Header header
00021 actionlib_msgs/GoalStatus status
00022 TiltLaserSnapshotResult result
00023
00024 ================================================================================
00025 MSG: std_msgs/Header
00026 # Standard metadata for higher-level stamped data types.
00027 # This is generally used to communicate timestamped data
00028 # in a particular coordinate frame.
00029 #
00030 # sequence ID: consecutively increasing ID
00031 uint32 seq
00032 #Two-integer timestamp that is expressed as:
00033 # * stamp.secs: seconds (stamp_secs) since epoch
00034 # * stamp.nsecs: nanoseconds since stamp_secs
00035 # time-handling sugar is provided by the client library
00036 time stamp
00037 #Frame this data is associated with
00038 # 0: no frame
00039 # 1: global frame
00040 string frame_id
00041
00042 ================================================================================
00043 MSG: actionlib_msgs/GoalStatus
00044 GoalID goal_id
00045 uint8 status
00046 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00047 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00048 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00049 # and has since completed its execution (Terminal State)
00050 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00051 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00052 # to some failure (Terminal State)
00053 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00054 # because the goal was unattainable or invalid (Terminal State)
00055 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00056 # and has not yet completed execution
00057 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00058 # but the action server has not yet confirmed that the goal is canceled
00059 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00060 # and was successfully cancelled (Terminal State)
00061 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00062 # sent over the wire by an action server
00063
00064 #Allow for the user to associate a string with GoalStatus for debugging
00065 string text
00066
00067
00068 ================================================================================
00069 MSG: actionlib_msgs/GoalID
00070 # The stamp should store the time at which this goal was requested.
00071 # It is used by an action server when it tries to preempt all
00072 # goals that were requested before a certain time
00073 time stamp
00074
00075 # The id provides a way to associate feedback and
00076 # result message with specific goal requests. The id
00077 # specified must be unique.
00078 string id
00079
00080
00081 ================================================================================
00082 MSG: pr2_laser_snapshotter/TiltLaserSnapshotResult
00083 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00084 sensor_msgs/PointCloud cloud
00085
00086 ================================================================================
00087 MSG: sensor_msgs/PointCloud
00088 # This message holds a collection of 3d points, plus optional additional
00089 # information about each point.
00090
00091 # Time of sensor data acquisition, coordinate frame ID.
00092 Header header
00093
00094 # Array of 3d points. Each Point32 should be interpreted as a 3d point
00095 # in the frame given in the header.
00096 geometry_msgs/Point32[] points
00097
00098 # Each channel should have the same number of elements as points array,
00099 # and the data in each channel should correspond 1:1 with each point.
00100 # Channel names in common practice are listed in ChannelFloat32.msg.
00101 ChannelFloat32[] channels
00102
00103 ================================================================================
00104 MSG: geometry_msgs/Point32
00105 # This contains the position of a point in free space(with 32 bits of precision).
00106 # It is recommeded to use Point wherever possible instead of Point32.
00107 #
00108 # This recommendation is to promote interoperability.
00109 #
00110 # This message is designed to take up less space when sending
00111 # lots of points at once, as in the case of a PointCloud.
00112
00113 float32 x
00114 float32 y
00115 float32 z
00116 ================================================================================
00117 MSG: sensor_msgs/ChannelFloat32
00118 # This message is used by the PointCloud message to hold optional data
00119 # associated with each point in the cloud. The length of the values
00120 # array should be the same as the length of the points array in the
00121 # PointCloud, and each value should be associated with the corresponding
00122 # point.
00123
00124 # Channel names in existing practice include:
00125 # "u", "v" - row and column (respectively) in the left stereo image.
00126 # This is opposite to usual conventions but remains for
00127 # historical reasons. The newer PointCloud2 message has no
00128 # such problem.
00129 # "rgb" - For point clouds produced by color stereo cameras. uint8
00130 # (R,G,B) values packed into the least significant 24 bits,
00131 # in order.
00132 # "intensity" - laser or pixel intensity.
00133 # "distance"
00134
00135 # The channel name should give semantics of the channel (e.g.
00136 # "intensity" instead of "value").
00137 string name
00138
00139 # The values array should be 1-1 with the elements of the associated
00140 # PointCloud.
00141 float32[] values
00142
00143 """
00144 __slots__ = ['header','status','result']
00145 _slot_types = ['std_msgs/Header','actionlib_msgs/GoalStatus','pr2_laser_snapshotter/TiltLaserSnapshotResult']
00146
00147 def __init__(self, *args, **kwds):
00148 """
00149 Constructor. Any message fields that are implicitly/explicitly
00150 set to None will be assigned a default value. The recommend
00151 use is keyword arguments as this is more robust to future message
00152 changes. You cannot mix in-order arguments and keyword arguments.
00153
00154 The available fields are:
00155 header,status,result
00156
00157 :param args: complete set of field values, in .msg order
00158 :param kwds: use keyword arguments corresponding to message field names
00159 to set specific fields.
00160 """
00161 if args or kwds:
00162 super(TiltLaserSnapshotActionResult, self).__init__(*args, **kwds)
00163 #message fields cannot be None, assign default values for those that are
00164 if self.header is None:
00165 self.header = std_msgs.msg.Header()
00166 if self.status is None:
00167 self.status = actionlib_msgs.msg.GoalStatus()
00168 if self.result is None:
00169 self.result = pr2_laser_snapshotter.msg.TiltLaserSnapshotResult()
00170 else:
00171 self.header = std_msgs.msg.Header()
00172 self.status = actionlib_msgs.msg.GoalStatus()
00173 self.result = pr2_laser_snapshotter.msg.TiltLaserSnapshotResult()
00174
00175 def _get_types(self):
00176 """
00177 internal API method
00178 """
00179 return self._slot_types
00180
00181 def serialize(self, buff):
00182 """
00183 serialize message into buffer
00184 :param buff: buffer, ``StringIO``
00185 """
00186 try:
00187 _x = self
00188 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00189 _x = self.header.frame_id
00190 length = len(_x)
00191 if python3 or type(_x) == unicode:
00192 _x = _x.encode('utf-8')
00193 length = len(_x)
00194 buff.write(struct.pack('<I%ss'%length, length, _x))
00195 _x = self
00196 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00197 _x = self.status.goal_id.id
00198 length = len(_x)
00199 if python3 or type(_x) == unicode:
00200 _x = _x.encode('utf-8')
00201 length = len(_x)
00202 buff.write(struct.pack('<I%ss'%length, length, _x))
00203 buff.write(_struct_B.pack(self.status.status))
00204 _x = self.status.text
00205 length = len(_x)
00206 if python3 or type(_x) == unicode:
00207 _x = _x.encode('utf-8')
00208 length = len(_x)
00209 buff.write(struct.pack('<I%ss'%length, length, _x))
00210 _x = self
00211 buff.write(_struct_3I.pack(_x.result.cloud.header.seq, _x.result.cloud.header.stamp.secs, _x.result.cloud.header.stamp.nsecs))
00212 _x = self.result.cloud.header.frame_id
00213 length = len(_x)
00214 if python3 or type(_x) == unicode:
00215 _x = _x.encode('utf-8')
00216 length = len(_x)
00217 buff.write(struct.pack('<I%ss'%length, length, _x))
00218 length = len(self.result.cloud.points)
00219 buff.write(_struct_I.pack(length))
00220 for val1 in self.result.cloud.points:
00221 _x = val1
00222 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00223 length = len(self.result.cloud.channels)
00224 buff.write(_struct_I.pack(length))
00225 for val1 in self.result.cloud.channels:
00226 _x = val1.name
00227 length = len(_x)
00228 if python3 or type(_x) == unicode:
00229 _x = _x.encode('utf-8')
00230 length = len(_x)
00231 buff.write(struct.pack('<I%ss'%length, length, _x))
00232 length = len(val1.values)
00233 buff.write(_struct_I.pack(length))
00234 pattern = '<%sf'%length
00235 buff.write(struct.pack(pattern, *val1.values))
00236 except struct.error as se: self._check_types(se)
00237 except TypeError as te: self._check_types(te)
00238
00239 def deserialize(self, str):
00240 """
00241 unpack serialized message in str into this message instance
00242 :param str: byte array of serialized message, ``str``
00243 """
00244 try:
00245 if self.header is None:
00246 self.header = std_msgs.msg.Header()
00247 if self.status is None:
00248 self.status = actionlib_msgs.msg.GoalStatus()
00249 if self.result is None:
00250 self.result = pr2_laser_snapshotter.msg.TiltLaserSnapshotResult()
00251 end = 0
00252 _x = self
00253 start = end
00254 end += 12
00255 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00256 start = end
00257 end += 4
00258 (length,) = _struct_I.unpack(str[start:end])
00259 start = end
00260 end += length
00261 if python3:
00262 self.header.frame_id = str[start:end].decode('utf-8')
00263 else:
00264 self.header.frame_id = str[start:end]
00265 _x = self
00266 start = end
00267 end += 8
00268 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00269 start = end
00270 end += 4
00271 (length,) = _struct_I.unpack(str[start:end])
00272 start = end
00273 end += length
00274 if python3:
00275 self.status.goal_id.id = str[start:end].decode('utf-8')
00276 else:
00277 self.status.goal_id.id = str[start:end]
00278 start = end
00279 end += 1
00280 (self.status.status,) = _struct_B.unpack(str[start:end])
00281 start = end
00282 end += 4
00283 (length,) = _struct_I.unpack(str[start:end])
00284 start = end
00285 end += length
00286 if python3:
00287 self.status.text = str[start:end].decode('utf-8')
00288 else:
00289 self.status.text = str[start:end]
00290 _x = self
00291 start = end
00292 end += 12
00293 (_x.result.cloud.header.seq, _x.result.cloud.header.stamp.secs, _x.result.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00294 start = end
00295 end += 4
00296 (length,) = _struct_I.unpack(str[start:end])
00297 start = end
00298 end += length
00299 if python3:
00300 self.result.cloud.header.frame_id = str[start:end].decode('utf-8')
00301 else:
00302 self.result.cloud.header.frame_id = str[start:end]
00303 start = end
00304 end += 4
00305 (length,) = _struct_I.unpack(str[start:end])
00306 self.result.cloud.points = []
00307 for i in range(0, length):
00308 val1 = geometry_msgs.msg.Point32()
00309 _x = val1
00310 start = end
00311 end += 12
00312 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00313 self.result.cloud.points.append(val1)
00314 start = end
00315 end += 4
00316 (length,) = _struct_I.unpack(str[start:end])
00317 self.result.cloud.channels = []
00318 for i in range(0, length):
00319 val1 = sensor_msgs.msg.ChannelFloat32()
00320 start = end
00321 end += 4
00322 (length,) = _struct_I.unpack(str[start:end])
00323 start = end
00324 end += length
00325 if python3:
00326 val1.name = str[start:end].decode('utf-8')
00327 else:
00328 val1.name = str[start:end]
00329 start = end
00330 end += 4
00331 (length,) = _struct_I.unpack(str[start:end])
00332 pattern = '<%sf'%length
00333 start = end
00334 end += struct.calcsize(pattern)
00335 val1.values = struct.unpack(pattern, str[start:end])
00336 self.result.cloud.channels.append(val1)
00337 return self
00338 except struct.error as e:
00339 raise genpy.DeserializationError(e) #most likely buffer underfill
00340
00341
00342 def serialize_numpy(self, buff, numpy):
00343 """
00344 serialize message with numpy array types into buffer
00345 :param buff: buffer, ``StringIO``
00346 :param numpy: numpy python module
00347 """
00348 try:
00349 _x = self
00350 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00351 _x = self.header.frame_id
00352 length = len(_x)
00353 if python3 or type(_x) == unicode:
00354 _x = _x.encode('utf-8')
00355 length = len(_x)
00356 buff.write(struct.pack('<I%ss'%length, length, _x))
00357 _x = self
00358 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00359 _x = self.status.goal_id.id
00360 length = len(_x)
00361 if python3 or type(_x) == unicode:
00362 _x = _x.encode('utf-8')
00363 length = len(_x)
00364 buff.write(struct.pack('<I%ss'%length, length, _x))
00365 buff.write(_struct_B.pack(self.status.status))
00366 _x = self.status.text
00367 length = len(_x)
00368 if python3 or type(_x) == unicode:
00369 _x = _x.encode('utf-8')
00370 length = len(_x)
00371 buff.write(struct.pack('<I%ss'%length, length, _x))
00372 _x = self
00373 buff.write(_struct_3I.pack(_x.result.cloud.header.seq, _x.result.cloud.header.stamp.secs, _x.result.cloud.header.stamp.nsecs))
00374 _x = self.result.cloud.header.frame_id
00375 length = len(_x)
00376 if python3 or type(_x) == unicode:
00377 _x = _x.encode('utf-8')
00378 length = len(_x)
00379 buff.write(struct.pack('<I%ss'%length, length, _x))
00380 length = len(self.result.cloud.points)
00381 buff.write(_struct_I.pack(length))
00382 for val1 in self.result.cloud.points:
00383 _x = val1
00384 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00385 length = len(self.result.cloud.channels)
00386 buff.write(_struct_I.pack(length))
00387 for val1 in self.result.cloud.channels:
00388 _x = val1.name
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 length = len(val1.values)
00395 buff.write(_struct_I.pack(length))
00396 pattern = '<%sf'%length
00397 buff.write(val1.values.tostring())
00398 except struct.error as se: self._check_types(se)
00399 except TypeError as te: self._check_types(te)
00400
00401 def deserialize_numpy(self, str, numpy):
00402 """
00403 unpack serialized message in str into this message instance using numpy for array types
00404 :param str: byte array of serialized message, ``str``
00405 :param numpy: numpy python module
00406 """
00407 try:
00408 if self.header is None:
00409 self.header = std_msgs.msg.Header()
00410 if self.status is None:
00411 self.status = actionlib_msgs.msg.GoalStatus()
00412 if self.result is None:
00413 self.result = pr2_laser_snapshotter.msg.TiltLaserSnapshotResult()
00414 end = 0
00415 _x = self
00416 start = end
00417 end += 12
00418 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00419 start = end
00420 end += 4
00421 (length,) = _struct_I.unpack(str[start:end])
00422 start = end
00423 end += length
00424 if python3:
00425 self.header.frame_id = str[start:end].decode('utf-8')
00426 else:
00427 self.header.frame_id = str[start:end]
00428 _x = self
00429 start = end
00430 end += 8
00431 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00432 start = end
00433 end += 4
00434 (length,) = _struct_I.unpack(str[start:end])
00435 start = end
00436 end += length
00437 if python3:
00438 self.status.goal_id.id = str[start:end].decode('utf-8')
00439 else:
00440 self.status.goal_id.id = str[start:end]
00441 start = end
00442 end += 1
00443 (self.status.status,) = _struct_B.unpack(str[start:end])
00444 start = end
00445 end += 4
00446 (length,) = _struct_I.unpack(str[start:end])
00447 start = end
00448 end += length
00449 if python3:
00450 self.status.text = str[start:end].decode('utf-8')
00451 else:
00452 self.status.text = str[start:end]
00453 _x = self
00454 start = end
00455 end += 12
00456 (_x.result.cloud.header.seq, _x.result.cloud.header.stamp.secs, _x.result.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00457 start = end
00458 end += 4
00459 (length,) = _struct_I.unpack(str[start:end])
00460 start = end
00461 end += length
00462 if python3:
00463 self.result.cloud.header.frame_id = str[start:end].decode('utf-8')
00464 else:
00465 self.result.cloud.header.frame_id = str[start:end]
00466 start = end
00467 end += 4
00468 (length,) = _struct_I.unpack(str[start:end])
00469 self.result.cloud.points = []
00470 for i in range(0, length):
00471 val1 = geometry_msgs.msg.Point32()
00472 _x = val1
00473 start = end
00474 end += 12
00475 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00476 self.result.cloud.points.append(val1)
00477 start = end
00478 end += 4
00479 (length,) = _struct_I.unpack(str[start:end])
00480 self.result.cloud.channels = []
00481 for i in range(0, length):
00482 val1 = sensor_msgs.msg.ChannelFloat32()
00483 start = end
00484 end += 4
00485 (length,) = _struct_I.unpack(str[start:end])
00486 start = end
00487 end += length
00488 if python3:
00489 val1.name = str[start:end].decode('utf-8')
00490 else:
00491 val1.name = str[start:end]
00492 start = end
00493 end += 4
00494 (length,) = _struct_I.unpack(str[start:end])
00495 pattern = '<%sf'%length
00496 start = end
00497 end += struct.calcsize(pattern)
00498 val1.values = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
00499 self.result.cloud.channels.append(val1)
00500 return self
00501 except struct.error as e:
00502 raise genpy.DeserializationError(e) #most likely buffer underfill
00503
00504 _struct_I = genpy.struct_I
00505 _struct_3I = struct.Struct("<3I")
00506 _struct_B = struct.Struct("<B")
00507 _struct_2I = struct.Struct("<2I")
00508 _struct_3f = struct.Struct("<3f")