_TrackedObjects.py
Go to the documentation of this file.
00001 """autogenerated by genpy from motld/TrackedObjects.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 geometry_msgs.msg
00008 import std_msgs.msg
00009 
00010 class TrackedObjects(genpy.Message):
00011   _md5sum = "9a04c6635894acf6dd033a61bb4bfe64"
00012   _type = "motld/TrackedObjects"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """int32[] name
00015 int32[] status
00016 float32[] width
00017 float32[] height
00018 geometry_msgs/PoseArray pose
00019 ================================================================================
00020 MSG: geometry_msgs/PoseArray
00021 # An array of poses with a header for global reference.
00022 
00023 Header header
00024 
00025 Pose[] poses
00026 
00027 ================================================================================
00028 MSG: std_msgs/Header
00029 # Standard metadata for higher-level stamped data types.
00030 # This is generally used to communicate timestamped data 
00031 # in a particular coordinate frame.
00032 # 
00033 # sequence ID: consecutively increasing ID 
00034 uint32 seq
00035 #Two-integer timestamp that is expressed as:
00036 # * stamp.secs: seconds (stamp_secs) since epoch
00037 # * stamp.nsecs: nanoseconds since stamp_secs
00038 # time-handling sugar is provided by the client library
00039 time stamp
00040 #Frame this data is associated with
00041 # 0: no frame
00042 # 1: global frame
00043 string frame_id
00044 
00045 ================================================================================
00046 MSG: geometry_msgs/Pose
00047 # A representation of pose in free space, composed of postion and orientation. 
00048 Point position
00049 Quaternion orientation
00050 
00051 ================================================================================
00052 MSG: geometry_msgs/Point
00053 # This contains the position of a point in free space
00054 float64 x
00055 float64 y
00056 float64 z
00057 
00058 ================================================================================
00059 MSG: geometry_msgs/Quaternion
00060 # This represents an orientation in free space in quaternion form.
00061 
00062 float64 x
00063 float64 y
00064 float64 z
00065 float64 w
00066 
00067 """
00068   __slots__ = ['name','status','width','height','pose']
00069   _slot_types = ['int32[]','int32[]','float32[]','float32[]','geometry_msgs/PoseArray']
00070 
00071   def __init__(self, *args, **kwds):
00072     """
00073     Constructor. Any message fields that are implicitly/explicitly
00074     set to None will be assigned a default value. The recommend
00075     use is keyword arguments as this is more robust to future message
00076     changes.  You cannot mix in-order arguments and keyword arguments.
00077 
00078     The available fields are:
00079        name,status,width,height,pose
00080 
00081     :param args: complete set of field values, in .msg order
00082     :param kwds: use keyword arguments corresponding to message field names
00083     to set specific fields.
00084     """
00085     if args or kwds:
00086       super(TrackedObjects, self).__init__(*args, **kwds)
00087       #message fields cannot be None, assign default values for those that are
00088       if self.name is None:
00089         self.name = []
00090       if self.status is None:
00091         self.status = []
00092       if self.width is None:
00093         self.width = []
00094       if self.height is None:
00095         self.height = []
00096       if self.pose is None:
00097         self.pose = geometry_msgs.msg.PoseArray()
00098     else:
00099       self.name = []
00100       self.status = []
00101       self.width = []
00102       self.height = []
00103       self.pose = geometry_msgs.msg.PoseArray()
00104 
00105   def _get_types(self):
00106     """
00107     internal API method
00108     """
00109     return self._slot_types
00110 
00111   def serialize(self, buff):
00112     """
00113     serialize message into buffer
00114     :param buff: buffer, ``StringIO``
00115     """
00116     try:
00117       length = len(self.name)
00118       buff.write(_struct_I.pack(length))
00119       pattern = '<%si'%length
00120       buff.write(struct.pack(pattern, *self.name))
00121       length = len(self.status)
00122       buff.write(_struct_I.pack(length))
00123       pattern = '<%si'%length
00124       buff.write(struct.pack(pattern, *self.status))
00125       length = len(self.width)
00126       buff.write(_struct_I.pack(length))
00127       pattern = '<%sf'%length
00128       buff.write(struct.pack(pattern, *self.width))
00129       length = len(self.height)
00130       buff.write(_struct_I.pack(length))
00131       pattern = '<%sf'%length
00132       buff.write(struct.pack(pattern, *self.height))
00133       _x = self
00134       buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00135       _x = self.pose.header.frame_id
00136       length = len(_x)
00137       if python3 or type(_x) == unicode:
00138         _x = _x.encode('utf-8')
00139         length = len(_x)
00140       buff.write(struct.pack('<I%ss'%length, length, _x))
00141       length = len(self.pose.poses)
00142       buff.write(_struct_I.pack(length))
00143       for val1 in self.pose.poses:
00144         _v1 = val1.position
00145         _x = _v1
00146         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00147         _v2 = val1.orientation
00148         _x = _v2
00149         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00150     except struct.error as se: self._check_types(se)
00151     except TypeError as te: self._check_types(te)
00152 
00153   def deserialize(self, str):
00154     """
00155     unpack serialized message in str into this message instance
00156     :param str: byte array of serialized message, ``str``
00157     """
00158     try:
00159       if self.pose is None:
00160         self.pose = geometry_msgs.msg.PoseArray()
00161       end = 0
00162       start = end
00163       end += 4
00164       (length,) = _struct_I.unpack(str[start:end])
00165       pattern = '<%si'%length
00166       start = end
00167       end += struct.calcsize(pattern)
00168       self.name = struct.unpack(pattern, str[start:end])
00169       start = end
00170       end += 4
00171       (length,) = _struct_I.unpack(str[start:end])
00172       pattern = '<%si'%length
00173       start = end
00174       end += struct.calcsize(pattern)
00175       self.status = struct.unpack(pattern, str[start:end])
00176       start = end
00177       end += 4
00178       (length,) = _struct_I.unpack(str[start:end])
00179       pattern = '<%sf'%length
00180       start = end
00181       end += struct.calcsize(pattern)
00182       self.width = struct.unpack(pattern, str[start:end])
00183       start = end
00184       end += 4
00185       (length,) = _struct_I.unpack(str[start:end])
00186       pattern = '<%sf'%length
00187       start = end
00188       end += struct.calcsize(pattern)
00189       self.height = struct.unpack(pattern, str[start:end])
00190       _x = self
00191       start = end
00192       end += 12
00193       (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00194       start = end
00195       end += 4
00196       (length,) = _struct_I.unpack(str[start:end])
00197       start = end
00198       end += length
00199       if python3:
00200         self.pose.header.frame_id = str[start:end].decode('utf-8')
00201       else:
00202         self.pose.header.frame_id = str[start:end]
00203       start = end
00204       end += 4
00205       (length,) = _struct_I.unpack(str[start:end])
00206       self.pose.poses = []
00207       for i in range(0, length):
00208         val1 = geometry_msgs.msg.Pose()
00209         _v3 = val1.position
00210         _x = _v3
00211         start = end
00212         end += 24
00213         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00214         _v4 = val1.orientation
00215         _x = _v4
00216         start = end
00217         end += 32
00218         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00219         self.pose.poses.append(val1)
00220       return self
00221     except struct.error as e:
00222       raise genpy.DeserializationError(e) #most likely buffer underfill
00223 
00224 
00225   def serialize_numpy(self, buff, numpy):
00226     """
00227     serialize message with numpy array types into buffer
00228     :param buff: buffer, ``StringIO``
00229     :param numpy: numpy python module
00230     """
00231     try:
00232       length = len(self.name)
00233       buff.write(_struct_I.pack(length))
00234       pattern = '<%si'%length
00235       buff.write(self.name.tostring())
00236       length = len(self.status)
00237       buff.write(_struct_I.pack(length))
00238       pattern = '<%si'%length
00239       buff.write(self.status.tostring())
00240       length = len(self.width)
00241       buff.write(_struct_I.pack(length))
00242       pattern = '<%sf'%length
00243       buff.write(self.width.tostring())
00244       length = len(self.height)
00245       buff.write(_struct_I.pack(length))
00246       pattern = '<%sf'%length
00247       buff.write(self.height.tostring())
00248       _x = self
00249       buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00250       _x = self.pose.header.frame_id
00251       length = len(_x)
00252       if python3 or type(_x) == unicode:
00253         _x = _x.encode('utf-8')
00254         length = len(_x)
00255       buff.write(struct.pack('<I%ss'%length, length, _x))
00256       length = len(self.pose.poses)
00257       buff.write(_struct_I.pack(length))
00258       for val1 in self.pose.poses:
00259         _v5 = val1.position
00260         _x = _v5
00261         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00262         _v6 = val1.orientation
00263         _x = _v6
00264         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00265     except struct.error as se: self._check_types(se)
00266     except TypeError as te: self._check_types(te)
00267 
00268   def deserialize_numpy(self, str, numpy):
00269     """
00270     unpack serialized message in str into this message instance using numpy for array types
00271     :param str: byte array of serialized message, ``str``
00272     :param numpy: numpy python module
00273     """
00274     try:
00275       if self.pose is None:
00276         self.pose = geometry_msgs.msg.PoseArray()
00277       end = 0
00278       start = end
00279       end += 4
00280       (length,) = _struct_I.unpack(str[start:end])
00281       pattern = '<%si'%length
00282       start = end
00283       end += struct.calcsize(pattern)
00284       self.name = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
00285       start = end
00286       end += 4
00287       (length,) = _struct_I.unpack(str[start:end])
00288       pattern = '<%si'%length
00289       start = end
00290       end += struct.calcsize(pattern)
00291       self.status = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
00292       start = end
00293       end += 4
00294       (length,) = _struct_I.unpack(str[start:end])
00295       pattern = '<%sf'%length
00296       start = end
00297       end += struct.calcsize(pattern)
00298       self.width = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
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       self.height = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
00306       _x = self
00307       start = end
00308       end += 12
00309       (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00310       start = end
00311       end += 4
00312       (length,) = _struct_I.unpack(str[start:end])
00313       start = end
00314       end += length
00315       if python3:
00316         self.pose.header.frame_id = str[start:end].decode('utf-8')
00317       else:
00318         self.pose.header.frame_id = str[start:end]
00319       start = end
00320       end += 4
00321       (length,) = _struct_I.unpack(str[start:end])
00322       self.pose.poses = []
00323       for i in range(0, length):
00324         val1 = geometry_msgs.msg.Pose()
00325         _v7 = val1.position
00326         _x = _v7
00327         start = end
00328         end += 24
00329         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00330         _v8 = val1.orientation
00331         _x = _v8
00332         start = end
00333         end += 32
00334         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00335         self.pose.poses.append(val1)
00336       return self
00337     except struct.error as e:
00338       raise genpy.DeserializationError(e) #most likely buffer underfill
00339 
00340 _struct_I = genpy.struct_I
00341 _struct_3I = struct.Struct("<3I")
00342 _struct_4d = struct.Struct("<4d")
00343 _struct_3d = struct.Struct("<3d")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


motld
Author(s): Jost Tobias Springenberg, Jan Wuelfing
autogenerated on Wed Dec 26 2012 16:24:48