00001 """autogenerated by genmsg_py from FaceDetectorActionResult.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import people_msgs.msg
00006 import roslib.rostime
00007 import actionlib_msgs.msg
00008 import geometry_msgs.msg
00009 import face_detector.msg
00010 import std_msgs.msg
00011
00012 class FaceDetectorActionResult(roslib.message.Message):
00013 _md5sum = "d3986ecc4dd47eb1142da1c68ce02ae7"
00014 _type = "face_detector/FaceDetectorActionResult"
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 FaceDetectorResult 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: face_detector/FaceDetectorResult
00081 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00082 #result
00083 people_msgs/PositionMeasurement[] face_positions
00084
00085 ================================================================================
00086 MSG: people_msgs/PositionMeasurement
00087 Header header
00088 string name
00089 string object_id
00090 geometry_msgs/Point pos
00091 float64 reliability
00092 float64[9] covariance
00093 byte initialization
00094 ================================================================================
00095 MSG: geometry_msgs/Point
00096 # This contains the position of a point in free space
00097 float64 x
00098 float64 y
00099 float64 z
00100
00101 """
00102 __slots__ = ['header','status','result']
00103 _slot_types = ['Header','actionlib_msgs/GoalStatus','face_detector/FaceDetectorResult']
00104
00105 def __init__(self, *args, **kwds):
00106 """
00107 Constructor. Any message fields that are implicitly/explicitly
00108 set to None will be assigned a default value. The recommend
00109 use is keyword arguments as this is more robust to future message
00110 changes. You cannot mix in-order arguments and keyword arguments.
00111
00112 The available fields are:
00113 header,status,result
00114
00115 @param args: complete set of field values, in .msg order
00116 @param kwds: use keyword arguments corresponding to message field names
00117 to set specific fields.
00118 """
00119 if args or kwds:
00120 super(FaceDetectorActionResult, self).__init__(*args, **kwds)
00121
00122 if self.header is None:
00123 self.header = std_msgs.msg._Header.Header()
00124 if self.status is None:
00125 self.status = actionlib_msgs.msg.GoalStatus()
00126 if self.result is None:
00127 self.result = face_detector.msg.FaceDetectorResult()
00128 else:
00129 self.header = std_msgs.msg._Header.Header()
00130 self.status = actionlib_msgs.msg.GoalStatus()
00131 self.result = face_detector.msg.FaceDetectorResult()
00132
00133 def _get_types(self):
00134 """
00135 internal API method
00136 """
00137 return self._slot_types
00138
00139 def serialize(self, buff):
00140 """
00141 serialize message into buffer
00142 @param buff: buffer
00143 @type buff: StringIO
00144 """
00145 try:
00146 _x = self
00147 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00148 _x = self.header.frame_id
00149 length = len(_x)
00150 buff.write(struct.pack('<I%ss'%length, length, _x))
00151 _x = self
00152 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00153 _x = self.status.goal_id.id
00154 length = len(_x)
00155 buff.write(struct.pack('<I%ss'%length, length, _x))
00156 buff.write(_struct_B.pack(self.status.status))
00157 _x = self.status.text
00158 length = len(_x)
00159 buff.write(struct.pack('<I%ss'%length, length, _x))
00160 length = len(self.result.face_positions)
00161 buff.write(_struct_I.pack(length))
00162 for val1 in self.result.face_positions:
00163 _v1 = val1.header
00164 buff.write(_struct_I.pack(_v1.seq))
00165 _v2 = _v1.stamp
00166 _x = _v2
00167 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00168 _x = _v1.frame_id
00169 length = len(_x)
00170 buff.write(struct.pack('<I%ss'%length, length, _x))
00171 _x = val1.name
00172 length = len(_x)
00173 buff.write(struct.pack('<I%ss'%length, length, _x))
00174 _x = val1.object_id
00175 length = len(_x)
00176 buff.write(struct.pack('<I%ss'%length, length, _x))
00177 _v3 = val1.pos
00178 _x = _v3
00179 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00180 buff.write(_struct_d.pack(val1.reliability))
00181 buff.write(_struct_9d.pack(*val1.covariance))
00182 buff.write(_struct_b.pack(val1.initialization))
00183 except struct.error, se: self._check_types(se)
00184 except TypeError, te: self._check_types(te)
00185
00186 def deserialize(self, str):
00187 """
00188 unpack serialized message in str into this message instance
00189 @param str: byte array of serialized message
00190 @type str: str
00191 """
00192 try:
00193 if self.header is None:
00194 self.header = std_msgs.msg._Header.Header()
00195 if self.status is None:
00196 self.status = actionlib_msgs.msg.GoalStatus()
00197 if self.result is None:
00198 self.result = face_detector.msg.FaceDetectorResult()
00199 end = 0
00200 _x = self
00201 start = end
00202 end += 12
00203 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00204 start = end
00205 end += 4
00206 (length,) = _struct_I.unpack(str[start:end])
00207 start = end
00208 end += length
00209 self.header.frame_id = str[start:end]
00210 _x = self
00211 start = end
00212 end += 8
00213 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00214 start = end
00215 end += 4
00216 (length,) = _struct_I.unpack(str[start:end])
00217 start = end
00218 end += length
00219 self.status.goal_id.id = str[start:end]
00220 start = end
00221 end += 1
00222 (self.status.status,) = _struct_B.unpack(str[start:end])
00223 start = end
00224 end += 4
00225 (length,) = _struct_I.unpack(str[start:end])
00226 start = end
00227 end += length
00228 self.status.text = str[start:end]
00229 start = end
00230 end += 4
00231 (length,) = _struct_I.unpack(str[start:end])
00232 self.result.face_positions = []
00233 for i in xrange(0, length):
00234 val1 = people_msgs.msg.PositionMeasurement()
00235 _v4 = val1.header
00236 start = end
00237 end += 4
00238 (_v4.seq,) = _struct_I.unpack(str[start:end])
00239 _v5 = _v4.stamp
00240 _x = _v5
00241 start = end
00242 end += 8
00243 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00244 start = end
00245 end += 4
00246 (length,) = _struct_I.unpack(str[start:end])
00247 start = end
00248 end += length
00249 _v4.frame_id = str[start:end]
00250 start = end
00251 end += 4
00252 (length,) = _struct_I.unpack(str[start:end])
00253 start = end
00254 end += length
00255 val1.name = str[start:end]
00256 start = end
00257 end += 4
00258 (length,) = _struct_I.unpack(str[start:end])
00259 start = end
00260 end += length
00261 val1.object_id = str[start:end]
00262 _v6 = val1.pos
00263 _x = _v6
00264 start = end
00265 end += 24
00266 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00267 start = end
00268 end += 8
00269 (val1.reliability,) = _struct_d.unpack(str[start:end])
00270 start = end
00271 end += 72
00272 val1.covariance = _struct_9d.unpack(str[start:end])
00273 start = end
00274 end += 1
00275 (val1.initialization,) = _struct_b.unpack(str[start:end])
00276 self.result.face_positions.append(val1)
00277 return self
00278 except struct.error, e:
00279 raise roslib.message.DeserializationError(e)
00280
00281
00282 def serialize_numpy(self, buff, numpy):
00283 """
00284 serialize message with numpy array types into buffer
00285 @param buff: buffer
00286 @type buff: StringIO
00287 @param numpy: numpy python module
00288 @type numpy module
00289 """
00290 try:
00291 _x = self
00292 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00293 _x = self.header.frame_id
00294 length = len(_x)
00295 buff.write(struct.pack('<I%ss'%length, length, _x))
00296 _x = self
00297 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00298 _x = self.status.goal_id.id
00299 length = len(_x)
00300 buff.write(struct.pack('<I%ss'%length, length, _x))
00301 buff.write(_struct_B.pack(self.status.status))
00302 _x = self.status.text
00303 length = len(_x)
00304 buff.write(struct.pack('<I%ss'%length, length, _x))
00305 length = len(self.result.face_positions)
00306 buff.write(_struct_I.pack(length))
00307 for val1 in self.result.face_positions:
00308 _v7 = val1.header
00309 buff.write(_struct_I.pack(_v7.seq))
00310 _v8 = _v7.stamp
00311 _x = _v8
00312 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00313 _x = _v7.frame_id
00314 length = len(_x)
00315 buff.write(struct.pack('<I%ss'%length, length, _x))
00316 _x = val1.name
00317 length = len(_x)
00318 buff.write(struct.pack('<I%ss'%length, length, _x))
00319 _x = val1.object_id
00320 length = len(_x)
00321 buff.write(struct.pack('<I%ss'%length, length, _x))
00322 _v9 = val1.pos
00323 _x = _v9
00324 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00325 buff.write(_struct_d.pack(val1.reliability))
00326 buff.write(val1.covariance.tostring())
00327 buff.write(_struct_b.pack(val1.initialization))
00328 except struct.error, se: self._check_types(se)
00329 except TypeError, te: self._check_types(te)
00330
00331 def deserialize_numpy(self, str, numpy):
00332 """
00333 unpack serialized message in str into this message instance using numpy for array types
00334 @param str: byte array of serialized message
00335 @type str: str
00336 @param numpy: numpy python module
00337 @type numpy: module
00338 """
00339 try:
00340 if self.header is None:
00341 self.header = std_msgs.msg._Header.Header()
00342 if self.status is None:
00343 self.status = actionlib_msgs.msg.GoalStatus()
00344 if self.result is None:
00345 self.result = face_detector.msg.FaceDetectorResult()
00346 end = 0
00347 _x = self
00348 start = end
00349 end += 12
00350 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00351 start = end
00352 end += 4
00353 (length,) = _struct_I.unpack(str[start:end])
00354 start = end
00355 end += length
00356 self.header.frame_id = str[start:end]
00357 _x = self
00358 start = end
00359 end += 8
00360 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00361 start = end
00362 end += 4
00363 (length,) = _struct_I.unpack(str[start:end])
00364 start = end
00365 end += length
00366 self.status.goal_id.id = str[start:end]
00367 start = end
00368 end += 1
00369 (self.status.status,) = _struct_B.unpack(str[start:end])
00370 start = end
00371 end += 4
00372 (length,) = _struct_I.unpack(str[start:end])
00373 start = end
00374 end += length
00375 self.status.text = str[start:end]
00376 start = end
00377 end += 4
00378 (length,) = _struct_I.unpack(str[start:end])
00379 self.result.face_positions = []
00380 for i in xrange(0, length):
00381 val1 = people_msgs.msg.PositionMeasurement()
00382 _v10 = val1.header
00383 start = end
00384 end += 4
00385 (_v10.seq,) = _struct_I.unpack(str[start:end])
00386 _v11 = _v10.stamp
00387 _x = _v11
00388 start = end
00389 end += 8
00390 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00391 start = end
00392 end += 4
00393 (length,) = _struct_I.unpack(str[start:end])
00394 start = end
00395 end += length
00396 _v10.frame_id = str[start:end]
00397 start = end
00398 end += 4
00399 (length,) = _struct_I.unpack(str[start:end])
00400 start = end
00401 end += length
00402 val1.name = str[start:end]
00403 start = end
00404 end += 4
00405 (length,) = _struct_I.unpack(str[start:end])
00406 start = end
00407 end += length
00408 val1.object_id = str[start:end]
00409 _v12 = val1.pos
00410 _x = _v12
00411 start = end
00412 end += 24
00413 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00414 start = end
00415 end += 8
00416 (val1.reliability,) = _struct_d.unpack(str[start:end])
00417 start = end
00418 end += 72
00419 val1.covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
00420 start = end
00421 end += 1
00422 (val1.initialization,) = _struct_b.unpack(str[start:end])
00423 self.result.face_positions.append(val1)
00424 return self
00425 except struct.error, e:
00426 raise roslib.message.DeserializationError(e)
00427
00428 _struct_I = roslib.message.struct_I
00429 _struct_B = struct.Struct("<B")
00430 _struct_d = struct.Struct("<d")
00431 _struct_9d = struct.Struct("<9d")
00432 _struct_3I = struct.Struct("<3I")
00433 _struct_b = struct.Struct("<b")
00434 _struct_2I = struct.Struct("<2I")
00435 _struct_3d = struct.Struct("<3d")