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