Stop Class Reference

#include <stop.h>

Inheritance diagram for Stop:
Inheritance graph
[legend]

List of all members.

Public Member Functions

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

Private Attributes

bool creeping
double initial_speed
bool stopping

Detailed Description

Definition at line 14 of file stop.h.


Constructor & Destructor Documentation

Stop::Stop ( 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.

Todo:
Reconcile this with the StopLine controller, which has an incompatible interface.

Definition at line 43 of file stop.cc.

Stop::~Stop (  ) 

Definition at line 49 of file stop.cc.


Member Function Documentation

Controller::result_t Stop::control ( pilot_command_t pcmd,
float  distance,
float  threshold,
float  topspeed = 3.0 
)

Set speed for steady deceleration for stop distance

Parameters:
pcmd contains desired heading and speed, assuming it is not yet time to stop, updated on exit
distance to stop location along current path
threshold close enough distance
topspeed velocity limit
Returns:
OK if in process of stopping; Finished if stop way-point reached.

Definition at line 69 of file stop.cc.

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

Reimplemented from Controller.

Definition at line 51 of file stop.cc.

void Stop::reset ( void   )  [virtual]

Reimplemented from Controller.

Definition at line 146 of file stop.cc.


Member Data Documentation

bool Stop::creeping [private]

Definition at line 33 of file stop.h.

double Stop::initial_speed [private]

Definition at line 34 of file stop.h.

bool Stop::stopping [private]

Definition at line 32 of file stop.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