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