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