00001 /* -*- mode: C++ -*- 00002 * 00003 * Navigator passing controller 00004 * 00005 * Copyright (C) 2007, 2010, Austin Robot Technology 00006 * 00007 * License: Modified BSD Software License Agreement 00008 * 00009 * $Id: passing.h 479 2010-08-27 01:16:11Z jack.oquin $ 00010 */ 00011 00012 #ifndef __PASSING_HH__ 00013 #define __PASSING_HH__ 00014 00015 class Avoid; 00016 class Halt; 00017 class LaneHeading; 00018 class FollowSafely; 00019 class SlowForCurves; 00020 00021 class Passing: public Controller 00022 { 00023 public: 00024 00025 Passing(Navigator *navptr, int _verbose); 00026 ~Passing(); 00027 void configure(); 00028 result_t control(pilot_command_t &pcmd); 00029 void reset(void); 00030 00031 private: 00032 bool in_passing_lane; 00033 00034 Avoid *avoid; 00035 Halt *halt; 00036 FollowSafely *follow_safely; 00037 LaneHeading *lane_heading; 00038 SlowForCurves *slow_for_curves; 00039 00040 // .cfg variables 00041 float passing_distance; 00042 float close_stopping_distance; 00043 float passing_distance_ahead; 00044 float passing_distance_behind; 00045 float passing_speed; 00046 00047 bool done_passing(void); 00048 00049 // reset this controller only 00050 void reset_me(void); 00051 }; 00052 00053 #endif // __PASSING_HH__