_ARMarker.py
Go to the documentation of this file.
00001 """autogenerated by genpy from ar_pose/ARMarker.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 ARMarker(genpy.Message):
00011   _md5sum = "93c4ce9061a70bc30293e52ac4675f76"
00012   _type = "ar_pose/ARMarker"
00013   _has_header = True #flag to mark the presence of a Header object
00014   _full_text = """Header header
00015 uint32 id
00016 geometry_msgs/PoseWithCovariance pose
00017 uint32 confidence
00018 
00019 ================================================================================
00020 MSG: std_msgs/Header
00021 # Standard metadata for higher-level stamped data types.
00022 # This is generally used to communicate timestamped data 
00023 # in a particular coordinate frame.
00024 # 
00025 # sequence ID: consecutively increasing ID 
00026 uint32 seq
00027 #Two-integer timestamp that is expressed as:
00028 # * stamp.secs: seconds (stamp_secs) since epoch
00029 # * stamp.nsecs: nanoseconds since stamp_secs
00030 # time-handling sugar is provided by the client library
00031 time stamp
00032 #Frame this data is associated with
00033 # 0: no frame
00034 # 1: global frame
00035 string frame_id
00036 
00037 ================================================================================
00038 MSG: geometry_msgs/PoseWithCovariance
00039 # This represents a pose in free space with uncertainty.
00040 
00041 Pose pose
00042 
00043 # Row-major representation of the 6x6 covariance matrix
00044 # The orientation parameters use a fixed-axis representation.
00045 # In order, the parameters are:
00046 # (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis)
00047 float64[36] covariance
00048 
00049 ================================================================================
00050 MSG: geometry_msgs/Pose
00051 # A representation of pose in free space, composed of postion and orientation. 
00052 Point position
00053 Quaternion orientation
00054 
00055 ================================================================================
00056 MSG: geometry_msgs/Point
00057 # This contains the position of a point in free space
00058 float64 x
00059 float64 y
00060 float64 z
00061 
00062 ================================================================================
00063 MSG: geometry_msgs/Quaternion
00064 # This represents an orientation in free space in quaternion form.
00065 
00066 float64 x
00067 float64 y
00068 float64 z
00069 float64 w
00070 
00071 """
00072   __slots__ = ['header','id','pose','confidence']
00073   _slot_types = ['std_msgs/Header','uint32','geometry_msgs/PoseWithCovariance','uint32']
00074 
00075   def __init__(self, *args, **kwds):
00076     """
00077     Constructor. Any message fields that are implicitly/explicitly
00078     set to None will be assigned a default value. The recommend
00079     use is keyword arguments as this is more robust to future message
00080     changes.  You cannot mix in-order arguments and keyword arguments.
00081 
00082     The available fields are:
00083        header,id,pose,confidence
00084 
00085     :param args: complete set of field values, in .msg order
00086     :param kwds: use keyword arguments corresponding to message field names
00087     to set specific fields.
00088     """
00089     if args or kwds:
00090       super(ARMarker, self).__init__(*args, **kwds)
00091       #message fields cannot be None, assign default values for those that are
00092       if self.header is None:
00093         self.header = std_msgs.msg.Header()
00094       if self.id is None:
00095         self.id = 0
00096       if self.pose is None:
00097         self.pose = geometry_msgs.msg.PoseWithCovariance()
00098       if self.confidence is None:
00099         self.confidence = 0
00100     else:
00101       self.header = std_msgs.msg.Header()
00102       self.id = 0
00103       self.pose = geometry_msgs.msg.PoseWithCovariance()
00104       self.confidence = 0
00105 
00106   def _get_types(self):
00107     """
00108     internal API method
00109     """
00110     return self._slot_types
00111 
00112   def serialize(self, buff):
00113     """
00114     serialize message into buffer
00115     :param buff: buffer, ``StringIO``
00116     """
00117     try:
00118       _x = self
00119       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00120       _x = self.header.frame_id
00121       length = len(_x)
00122       if python3 or type(_x) == unicode:
00123         _x = _x.encode('utf-8')
00124         length = len(_x)
00125       buff.write(struct.pack('<I%ss'%length, length, _x))
00126       _x = self
00127       buff.write(_struct_I7d.pack(_x.id, _x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w))
00128       buff.write(_struct_36d.pack(*self.pose.covariance))
00129       buff.write(_struct_I.pack(self.confidence))
00130     except struct.error as se: self._check_types(se)
00131     except TypeError as te: self._check_types(te)
00132 
00133   def deserialize(self, str):
00134     """
00135     unpack serialized message in str into this message instance
00136     :param str: byte array of serialized message, ``str``
00137     """
00138     try:
00139       if self.header is None:
00140         self.header = std_msgs.msg.Header()
00141       if self.pose is None:
00142         self.pose = geometry_msgs.msg.PoseWithCovariance()
00143       end = 0
00144       _x = self
00145       start = end
00146       end += 12
00147       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00148       start = end
00149       end += 4
00150       (length,) = _struct_I.unpack(str[start:end])
00151       start = end
00152       end += length
00153       if python3:
00154         self.header.frame_id = str[start:end].decode('utf-8')
00155       else:
00156         self.header.frame_id = str[start:end]
00157       _x = self
00158       start = end
00159       end += 60
00160       (_x.id, _x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w,) = _struct_I7d.unpack(str[start:end])
00161       start = end
00162       end += 288
00163       self.pose.covariance = _struct_36d.unpack(str[start:end])
00164       start = end
00165       end += 4
00166       (self.confidence,) = _struct_I.unpack(str[start:end])
00167       return self
00168     except struct.error as e:
00169       raise genpy.DeserializationError(e) #most likely buffer underfill
00170 
00171 
00172   def serialize_numpy(self, buff, numpy):
00173     """
00174     serialize message with numpy array types into buffer
00175     :param buff: buffer, ``StringIO``
00176     :param numpy: numpy python module
00177     """
00178     try:
00179       _x = self
00180       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00181       _x = self.header.frame_id
00182       length = len(_x)
00183       if python3 or type(_x) == unicode:
00184         _x = _x.encode('utf-8')
00185         length = len(_x)
00186       buff.write(struct.pack('<I%ss'%length, length, _x))
00187       _x = self
00188       buff.write(_struct_I7d.pack(_x.id, _x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w))
00189       buff.write(self.pose.covariance.tostring())
00190       buff.write(_struct_I.pack(self.confidence))
00191     except struct.error as se: self._check_types(se)
00192     except TypeError as te: self._check_types(te)
00193 
00194   def deserialize_numpy(self, str, numpy):
00195     """
00196     unpack serialized message in str into this message instance using numpy for array types
00197     :param str: byte array of serialized message, ``str``
00198     :param numpy: numpy python module
00199     """
00200     try:
00201       if self.header is None:
00202         self.header = std_msgs.msg.Header()
00203       if self.pose is None:
00204         self.pose = geometry_msgs.msg.PoseWithCovariance()
00205       end = 0
00206       _x = self
00207       start = end
00208       end += 12
00209       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00210       start = end
00211       end += 4
00212       (length,) = _struct_I.unpack(str[start:end])
00213       start = end
00214       end += length
00215       if python3:
00216         self.header.frame_id = str[start:end].decode('utf-8')
00217       else:
00218         self.header.frame_id = str[start:end]
00219       _x = self
00220       start = end
00221       end += 60
00222       (_x.id, _x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w,) = _struct_I7d.unpack(str[start:end])
00223       start = end
00224       end += 288
00225       self.pose.covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=36)
00226       start = end
00227       end += 4
00228       (self.confidence,) = _struct_I.unpack(str[start:end])
00229       return self
00230     except struct.error as e:
00231       raise genpy.DeserializationError(e) #most likely buffer underfill
00232 
00233 _struct_I = genpy.struct_I
00234 _struct_3I = struct.Struct("<3I")
00235 _struct_I7d = struct.Struct("<I7d")
00236 _struct_36d = struct.Struct("<36d")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines


ar_pose
Author(s): Ivan Dryanovski, William Morris, Gautier Dumonteil et al.
autogenerated on Thu Apr 25 2013 15:41:19