00001 """autogenerated by genpy from iri_perception_msgs/peopleTrackingServiceRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007
00008 class peopleTrackingServiceRequest(genpy.Message):
00009 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00010 _type = "iri_perception_msgs/peopleTrackingServiceRequest"
00011 _has_header = False
00012 _full_text = """
00013
00014 """
00015 __slots__ = []
00016 _slot_types = []
00017
00018 def __init__(self, *args, **kwds):
00019 """
00020 Constructor. Any message fields that are implicitly/explicitly
00021 set to None will be assigned a default value. The recommend
00022 use is keyword arguments as this is more robust to future message
00023 changes. You cannot mix in-order arguments and keyword arguments.
00024
00025 The available fields are:
00026
00027
00028 :param args: complete set of field values, in .msg order
00029 :param kwds: use keyword arguments corresponding to message field names
00030 to set specific fields.
00031 """
00032 if args or kwds:
00033 super(peopleTrackingServiceRequest, self).__init__(*args, **kwds)
00034
00035 def _get_types(self):
00036 """
00037 internal API method
00038 """
00039 return self._slot_types
00040
00041 def serialize(self, buff):
00042 """
00043 serialize message into buffer
00044 :param buff: buffer, ``StringIO``
00045 """
00046 try:
00047 pass
00048 except struct.error as se: self._check_types(se)
00049 except TypeError as te: self._check_types(te)
00050
00051 def deserialize(self, str):
00052 """
00053 unpack serialized message in str into this message instance
00054 :param str: byte array of serialized message, ``str``
00055 """
00056 try:
00057 end = 0
00058 return self
00059 except struct.error as e:
00060 raise genpy.DeserializationError(e)
00061
00062
00063 def serialize_numpy(self, buff, numpy):
00064 """
00065 serialize message with numpy array types into buffer
00066 :param buff: buffer, ``StringIO``
00067 :param numpy: numpy python module
00068 """
00069 try:
00070 pass
00071 except struct.error as se: self._check_types(se)
00072 except TypeError as te: self._check_types(te)
00073
00074 def deserialize_numpy(self, str, numpy):
00075 """
00076 unpack serialized message in str into this message instance using numpy for array types
00077 :param str: byte array of serialized message, ``str``
00078 :param numpy: numpy python module
00079 """
00080 try:
00081 end = 0
00082 return self
00083 except struct.error as e:
00084 raise genpy.DeserializationError(e)
00085
00086 _struct_I = genpy.struct_I
00087 """autogenerated by genpy from iri_perception_msgs/peopleTrackingServiceResponse.msg. Do not edit."""
00088 import sys
00089 python3 = True if sys.hexversion > 0x03000000 else False
00090 import genpy
00091 import struct
00092
00093 import iri_perception_msgs.msg
00094 import std_msgs.msg
00095
00096 class peopleTrackingServiceResponse(genpy.Message):
00097 _md5sum = "fe22c69eec47e5d3de106e176d235190"
00098 _type = "iri_perception_msgs/peopleTrackingServiceResponse"
00099 _has_header = False
00100 _full_text = """
00101 peopleTrackingArray peopleSet
00102
00103
00104 ================================================================================
00105 MSG: iri_perception_msgs/peopleTrackingArray
00106 # timestamp, frame id
00107 Header header
00108
00109 #set of targets being tracked
00110 peopleTracking[] peopleSet
00111 ================================================================================
00112 MSG: std_msgs/Header
00113 # Standard metadata for higher-level stamped data types.
00114 # This is generally used to communicate timestamped data
00115 # in a particular coordinate frame.
00116 #
00117 # sequence ID: consecutively increasing ID
00118 uint32 seq
00119 #Two-integer timestamp that is expressed as:
00120 # * stamp.secs: seconds (stamp_secs) since epoch
00121 # * stamp.nsecs: nanoseconds since stamp_secs
00122 # time-handling sugar is provided by the client library
00123 time stamp
00124 #Frame this data is associated with
00125 # 0: no frame
00126 # 1: global frame
00127 string frame_id
00128
00129 ================================================================================
00130 MSG: iri_perception_msgs/peopleTracking
00131 #target id
00132 int32 targetId
00133
00134 #target status is a bitwise OR of the following values
00135 # TO_BE_REMOVED = 0x01,
00136 # OCCLUDDED = 0x02,
00137 # CANDIDATE = 0x04,
00138 # LEGGED_TARGET = 0x08,
00139 # VISUALLY_CONFIRMED = 0x10,
00140 # FRIEND_IN_SIGHT = 0x20,
00141 # BACK_LEARNT = 0x40,
00142 # FACE_LEARNT = 0x80
00143 int32 targetStatus
00144
00145 #target 2D position
00146 float64 x
00147 float64 y
00148
00149 #target 2D linear velocity
00150 float64 vx
00151 float64 vy
00152
00153 #(x,y,vx,vy) covariance matrix
00154 float64[16] covariances
00155 """
00156 __slots__ = ['peopleSet']
00157 _slot_types = ['iri_perception_msgs/peopleTrackingArray']
00158
00159 def __init__(self, *args, **kwds):
00160 """
00161 Constructor. Any message fields that are implicitly/explicitly
00162 set to None will be assigned a default value. The recommend
00163 use is keyword arguments as this is more robust to future message
00164 changes. You cannot mix in-order arguments and keyword arguments.
00165
00166 The available fields are:
00167 peopleSet
00168
00169 :param args: complete set of field values, in .msg order
00170 :param kwds: use keyword arguments corresponding to message field names
00171 to set specific fields.
00172 """
00173 if args or kwds:
00174 super(peopleTrackingServiceResponse, self).__init__(*args, **kwds)
00175
00176 if self.peopleSet is None:
00177 self.peopleSet = iri_perception_msgs.msg.peopleTrackingArray()
00178 else:
00179 self.peopleSet = iri_perception_msgs.msg.peopleTrackingArray()
00180
00181 def _get_types(self):
00182 """
00183 internal API method
00184 """
00185 return self._slot_types
00186
00187 def serialize(self, buff):
00188 """
00189 serialize message into buffer
00190 :param buff: buffer, ``StringIO``
00191 """
00192 try:
00193 _x = self
00194 buff.write(_struct_3I.pack(_x.peopleSet.header.seq, _x.peopleSet.header.stamp.secs, _x.peopleSet.header.stamp.nsecs))
00195 _x = self.peopleSet.header.frame_id
00196 length = len(_x)
00197 if python3 or type(_x) == unicode:
00198 _x = _x.encode('utf-8')
00199 length = len(_x)
00200 buff.write(struct.pack('<I%ss'%length, length, _x))
00201 length = len(self.peopleSet.peopleSet)
00202 buff.write(_struct_I.pack(length))
00203 for val1 in self.peopleSet.peopleSet:
00204 _x = val1
00205 buff.write(_struct_2i4d.pack(_x.targetId, _x.targetStatus, _x.x, _x.y, _x.vx, _x.vy))
00206 buff.write(_struct_16d.pack(*val1.covariances))
00207 except struct.error as se: self._check_types(se)
00208 except TypeError as te: self._check_types(te)
00209
00210 def deserialize(self, str):
00211 """
00212 unpack serialized message in str into this message instance
00213 :param str: byte array of serialized message, ``str``
00214 """
00215 try:
00216 if self.peopleSet is None:
00217 self.peopleSet = iri_perception_msgs.msg.peopleTrackingArray()
00218 end = 0
00219 _x = self
00220 start = end
00221 end += 12
00222 (_x.peopleSet.header.seq, _x.peopleSet.header.stamp.secs, _x.peopleSet.header.stamp.nsecs,) = _struct_3I.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 if python3:
00229 self.peopleSet.header.frame_id = str[start:end].decode('utf-8')
00230 else:
00231 self.peopleSet.header.frame_id = str[start:end]
00232 start = end
00233 end += 4
00234 (length,) = _struct_I.unpack(str[start:end])
00235 self.peopleSet.peopleSet = []
00236 for i in range(0, length):
00237 val1 = iri_perception_msgs.msg.peopleTracking()
00238 _x = val1
00239 start = end
00240 end += 40
00241 (_x.targetId, _x.targetStatus, _x.x, _x.y, _x.vx, _x.vy,) = _struct_2i4d.unpack(str[start:end])
00242 start = end
00243 end += 128
00244 val1.covariances = _struct_16d.unpack(str[start:end])
00245 self.peopleSet.peopleSet.append(val1)
00246 return self
00247 except struct.error as e:
00248 raise genpy.DeserializationError(e)
00249
00250
00251 def serialize_numpy(self, buff, numpy):
00252 """
00253 serialize message with numpy array types into buffer
00254 :param buff: buffer, ``StringIO``
00255 :param numpy: numpy python module
00256 """
00257 try:
00258 _x = self
00259 buff.write(_struct_3I.pack(_x.peopleSet.header.seq, _x.peopleSet.header.stamp.secs, _x.peopleSet.header.stamp.nsecs))
00260 _x = self.peopleSet.header.frame_id
00261 length = len(_x)
00262 if python3 or type(_x) == unicode:
00263 _x = _x.encode('utf-8')
00264 length = len(_x)
00265 buff.write(struct.pack('<I%ss'%length, length, _x))
00266 length = len(self.peopleSet.peopleSet)
00267 buff.write(_struct_I.pack(length))
00268 for val1 in self.peopleSet.peopleSet:
00269 _x = val1
00270 buff.write(_struct_2i4d.pack(_x.targetId, _x.targetStatus, _x.x, _x.y, _x.vx, _x.vy))
00271 buff.write(val1.covariances.tostring())
00272 except struct.error as se: self._check_types(se)
00273 except TypeError as te: self._check_types(te)
00274
00275 def deserialize_numpy(self, str, numpy):
00276 """
00277 unpack serialized message in str into this message instance using numpy for array types
00278 :param str: byte array of serialized message, ``str``
00279 :param numpy: numpy python module
00280 """
00281 try:
00282 if self.peopleSet is None:
00283 self.peopleSet = iri_perception_msgs.msg.peopleTrackingArray()
00284 end = 0
00285 _x = self
00286 start = end
00287 end += 12
00288 (_x.peopleSet.header.seq, _x.peopleSet.header.stamp.secs, _x.peopleSet.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00289 start = end
00290 end += 4
00291 (length,) = _struct_I.unpack(str[start:end])
00292 start = end
00293 end += length
00294 if python3:
00295 self.peopleSet.header.frame_id = str[start:end].decode('utf-8')
00296 else:
00297 self.peopleSet.header.frame_id = str[start:end]
00298 start = end
00299 end += 4
00300 (length,) = _struct_I.unpack(str[start:end])
00301 self.peopleSet.peopleSet = []
00302 for i in range(0, length):
00303 val1 = iri_perception_msgs.msg.peopleTracking()
00304 _x = val1
00305 start = end
00306 end += 40
00307 (_x.targetId, _x.targetStatus, _x.x, _x.y, _x.vx, _x.vy,) = _struct_2i4d.unpack(str[start:end])
00308 start = end
00309 end += 128
00310 val1.covariances = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=16)
00311 self.peopleSet.peopleSet.append(val1)
00312 return self
00313 except struct.error as e:
00314 raise genpy.DeserializationError(e)
00315
00316 _struct_I = genpy.struct_I
00317 _struct_16d = struct.Struct("<16d")
00318 _struct_3I = struct.Struct("<3I")
00319 _struct_2i4d = struct.Struct("<2i4d")
00320 class peopleTrackingService(object):
00321 _type = 'iri_perception_msgs/peopleTrackingService'
00322 _md5sum = 'fe22c69eec47e5d3de106e176d235190'
00323 _request_class = peopleTrackingServiceRequest
00324 _response_class = peopleTrackingServiceResponse