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