DARPA_rules.h
Go to the documentation of this file.
00001 /* -*- mode: C++ -*-
00002  *
00003  *  DARPA Urban Challenge rules description
00004  *
00005  *  Copyright (C) 2009 Austin Robot Technology                    
00006  *  License: Modified BSD Software License Agreement
00007  *
00008  *  $Id: DARPA_rules.h 630 2010-09-25 16:20:42Z jack.oquin $
00009  */
00010 
00011 #ifndef _DARPA_rules_H_
00012 #define _DARPA_rules_H_
00013 
00026 #include <algorithm>
00027 #include <math.h>
00028 #include <art/conversions.h>
00029 
00030 #include <art_msgs/ArtVehicle.h>
00031 
00032 namespace DARPA_rules
00033 {
00034   // specific to our vehicle
00035   const float vehicle_length = art_msgs::ArtVehicle::length;
00036   const float vehicle_width = art_msgs::ArtVehicle::width;
00037 
00038   // A.4. Stay in lane
00039   // Stay at least this far away from the road's center line.
00040   const float lane_center_offset = 1.0f;
00041 
00042   // A.6. Excess delay
00043   const float excess_delay = 10.0f;
00044 
00045   // A.8. Stop line
00046   const float stop_line_to_bumper = 1.0f;
00047 
00048   // A.9. Vehicle separation
00049   const float stop_line_safety_area = 30.0f;
00050   const float min_forw_sep_safety = 2.0f;
00051   const float min_forw_sep_travel = vehicle_length;
00052 
00053   const float min_standoff_dist = 1.0f;
00054 
00055   static inline float forw_sep_travel(float speed)
00056   {
00057     float speed_mph = mps2mph(speed);
00058     return fmaxf((speed_mph/10.0f)*vehicle_length, min_forw_sep_travel);
00059   }
00060 
00061   // A.10. Leaving lane to pass
00062   const float min_forw_sep_to_pass = vehicle_length;
00063 
00064   // A.11. Returning to lane after pass
00065   const float min_rear_sep_after_pass = vehicle_length;
00066   const float front_limit_after_pass = vehicle_length * 4.0f;
00067 
00068   // A.12. U-turn
00069   const float max_dist_from_entry_exit = 15.0f;
00070 
00071   // D.4. Left turn
00072   const float max_left_turn_delay = 10.0f;
00073 
00074   // D.5. Vehicle separation during left turn
00075   const float min_left_turn_sep = vehicle_length * 2.0f;
00076 };
00077 
00078 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines


art_common
Author(s): Austin Robot Technology
autogenerated on Tue Sep 24 2013 10:41:19