00001 """autogenerated by genpy from asctec_hl_comm/WaypointResult.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 WaypointResult(genpy.Message):
00011 _md5sum = "3f4c97ad97360a3554493ebd7d1ee895"
00012 _type = "asctec_hl_comm/WaypointResult"
00013 _has_header = True
00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00015 #result
00016 Header header
00017 geometry_msgs/Point32 result_pos
00018 float32 result_yaw
00019 string status
00020
00021 ================================================================================
00022 MSG: std_msgs/Header
00023 # Standard metadata for higher-level stamped data types.
00024 # This is generally used to communicate timestamped data
00025 # in a particular coordinate frame.
00026 #
00027 # sequence ID: consecutively increasing ID
00028 uint32 seq
00029 #Two-integer timestamp that is expressed as:
00030 # * stamp.secs: seconds (stamp_secs) since epoch
00031 # * stamp.nsecs: nanoseconds since stamp_secs
00032 # time-handling sugar is provided by the client library
00033 time stamp
00034 #Frame this data is associated with
00035 # 0: no frame
00036 # 1: global frame
00037 string frame_id
00038
00039 ================================================================================
00040 MSG: geometry_msgs/Point32
00041 # This contains the position of a point in free space(with 32 bits of precision).
00042 # It is recommeded to use Point wherever possible instead of Point32.
00043 #
00044 # This recommendation is to promote interoperability.
00045 #
00046 # This message is designed to take up less space when sending
00047 # lots of points at once, as in the case of a PointCloud.
00048
00049 float32 x
00050 float32 y
00051 float32 z
00052 """
00053 __slots__ = ['header','result_pos','result_yaw','status']
00054 _slot_types = ['std_msgs/Header','geometry_msgs/Point32','float32','string']
00055
00056 def __init__(self, *args, **kwds):
00057 """
00058 Constructor. Any message fields that are implicitly/explicitly
00059 set to None will be assigned a default value. The recommend
00060 use is keyword arguments as this is more robust to future message
00061 changes. You cannot mix in-order arguments and keyword arguments.
00062
00063 The available fields are:
00064 header,result_pos,result_yaw,status
00065
00066 :param args: complete set of field values, in .msg order
00067 :param kwds: use keyword arguments corresponding to message field names
00068 to set specific fields.
00069 """
00070 if args or kwds:
00071 super(WaypointResult, self).__init__(*args, **kwds)
00072
00073 if self.header is None:
00074 self.header = std_msgs.msg.Header()
00075 if self.result_pos is None:
00076 self.result_pos = geometry_msgs.msg.Point32()
00077 if self.result_yaw is None:
00078 self.result_yaw = 0.
00079 if self.status is None:
00080 self.status = ''
00081 else:
00082 self.header = std_msgs.msg.Header()
00083 self.result_pos = geometry_msgs.msg.Point32()
00084 self.result_yaw = 0.
00085 self.status = ''
00086
00087 def _get_types(self):
00088 """
00089 internal API method
00090 """
00091 return self._slot_types
00092
00093 def serialize(self, buff):
00094 """
00095 serialize message into buffer
00096 :param buff: buffer, ``StringIO``
00097 """
00098 try:
00099 _x = self
00100 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00101 _x = self.header.frame_id
00102 length = len(_x)
00103 if python3 or type(_x) == unicode:
00104 _x = _x.encode('utf-8')
00105 length = len(_x)
00106 buff.write(struct.pack('<I%ss'%length, length, _x))
00107 _x = self
00108 buff.write(_struct_4f.pack(_x.result_pos.x, _x.result_pos.y, _x.result_pos.z, _x.result_yaw))
00109 _x = self.status
00110 length = len(_x)
00111 if python3 or type(_x) == unicode:
00112 _x = _x.encode('utf-8')
00113 length = len(_x)
00114 buff.write(struct.pack('<I%ss'%length, length, _x))
00115 except struct.error as se: self._check_types(se)
00116 except TypeError as te: self._check_types(te)
00117
00118 def deserialize(self, str):
00119 """
00120 unpack serialized message in str into this message instance
00121 :param str: byte array of serialized message, ``str``
00122 """
00123 try:
00124 if self.header is None:
00125 self.header = std_msgs.msg.Header()
00126 if self.result_pos is None:
00127 self.result_pos = geometry_msgs.msg.Point32()
00128 end = 0
00129 _x = self
00130 start = end
00131 end += 12
00132 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00133 start = end
00134 end += 4
00135 (length,) = _struct_I.unpack(str[start:end])
00136 start = end
00137 end += length
00138 if python3:
00139 self.header.frame_id = str[start:end].decode('utf-8')
00140 else:
00141 self.header.frame_id = str[start:end]
00142 _x = self
00143 start = end
00144 end += 16
00145 (_x.result_pos.x, _x.result_pos.y, _x.result_pos.z, _x.result_yaw,) = _struct_4f.unpack(str[start:end])
00146 start = end
00147 end += 4
00148 (length,) = _struct_I.unpack(str[start:end])
00149 start = end
00150 end += length
00151 if python3:
00152 self.status = str[start:end].decode('utf-8')
00153 else:
00154 self.status = str[start:end]
00155 return self
00156 except struct.error as e:
00157 raise genpy.DeserializationError(e)
00158
00159
00160 def serialize_numpy(self, buff, numpy):
00161 """
00162 serialize message with numpy array types into buffer
00163 :param buff: buffer, ``StringIO``
00164 :param numpy: numpy python module
00165 """
00166 try:
00167 _x = self
00168 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00169 _x = self.header.frame_id
00170 length = len(_x)
00171 if python3 or type(_x) == unicode:
00172 _x = _x.encode('utf-8')
00173 length = len(_x)
00174 buff.write(struct.pack('<I%ss'%length, length, _x))
00175 _x = self
00176 buff.write(_struct_4f.pack(_x.result_pos.x, _x.result_pos.y, _x.result_pos.z, _x.result_yaw))
00177 _x = self.status
00178 length = len(_x)
00179 if python3 or type(_x) == unicode:
00180 _x = _x.encode('utf-8')
00181 length = len(_x)
00182 buff.write(struct.pack('<I%ss'%length, length, _x))
00183 except struct.error as se: self._check_types(se)
00184 except TypeError as te: self._check_types(te)
00185
00186 def deserialize_numpy(self, str, numpy):
00187 """
00188 unpack serialized message in str into this message instance using numpy for array types
00189 :param str: byte array of serialized message, ``str``
00190 :param numpy: numpy python module
00191 """
00192 try:
00193 if self.header is None:
00194 self.header = std_msgs.msg.Header()
00195 if self.result_pos is None:
00196 self.result_pos = geometry_msgs.msg.Point32()
00197 end = 0
00198 _x = self
00199 start = end
00200 end += 12
00201 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00202 start = end
00203 end += 4
00204 (length,) = _struct_I.unpack(str[start:end])
00205 start = end
00206 end += length
00207 if python3:
00208 self.header.frame_id = str[start:end].decode('utf-8')
00209 else:
00210 self.header.frame_id = str[start:end]
00211 _x = self
00212 start = end
00213 end += 16
00214 (_x.result_pos.x, _x.result_pos.y, _x.result_pos.z, _x.result_yaw,) = _struct_4f.unpack(str[start:end])
00215 start = end
00216 end += 4
00217 (length,) = _struct_I.unpack(str[start:end])
00218 start = end
00219 end += length
00220 if python3:
00221 self.status = str[start:end].decode('utf-8')
00222 else:
00223 self.status = str[start:end]
00224 return self
00225 except struct.error as e:
00226 raise genpy.DeserializationError(e)
00227
00228 _struct_I = genpy.struct_I
00229 _struct_4f = struct.Struct("<4f")
00230 _struct_3I = struct.Struct("<3I")