StopLine Class Reference

#include <stop_line.h>

Inheritance diagram for StopLine:
Inheritance graph
[legend]

List of all members.

Public Member Functions

result_t control (pilot_command_t &pcmd, float topspeed=3.0)
void reset (void)
 StopLine (Navigator *navptr, int _verbose)
 ~StopLine ()

Private Member Functions

void reset_me (void)

Private Attributes

bool creeping
double initial_speed
double max_creep_distance
bool stopping

Detailed Description

Definition at line 15 of file stop_line.h.


Constructor & Destructor Documentation

StopLine::StopLine ( Navigator navptr,
int  _verbose 
)

This is based on the unpublished "Control Tutorial" draft dated January 26, 2004 by Dr. Benjamin Kuypers, section 5: "The Stopping Controller". He recommends a constant deceleration instead of the simpler exponential decay. The dynamical system is:

x_dot = -k * sqrt(x)

Solving analytically with initial condition x(0) = D and v(0) = V yields these equations of motion:

x(t) = (sqrt(D) - V*t/(2*sqrt(D)))**2 (parabolic drop) v(t) = dx/dt = (V**2/2*D)*t + V (linear velocity) a(t) = dv/dt = V**2/(2*D) = A (constant deceleration)

Note that the initial velocity V is negative in these equations, because it represents motion from positive x to zero. The system stops in finite time T = -2*D/V, with x(T) = 0, and v(T) = 0.

For example, when D = 10m from stop line and V = -5m/s, the vehicle stops in 4 seconds at a constant 1.25m/s/s deceleration.

Definition at line 42 of file stop_line.cc.

StopLine::~StopLine (  ) 

Definition at line 48 of file stop_line.cc.


Member Function Documentation

Controller::result_t StopLine::control ( pilot_command_t pcmd,
float  topspeed = 3.0 
)

Set speed for steady deceleration to stop way-point

Precondition:
course->stop_waypt is goal way-point of stop
Parameters:
pcmd contains desired heading and speed, assuming it is not yet time to stop, updated on exit
topspeed velocity limit
Postcondition:
resets course->stop_waypt.id if reached.
Returns:
OK if in process of stopping; Finished if stop way-point reached.

Definition at line 63 of file stop_line.cc.

void StopLine::reset ( void   )  [virtual]

Reimplemented from Controller.

Definition at line 156 of file stop_line.cc.

void StopLine::reset_me ( void   )  [private, virtual]

Reimplemented from Controller.

Definition at line 163 of file stop_line.cc.


Member Data Documentation

bool StopLine::creeping [private]

Definition at line 28 of file stop_line.h.

double StopLine::initial_speed [private]

Definition at line 29 of file stop_line.h.

double StopLine::max_creep_distance [private]

Definition at line 30 of file stop_line.h.

bool StopLine::stopping [private]

Definition at line 27 of file stop_line.h.


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


art_nav
Author(s): Austin Robot Technology, Jack O'Quin
autogenerated on Fri Jan 11 10:05:41 2013