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


ar_track_alvar
Author(s): Scott Niekum
autogenerated on Sat Dec 28 2013 16:46:15