$search

Run Class Reference

#include <run.h>

Inheritance diagram for Run:
Inheritance graph
[legend]

List of all members.

Public Member Functions

result_t control (pilot_command_t &pcmd)
void reset (void)
 Run (Navigator *navptr, int _verbose)
 ~Run ()

Private Types

enum  state_t { Continue, Escape, Replan }

Private Member Functions

void begin_escape (void)
Controller::result_t go (pilot_command_t &pcmd)
Controller::result_t initialize (pilot_command_t &pcmd)
void set_go_state (state_t)
ElementID starting_waypt (void)

Private Attributes

MapPose blockage_pose
float blockage_waypt_dist
state_t go_state
Halthalt
int last_replan
Roadroad

Detailed Description

Definition at line 22 of file run.h.


Member Enumeration Documentation

enum Run::state_t [private]
Enumerator:
Continue 
Escape 
Replan 

Definition at line 34 of file run.h.


Constructor & Destructor Documentation

Run::Run ( Navigator navptr,
int  _verbose 
)

Definition at line 36 of file run.cc.

Run::~Run (  ) 

Definition at line 50 of file run.cc.


Member Function Documentation

void Run::begin_escape ( void   )  [private]

Definition at line 63 of file run.cc.

Controller::result_t Run::control ( pilot_command_t pcmd  )  [virtual]

Main controller whenever E-stop is in the Run state.

Each order contains a behavior which determines the navigator run state for this cycle.

Returns:
OK if able to continue running; NotImplemented if unrecognized behavior in order; NotApplicable if unable to determine starting way-point for Initialize behavior; other results from subordinate controllers.

Reimplemented from Controller.

Definition at line 87 of file run.cc.

Controller::result_t Run::go ( pilot_command_t pcmd  )  [private]

controller for Go behavior.

Todo:
either implement blockage handling or delete it.

Blockage handling:

Set obstacle blockage timer when car stops.

Restart timer in observer_clear() and in follow_lane when waiting for an obstacle in a stop line (not intersection) safety area.

When the blockage timer expires, remember the current pose, stop calling the road controller, and instead call the unstuck controller (VoronoiZone). When it has gone 10m, run the starting_waypt() algorithm to determine a new replan_waypt. When Commander sees replan_waypt set without the roadblock flag, it will make a new plan. When the new plan is received, reset the road controller and attempt to continue.

While blocked, mark waypt[1] reached whenever the front bumper is within zone_waypoint_radius. TODO: configure a larger radius.

Commander looks at both the roadblock flag and the replan_waypt. If replan_waypt is set it makes a new plan from there. If the roadblock flag is also set, it marks a blockage in the RNDF after last_waypt. Commander marks every order with a replan_num that is incremented every time replan route runs, so Navigator can detect when that has been done.

Definition at line 219 of file run.cc.

Controller::result_t Run::initialize ( pilot_command_t pcmd  )  [private]

Initialize behavior

Returns:
OK if successful NotApplicable is unable to determine initial way-point
Postcondition:
pcmd is a halt navdata->last_waypt is starting way-point, if found

Definition at line 166 of file run.cc.

void Run::reset ( void   )  [virtual]

Reimplemented from Controller.

Definition at line 304 of file run.cc.

void Run::set_go_state ( state_t  newstate  )  [private]

set new Go behavior state

Definition at line 317 of file run.cc.

ElementID Run::starting_waypt ( void   )  [private]

find starting way-point for Commander

Returns:
: starting way-point for planning, if available; null ElementID, otherwise.

Definition at line 333 of file run.cc.


Member Data Documentation

Definition at line 42 of file run.h.

float Run::blockage_waypt_dist [private]

Definition at line 43 of file run.h.

Definition at line 41 of file run.h.

Halt* Run::halt [private]

Definition at line 58 of file run.h.

int Run::last_replan [private]

Definition at line 44 of file run.h.

Road* Run::road [private]

Definition at line 59 of file run.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


art_nav
Author(s): Austin Robot Technology, Jack O'Quin
autogenerated on Fri Mar 1 14:13:02 2013