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