_peopleTrackActionResult.py
Go to the documentation of this file.
00001 """autogenerated by genpy from iri_perception_msgs/peopleTrackActionResult.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 iri_perception_msgs.msg
00008 import genpy
00009 import actionlib_msgs.msg
00010 import std_msgs.msg
00011 
00012 class peopleTrackActionResult(genpy.Message):
00013   _md5sum = "a54ffc00018938056903b3227fa0fb1c"
00014   _type = "iri_perception_msgs/peopleTrackActionResult"
00015   _has_header = True #flag to mark the presence of a Header object
00016   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017 
00018 Header header
00019 actionlib_msgs/GoalStatus status
00020 peopleTrackResult 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: iri_perception_msgs/peopleTrackResult
00081 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00082 #result definition
00083 peopleTrackingArray ps
00084 
00085 ================================================================================
00086 MSG: iri_perception_msgs/peopleTrackingArray
00087 # timestamp, frame id
00088 Header header
00089 
00090 #set of targets being tracked
00091 peopleTracking[] peopleSet
00092 ================================================================================
00093 MSG: iri_perception_msgs/peopleTracking
00094 #target id
00095 int32 targetId
00096 
00097 #target status is a bitwise OR of the following values
00098 #      TO_BE_REMOVED = 0x01,
00099 #      OCCLUDDED = 0x02,
00100 #      CANDIDATE = 0x04,
00101 #      LEGGED_TARGET = 0x08,
00102 #      VISUALLY_CONFIRMED = 0x10,
00103 #      FRIEND_IN_SIGHT = 0x20,
00104 #      BACK_LEARNT = 0x40,
00105 #      FACE_LEARNT = 0x80
00106 int32 targetStatus
00107 
00108 #target 2D position
00109 float64 x
00110 float64 y
00111 
00112 #target 2D linear velocity
00113 float64 vx
00114 float64 vy
00115 
00116 #(x,y,vx,vy) covariance matrix
00117 float64[16] covariances
00118 """
00119   __slots__ = ['header','status','result']
00120   _slot_types = ['std_msgs/Header','actionlib_msgs/GoalStatus','iri_perception_msgs/peopleTrackResult']
00121 
00122   def __init__(self, *args, **kwds):
00123     """
00124     Constructor. Any message fields that are implicitly/explicitly
00125     set to None will be assigned a default value. The recommend
00126     use is keyword arguments as this is more robust to future message
00127     changes.  You cannot mix in-order arguments and keyword arguments.
00128 
00129     The available fields are:
00130        header,status,result
00131 
00132     :param args: complete set of field values, in .msg order
00133     :param kwds: use keyword arguments corresponding to message field names
00134     to set specific fields.
00135     """
00136     if args or kwds:
00137       super(peopleTrackActionResult, self).__init__(*args, **kwds)
00138       #message fields cannot be None, assign default values for those that are
00139       if self.header is None:
00140         self.header = std_msgs.msg.Header()
00141       if self.status is None:
00142         self.status = actionlib_msgs.msg.GoalStatus()
00143       if self.result is None:
00144         self.result = iri_perception_msgs.msg.peopleTrackResult()
00145     else:
00146       self.header = std_msgs.msg.Header()
00147       self.status = actionlib_msgs.msg.GoalStatus()
00148       self.result = iri_perception_msgs.msg.peopleTrackResult()
00149 
00150   def _get_types(self):
00151     """
00152     internal API method
00153     """
00154     return self._slot_types
00155 
00156   def serialize(self, buff):
00157     """
00158     serialize message into buffer
00159     :param buff: buffer, ``StringIO``
00160     """
00161     try:
00162       _x = self
00163       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00164       _x = self.header.frame_id
00165       length = len(_x)
00166       if python3 or type(_x) == unicode:
00167         _x = _x.encode('utf-8')
00168         length = len(_x)
00169       buff.write(struct.pack('<I%ss'%length, length, _x))
00170       _x = self
00171       buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00172       _x = self.status.goal_id.id
00173       length = len(_x)
00174       if python3 or type(_x) == unicode:
00175         _x = _x.encode('utf-8')
00176         length = len(_x)
00177       buff.write(struct.pack('<I%ss'%length, length, _x))
00178       buff.write(_struct_B.pack(self.status.status))
00179       _x = self.status.text
00180       length = len(_x)
00181       if python3 or type(_x) == unicode:
00182         _x = _x.encode('utf-8')
00183         length = len(_x)
00184       buff.write(struct.pack('<I%ss'%length, length, _x))
00185       _x = self
00186       buff.write(_struct_3I.pack(_x.result.ps.header.seq, _x.result.ps.header.stamp.secs, _x.result.ps.header.stamp.nsecs))
00187       _x = self.result.ps.header.frame_id
00188       length = len(_x)
00189       if python3 or type(_x) == unicode:
00190         _x = _x.encode('utf-8')
00191         length = len(_x)
00192       buff.write(struct.pack('<I%ss'%length, length, _x))
00193       length = len(self.result.ps.peopleSet)
00194       buff.write(_struct_I.pack(length))
00195       for val1 in self.result.ps.peopleSet:
00196         _x = val1
00197         buff.write(_struct_2i4d.pack(_x.targetId, _x.targetStatus, _x.x, _x.y, _x.vx, _x.vy))
00198         buff.write(_struct_16d.pack(*val1.covariances))
00199     except struct.error as se: self._check_types(se)
00200     except TypeError as te: self._check_types(te)
00201 
00202   def deserialize(self, str):
00203     """
00204     unpack serialized message in str into this message instance
00205     :param str: byte array of serialized message, ``str``
00206     """
00207     try:
00208       if self.header is None:
00209         self.header = std_msgs.msg.Header()
00210       if self.status is None:
00211         self.status = actionlib_msgs.msg.GoalStatus()
00212       if self.result is None:
00213         self.result = iri_perception_msgs.msg.peopleTrackResult()
00214       end = 0
00215       _x = self
00216       start = end
00217       end += 12
00218       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00219       start = end
00220       end += 4
00221       (length,) = _struct_I.unpack(str[start:end])
00222       start = end
00223       end += length
00224       if python3:
00225         self.header.frame_id = str[start:end].decode('utf-8')
00226       else:
00227         self.header.frame_id = str[start:end]
00228       _x = self
00229       start = end
00230       end += 8
00231       (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00232       start = end
00233       end += 4
00234       (length,) = _struct_I.unpack(str[start:end])
00235       start = end
00236       end += length
00237       if python3:
00238         self.status.goal_id.id = str[start:end].decode('utf-8')
00239       else:
00240         self.status.goal_id.id = str[start:end]
00241       start = end
00242       end += 1
00243       (self.status.status,) = _struct_B.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       if python3:
00250         self.status.text = str[start:end].decode('utf-8')
00251       else:
00252         self.status.text = str[start:end]
00253       _x = self
00254       start = end
00255       end += 12
00256       (_x.result.ps.header.seq, _x.result.ps.header.stamp.secs, _x.result.ps.header.stamp.nsecs,) = _struct_3I.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       if python3:
00263         self.result.ps.header.frame_id = str[start:end].decode('utf-8')
00264       else:
00265         self.result.ps.header.frame_id = str[start:end]
00266       start = end
00267       end += 4
00268       (length,) = _struct_I.unpack(str[start:end])
00269       self.result.ps.peopleSet = []
00270       for i in range(0, length):
00271         val1 = iri_perception_msgs.msg.peopleTracking()
00272         _x = val1
00273         start = end
00274         end += 40
00275         (_x.targetId, _x.targetStatus, _x.x, _x.y, _x.vx, _x.vy,) = _struct_2i4d.unpack(str[start:end])
00276         start = end
00277         end += 128
00278         val1.covariances = _struct_16d.unpack(str[start:end])
00279         self.result.ps.peopleSet.append(val1)
00280       return self
00281     except struct.error as e:
00282       raise genpy.DeserializationError(e) #most likely buffer underfill
00283 
00284 
00285   def serialize_numpy(self, buff, numpy):
00286     """
00287     serialize message with numpy array types into buffer
00288     :param buff: buffer, ``StringIO``
00289     :param numpy: numpy python module
00290     """
00291     try:
00292       _x = self
00293       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00294       _x = self.header.frame_id
00295       length = len(_x)
00296       if python3 or type(_x) == unicode:
00297         _x = _x.encode('utf-8')
00298         length = len(_x)
00299       buff.write(struct.pack('<I%ss'%length, length, _x))
00300       _x = self
00301       buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00302       _x = self.status.goal_id.id
00303       length = len(_x)
00304       if python3 or type(_x) == unicode:
00305         _x = _x.encode('utf-8')
00306         length = len(_x)
00307       buff.write(struct.pack('<I%ss'%length, length, _x))
00308       buff.write(_struct_B.pack(self.status.status))
00309       _x = self.status.text
00310       length = len(_x)
00311       if python3 or type(_x) == unicode:
00312         _x = _x.encode('utf-8')
00313         length = len(_x)
00314       buff.write(struct.pack('<I%ss'%length, length, _x))
00315       _x = self
00316       buff.write(_struct_3I.pack(_x.result.ps.header.seq, _x.result.ps.header.stamp.secs, _x.result.ps.header.stamp.nsecs))
00317       _x = self.result.ps.header.frame_id
00318       length = len(_x)
00319       if python3 or type(_x) == unicode:
00320         _x = _x.encode('utf-8')
00321         length = len(_x)
00322       buff.write(struct.pack('<I%ss'%length, length, _x))
00323       length = len(self.result.ps.peopleSet)
00324       buff.write(_struct_I.pack(length))
00325       for val1 in self.result.ps.peopleSet:
00326         _x = val1
00327         buff.write(_struct_2i4d.pack(_x.targetId, _x.targetStatus, _x.x, _x.y, _x.vx, _x.vy))
00328         buff.write(val1.covariances.tostring())
00329     except struct.error as se: self._check_types(se)
00330     except TypeError as te: self._check_types(te)
00331 
00332   def deserialize_numpy(self, str, numpy):
00333     """
00334     unpack serialized message in str into this message instance using numpy for array types
00335     :param str: byte array of serialized message, ``str``
00336     :param numpy: numpy python module
00337     """
00338     try:
00339       if self.header is None:
00340         self.header = std_msgs.msg.Header()
00341       if self.status is None:
00342         self.status = actionlib_msgs.msg.GoalStatus()
00343       if self.result is None:
00344         self.result = iri_perception_msgs.msg.peopleTrackResult()
00345       end = 0
00346       _x = self
00347       start = end
00348       end += 12
00349       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00350       start = end
00351       end += 4
00352       (length,) = _struct_I.unpack(str[start:end])
00353       start = end
00354       end += length
00355       if python3:
00356         self.header.frame_id = str[start:end].decode('utf-8')
00357       else:
00358         self.header.frame_id = str[start:end]
00359       _x = self
00360       start = end
00361       end += 8
00362       (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00363       start = end
00364       end += 4
00365       (length,) = _struct_I.unpack(str[start:end])
00366       start = end
00367       end += length
00368       if python3:
00369         self.status.goal_id.id = str[start:end].decode('utf-8')
00370       else:
00371         self.status.goal_id.id = str[start:end]
00372       start = end
00373       end += 1
00374       (self.status.status,) = _struct_B.unpack(str[start:end])
00375       start = end
00376       end += 4
00377       (length,) = _struct_I.unpack(str[start:end])
00378       start = end
00379       end += length
00380       if python3:
00381         self.status.text = str[start:end].decode('utf-8')
00382       else:
00383         self.status.text = str[start:end]
00384       _x = self
00385       start = end
00386       end += 12
00387       (_x.result.ps.header.seq, _x.result.ps.header.stamp.secs, _x.result.ps.header.stamp.nsecs,) = _struct_3I.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       if python3:
00394         self.result.ps.header.frame_id = str[start:end].decode('utf-8')
00395       else:
00396         self.result.ps.header.frame_id = str[start:end]
00397       start = end
00398       end += 4
00399       (length,) = _struct_I.unpack(str[start:end])
00400       self.result.ps.peopleSet = []
00401       for i in range(0, length):
00402         val1 = iri_perception_msgs.msg.peopleTracking()
00403         _x = val1
00404         start = end
00405         end += 40
00406         (_x.targetId, _x.targetStatus, _x.x, _x.y, _x.vx, _x.vy,) = _struct_2i4d.unpack(str[start:end])
00407         start = end
00408         end += 128
00409         val1.covariances = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=16)
00410         self.result.ps.peopleSet.append(val1)
00411       return self
00412     except struct.error as e:
00413       raise genpy.DeserializationError(e) #most likely buffer underfill
00414 
00415 _struct_I = genpy.struct_I
00416 _struct_16d = struct.Struct("<16d")
00417 _struct_2i4d = struct.Struct("<2i4d")
00418 _struct_3I = struct.Struct("<3I")
00419 _struct_B = struct.Struct("<B")
00420 _struct_2I = struct.Struct("<2I")


iri_perception_msgs
Author(s):
autogenerated on Fri Dec 6 2013 20:02:15