00001 """autogenerated by genpy from art_msgs/NavigatorCommand.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 art_msgs.msg
00009 import std_msgs.msg
00010
00011 class NavigatorCommand(genpy.Message):
00012 _md5sum = "415e5ee8b2ed1c9329a949ed123760f3"
00013 _type = "art_msgs/NavigatorCommand"
00014 _has_header = True
00015 _full_text = """# navigator command message
00016 # $Id: NavigatorCommand.msg 615 2010-09-24 16:07:50Z jack.oquin $
00017
00018 Header header
00019 Order order
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: art_msgs/Order
00041 # commander order for the navigator
00042 # $Id: Order.msg 615 2010-09-24 16:07:50Z jack.oquin $
00043
00044 uint32 N_WAYPTS = 5 # number of way-points in order
00045 uint32 N_CHKPTS = 2 # number of checkpoints in order
00046
00047 Behavior behavior # requested behavior
00048 art_msgs/WayPoint[5] waypt # way-point array
00049 art_msgs/WayPoint[2] chkpt # next two goal checkpoints
00050 float32 min_speed # in meters/sec
00051 float32 max_speed
00052 int32 replan_num
00053 int32 next_uturn # Uturn between [1] and [2]
00054
00055 ================================================================================
00056 MSG: art_msgs/Behavior
00057 # ART Navigator behaviors (lower numbers have higher priority)
00058 # $Id: Behavior.msg 996 2011-02-27 16:07:34Z jack.oquin $
00059
00060 # enumerated behavior values
00061 int16 Abort = 0
00062 int16 Quit = 1
00063 int16 Pause = 2
00064 int16 Run = 3
00065 int16 Suspend = 4
00066 int16 Initialize = 5
00067 int16 Go = 6
00068 int16 NONE = 7
00069 int16 N_behaviors = 8
00070
00071 int16 value
00072
00073 ================================================================================
00074 MSG: art_msgs/WayPoint
00075 # Way-point attributes
00076 # $Id: WayPoint.msg 614 2010-09-24 15:08:46Z jack.oquin $
00077
00078 float64 latitude # latitude in degrees
00079 float64 longitude # longitude in degrees
00080 geometry_msgs/Point32 mapxy # MapXY position
00081 MapID id # way-point ID
00082 uint16 index # parser index of waypoint
00083
00084 # way-point flags
00085 bool is_entry # lane or zone exit point
00086 bool is_exit # lane or zone entry point
00087 bool is_goal # this is a goal checkpoint
00088 bool is_lane_change # change lanes after here
00089 bool is_spot # parking spot
00090 bool is_stop # stop line here
00091 bool is_perimeter # zone perimeter point
00092 int32 checkpoint_id # checkpoint ID or zero
00093 float32 lane_width
00094
00095 ================================================================================
00096 MSG: geometry_msgs/Point32
00097 # This contains the position of a point in free space(with 32 bits of precision).
00098 # It is recommeded to use Point wherever possible instead of Point32.
00099 #
00100 # This recommendation is to promote interoperability.
00101 #
00102 # This message is designed to take up less space when sending
00103 # lots of points at once, as in the case of a PointCloud.
00104
00105 float32 x
00106 float32 y
00107 float32 z
00108 ================================================================================
00109 MSG: art_msgs/MapID
00110 # Road map identifier for segments, lanes and way-points.
00111 # $Id: MapID.msg 614 2010-09-24 15:08:46Z jack.oquin $
00112
00113 uint16 NULL_ID = 65535
00114
00115 uint16 seg # segment ID
00116 uint16 lane # lane ID
00117 uint16 pt # way-point ID
00118
00119 """
00120 __slots__ = ['header','order']
00121 _slot_types = ['std_msgs/Header','art_msgs/Order']
00122
00123 def __init__(self, *args, **kwds):
00124 """
00125 Constructor. Any message fields that are implicitly/explicitly
00126 set to None will be assigned a default value. The recommend
00127 use is keyword arguments as this is more robust to future message
00128 changes. You cannot mix in-order arguments and keyword arguments.
00129
00130 The available fields are:
00131 header,order
00132
00133 :param args: complete set of field values, in .msg order
00134 :param kwds: use keyword arguments corresponding to message field names
00135 to set specific fields.
00136 """
00137 if args or kwds:
00138 super(NavigatorCommand, self).__init__(*args, **kwds)
00139
00140 if self.header is None:
00141 self.header = std_msgs.msg.Header()
00142 if self.order is None:
00143 self.order = art_msgs.msg.Order()
00144 else:
00145 self.header = std_msgs.msg.Header()
00146 self.order = art_msgs.msg.Order()
00147
00148 def _get_types(self):
00149 """
00150 internal API method
00151 """
00152 return self._slot_types
00153
00154 def serialize(self, buff):
00155 """
00156 serialize message into buffer
00157 :param buff: buffer, ``StringIO``
00158 """
00159 try:
00160 _x = self
00161 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00162 _x = self.header.frame_id
00163 length = len(_x)
00164 if python3 or type(_x) == unicode:
00165 _x = _x.encode('utf-8')
00166 length = len(_x)
00167 buff.write(struct.pack('<I%ss'%length, length, _x))
00168 buff.write(_struct_h.pack(self.order.behavior.value))
00169 for val1 in self.order.waypt:
00170 _x = val1
00171 buff.write(_struct_2d.pack(_x.latitude, _x.longitude))
00172 _v1 = val1.mapxy
00173 _x = _v1
00174 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00175 _v2 = val1.id
00176 _x = _v2
00177 buff.write(_struct_3H.pack(_x.seg, _x.lane, _x.pt))
00178 _x = val1
00179 buff.write(_struct_H7Bif.pack(_x.index, _x.is_entry, _x.is_exit, _x.is_goal, _x.is_lane_change, _x.is_spot, _x.is_stop, _x.is_perimeter, _x.checkpoint_id, _x.lane_width))
00180 for val1 in self.order.chkpt:
00181 _x = val1
00182 buff.write(_struct_2d.pack(_x.latitude, _x.longitude))
00183 _v3 = val1.mapxy
00184 _x = _v3
00185 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00186 _v4 = val1.id
00187 _x = _v4
00188 buff.write(_struct_3H.pack(_x.seg, _x.lane, _x.pt))
00189 _x = val1
00190 buff.write(_struct_H7Bif.pack(_x.index, _x.is_entry, _x.is_exit, _x.is_goal, _x.is_lane_change, _x.is_spot, _x.is_stop, _x.is_perimeter, _x.checkpoint_id, _x.lane_width))
00191 _x = self
00192 buff.write(_struct_2f2i.pack(_x.order.min_speed, _x.order.max_speed, _x.order.replan_num, _x.order.next_uturn))
00193 except struct.error as se: self._check_types(se)
00194 except TypeError as te: self._check_types(te)
00195
00196 def deserialize(self, str):
00197 """
00198 unpack serialized message in str into this message instance
00199 :param str: byte array of serialized message, ``str``
00200 """
00201 try:
00202 if self.header is None:
00203 self.header = std_msgs.msg.Header()
00204 if self.order is None:
00205 self.order = art_msgs.msg.Order()
00206 end = 0
00207 _x = self
00208 start = end
00209 end += 12
00210 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00211 start = end
00212 end += 4
00213 (length,) = _struct_I.unpack(str[start:end])
00214 start = end
00215 end += length
00216 if python3:
00217 self.header.frame_id = str[start:end].decode('utf-8')
00218 else:
00219 self.header.frame_id = str[start:end]
00220 start = end
00221 end += 2
00222 (self.order.behavior.value,) = _struct_h.unpack(str[start:end])
00223 self.order.waypt = []
00224 for i in range(0, 5):
00225 val1 = art_msgs.msg.WayPoint()
00226 _x = val1
00227 start = end
00228 end += 16
00229 (_x.latitude, _x.longitude,) = _struct_2d.unpack(str[start:end])
00230 _v5 = val1.mapxy
00231 _x = _v5
00232 start = end
00233 end += 12
00234 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00235 _v6 = val1.id
00236 _x = _v6
00237 start = end
00238 end += 6
00239 (_x.seg, _x.lane, _x.pt,) = _struct_3H.unpack(str[start:end])
00240 _x = val1
00241 start = end
00242 end += 17
00243 (_x.index, _x.is_entry, _x.is_exit, _x.is_goal, _x.is_lane_change, _x.is_spot, _x.is_stop, _x.is_perimeter, _x.checkpoint_id, _x.lane_width,) = _struct_H7Bif.unpack(str[start:end])
00244 val1.is_entry = bool(val1.is_entry)
00245 val1.is_exit = bool(val1.is_exit)
00246 val1.is_goal = bool(val1.is_goal)
00247 val1.is_lane_change = bool(val1.is_lane_change)
00248 val1.is_spot = bool(val1.is_spot)
00249 val1.is_stop = bool(val1.is_stop)
00250 val1.is_perimeter = bool(val1.is_perimeter)
00251 self.order.waypt.append(val1)
00252 self.order.chkpt = []
00253 for i in range(0, 2):
00254 val1 = art_msgs.msg.WayPoint()
00255 _x = val1
00256 start = end
00257 end += 16
00258 (_x.latitude, _x.longitude,) = _struct_2d.unpack(str[start:end])
00259 _v7 = val1.mapxy
00260 _x = _v7
00261 start = end
00262 end += 12
00263 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00264 _v8 = val1.id
00265 _x = _v8
00266 start = end
00267 end += 6
00268 (_x.seg, _x.lane, _x.pt,) = _struct_3H.unpack(str[start:end])
00269 _x = val1
00270 start = end
00271 end += 17
00272 (_x.index, _x.is_entry, _x.is_exit, _x.is_goal, _x.is_lane_change, _x.is_spot, _x.is_stop, _x.is_perimeter, _x.checkpoint_id, _x.lane_width,) = _struct_H7Bif.unpack(str[start:end])
00273 val1.is_entry = bool(val1.is_entry)
00274 val1.is_exit = bool(val1.is_exit)
00275 val1.is_goal = bool(val1.is_goal)
00276 val1.is_lane_change = bool(val1.is_lane_change)
00277 val1.is_spot = bool(val1.is_spot)
00278 val1.is_stop = bool(val1.is_stop)
00279 val1.is_perimeter = bool(val1.is_perimeter)
00280 self.order.chkpt.append(val1)
00281 _x = self
00282 start = end
00283 end += 16
00284 (_x.order.min_speed, _x.order.max_speed, _x.order.replan_num, _x.order.next_uturn,) = _struct_2f2i.unpack(str[start:end])
00285 return self
00286 except struct.error as e:
00287 raise genpy.DeserializationError(e)
00288
00289
00290 def serialize_numpy(self, buff, numpy):
00291 """
00292 serialize message with numpy array types into buffer
00293 :param buff: buffer, ``StringIO``
00294 :param numpy: numpy python module
00295 """
00296 try:
00297 _x = self
00298 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00299 _x = self.header.frame_id
00300 length = len(_x)
00301 if python3 or type(_x) == unicode:
00302 _x = _x.encode('utf-8')
00303 length = len(_x)
00304 buff.write(struct.pack('<I%ss'%length, length, _x))
00305 buff.write(_struct_h.pack(self.order.behavior.value))
00306 for val1 in self.order.waypt:
00307 _x = val1
00308 buff.write(_struct_2d.pack(_x.latitude, _x.longitude))
00309 _v9 = val1.mapxy
00310 _x = _v9
00311 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00312 _v10 = val1.id
00313 _x = _v10
00314 buff.write(_struct_3H.pack(_x.seg, _x.lane, _x.pt))
00315 _x = val1
00316 buff.write(_struct_H7Bif.pack(_x.index, _x.is_entry, _x.is_exit, _x.is_goal, _x.is_lane_change, _x.is_spot, _x.is_stop, _x.is_perimeter, _x.checkpoint_id, _x.lane_width))
00317 for val1 in self.order.chkpt:
00318 _x = val1
00319 buff.write(_struct_2d.pack(_x.latitude, _x.longitude))
00320 _v11 = val1.mapxy
00321 _x = _v11
00322 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00323 _v12 = val1.id
00324 _x = _v12
00325 buff.write(_struct_3H.pack(_x.seg, _x.lane, _x.pt))
00326 _x = val1
00327 buff.write(_struct_H7Bif.pack(_x.index, _x.is_entry, _x.is_exit, _x.is_goal, _x.is_lane_change, _x.is_spot, _x.is_stop, _x.is_perimeter, _x.checkpoint_id, _x.lane_width))
00328 _x = self
00329 buff.write(_struct_2f2i.pack(_x.order.min_speed, _x.order.max_speed, _x.order.replan_num, _x.order.next_uturn))
00330 except struct.error as se: self._check_types(se)
00331 except TypeError as te: self._check_types(te)
00332
00333 def deserialize_numpy(self, str, numpy):
00334 """
00335 unpack serialized message in str into this message instance using numpy for array types
00336 :param str: byte array of serialized message, ``str``
00337 :param numpy: numpy python module
00338 """
00339 try:
00340 if self.header is None:
00341 self.header = std_msgs.msg.Header()
00342 if self.order is None:
00343 self.order = art_msgs.msg.Order()
00344 end = 0
00345 _x = self
00346 start = end
00347 end += 12
00348 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00349 start = end
00350 end += 4
00351 (length,) = _struct_I.unpack(str[start:end])
00352 start = end
00353 end += length
00354 if python3:
00355 self.header.frame_id = str[start:end].decode('utf-8')
00356 else:
00357 self.header.frame_id = str[start:end]
00358 start = end
00359 end += 2
00360 (self.order.behavior.value,) = _struct_h.unpack(str[start:end])
00361 self.order.waypt = []
00362 for i in range(0, 5):
00363 val1 = art_msgs.msg.WayPoint()
00364 _x = val1
00365 start = end
00366 end += 16
00367 (_x.latitude, _x.longitude,) = _struct_2d.unpack(str[start:end])
00368 _v13 = val1.mapxy
00369 _x = _v13
00370 start = end
00371 end += 12
00372 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00373 _v14 = val1.id
00374 _x = _v14
00375 start = end
00376 end += 6
00377 (_x.seg, _x.lane, _x.pt,) = _struct_3H.unpack(str[start:end])
00378 _x = val1
00379 start = end
00380 end += 17
00381 (_x.index, _x.is_entry, _x.is_exit, _x.is_goal, _x.is_lane_change, _x.is_spot, _x.is_stop, _x.is_perimeter, _x.checkpoint_id, _x.lane_width,) = _struct_H7Bif.unpack(str[start:end])
00382 val1.is_entry = bool(val1.is_entry)
00383 val1.is_exit = bool(val1.is_exit)
00384 val1.is_goal = bool(val1.is_goal)
00385 val1.is_lane_change = bool(val1.is_lane_change)
00386 val1.is_spot = bool(val1.is_spot)
00387 val1.is_stop = bool(val1.is_stop)
00388 val1.is_perimeter = bool(val1.is_perimeter)
00389 self.order.waypt.append(val1)
00390 self.order.chkpt = []
00391 for i in range(0, 2):
00392 val1 = art_msgs.msg.WayPoint()
00393 _x = val1
00394 start = end
00395 end += 16
00396 (_x.latitude, _x.longitude,) = _struct_2d.unpack(str[start:end])
00397 _v15 = val1.mapxy
00398 _x = _v15
00399 start = end
00400 end += 12
00401 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00402 _v16 = val1.id
00403 _x = _v16
00404 start = end
00405 end += 6
00406 (_x.seg, _x.lane, _x.pt,) = _struct_3H.unpack(str[start:end])
00407 _x = val1
00408 start = end
00409 end += 17
00410 (_x.index, _x.is_entry, _x.is_exit, _x.is_goal, _x.is_lane_change, _x.is_spot, _x.is_stop, _x.is_perimeter, _x.checkpoint_id, _x.lane_width,) = _struct_H7Bif.unpack(str[start:end])
00411 val1.is_entry = bool(val1.is_entry)
00412 val1.is_exit = bool(val1.is_exit)
00413 val1.is_goal = bool(val1.is_goal)
00414 val1.is_lane_change = bool(val1.is_lane_change)
00415 val1.is_spot = bool(val1.is_spot)
00416 val1.is_stop = bool(val1.is_stop)
00417 val1.is_perimeter = bool(val1.is_perimeter)
00418 self.order.chkpt.append(val1)
00419 _x = self
00420 start = end
00421 end += 16
00422 (_x.order.min_speed, _x.order.max_speed, _x.order.replan_num, _x.order.next_uturn,) = _struct_2f2i.unpack(str[start:end])
00423 return self
00424 except struct.error as e:
00425 raise genpy.DeserializationError(e)
00426
00427 _struct_I = genpy.struct_I
00428 _struct_h = struct.Struct("<h")
00429 _struct_2f2i = struct.Struct("<2f2i")
00430 _struct_H7Bif = struct.Struct("<H7Bif")
00431 _struct_2d = struct.Struct("<2d")
00432 _struct_3I = struct.Struct("<3I")
00433 _struct_3H = struct.Struct("<3H")
00434 _struct_3f = struct.Struct("<3f")