parking.h
Go to the documentation of this file.
00001 /* -*- mode: C++ -*-
00002  *
00003  *  Navigator parking controller
00004  *
00005  *  Copyright (C) 2007, 2010, Austin Robot Technology
00006  *
00007  *  License: Modified BSD Software License Agreement
00008  *
00009  *  Author: Patrick Beeson
00010  *
00011  *  $Id: parking.h 479 2010-08-27 01:16:11Z jack.oquin $
00012  */
00013 
00014 #ifndef __PARKING_HH__
00015 #define __PARKING_HH__
00016 
00017 
00018 class Safety;
00019 class Stop;
00020 class Halt;
00021 
00022 class PARK_control: public Controller
00023 {
00024 public:
00025 
00026   PARK_control(Navigator *navptr, int _verbose);
00027   ~PARK_control();
00028   void configure(ConfigFile* cf, int section);
00029   result_t control(pilot_command_t &pcmd, mapxy_list_t, bool voronoi_stuck=true);
00030   void reset(void);
00031   
00032 private:
00033   // simple state machine
00034 
00035   typedef enum
00036     {
00037       hit_waypoint,
00038       approach_spot,
00039       pull_in,
00040       pull_out
00041     } state_t;
00042 
00043 
00044   state_t state;                        // current FSM state
00045 
00046 
00047   Controller::result_t initialize(pilot_command_t& pcmd,
00048                                   const mapxy_list_t&);
00049 
00050   // .cfg variables
00051   float parking_speed_limit;
00052 
00053   bool find_a_better_spot;
00054   float find_spot_max_x_offset;
00055   float find_spot_max_y_offset;
00056   float find_spot_step_size;
00057 
00058 
00059   // subordinate controllers
00060   Safety *safety;
00061   Stop  *stop;
00062   Halt *halt;
00063 
00064   int adjust_spot(std::vector<WayPointNode> &new_waypts,
00065                   ObstacleList obstacles,
00066                   float max_x_offset,
00067                   float max_y_offset,
00068                   float step_size);
00069 
00070 
00071   float speed_limit;
00072 
00073   float park_distance, park_turn;
00074 
00075   void reset_me();
00076   bool hit_way_point(float park_distance, float park_turn,
00077                                  float dheading);
00078   player_pose2d_t new_end_pose;
00079 
00080   float min_distance,min_theta;
00081 
00082   bool small_segment(float distance, float turn);
00083 
00084   float park_turn_ratio;
00085   float park_max_speed;
00086   bool halting;
00087 
00088   pilot_command_t last_pcmd;
00089 
00090   float last_park_dist;
00091   float last_park_turn;
00092   float min_adj_dist;
00093   float lastYaw;
00094   std::vector<MapXY> spot_points;
00095   int min_obst;
00096 };
00097 
00098 #endif // __REED_SHEPP_HH__
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


art_nav
Author(s): Austin Robot Technology, Jack O'Quin
autogenerated on Tue Sep 24 2013 10:42:11