Public Member Functions | Private Types | Private Member Functions | Private Attributes
LearnedSpeedControl Class Reference

#include <learned_controller.h>

Inheritance diagram for LearnedSpeedControl:
Inheritance graph

List of all members.

Public Member Functions

virtual void adjust (float speed, float error, float *brake_req, float *throttle_req)
virtual void configure (art_pilot::PilotConfig &newconfig)
int getAction (const std::vector< float > &s)
 LearnedSpeedControl ()
virtual void reset (void)
virtual ~LearnedSpeedControl ()

Private Types

typedef const std::vector
< float > * 

Private Member Functions

state_t canonicalize (const std::vector< float > &s)
void loadPolicy (const char *filename)

Private Attributes

bool loaded
const int numactions
std::map< state_t, std::vector
< float > > 
std::vector< float > s
std::set< std::vector< float > > statespace

Detailed Description

Acceleration matrix speed controller class

Definition at line 9 of file learned_controller.h.

Member Typedef Documentation

typedef const std::vector<float>* LearnedSpeedControl::state_t [private]

The implementation maps all sensations to a set of canonical pointers, which serve as the internal representation of environment state.

Definition at line 28 of file learned_controller.h.

Constructor & Destructor Documentation

Acceleration matrix speed control constructor.

Definition at line 8 of file

LearnedSpeedControl destructor

Definition at line 26 of file

Member Function Documentation

void LearnedSpeedControl::adjust ( float  speed,
float  error,
float *  brake_req,
float *  throttle_req 
) [virtual]

Adjust speed to match goal.

Generate brake and throttle changes from velocity PID controller via an acceleration matrix.

speedabsolute value of current velocity in m/sec
errorimmediate goal minus speed
brake_req-> previous brake request (input), updated brake request (output).
throttle_req-> previous throttle request (input), updated throttle request (output).

Implements SpeedControl.

Definition at line 45 of file

LearnedSpeedControl::state_t LearnedSpeedControl::canonicalize ( const std::vector< float > &  s) [private]

Produces a canonical representation of the given sensation.

sThe current sensation from the environment.
A pointer to an equivalent state in statespace.

Definition at line 150 of file

void LearnedSpeedControl::configure ( art_pilot::PilotConfig &  newconfig) [virtual]

Configure controller parameters.

Implements SpeedControl.

Definition at line 123 of file

int LearnedSpeedControl::getAction ( const std::vector< float > &  s)

Definition at line 136 of file

void LearnedSpeedControl::loadPolicy ( const char *  filename) [private]

Definition at line 165 of file

void LearnedSpeedControl::reset ( void  ) [virtual]

Reset speed controller.

Implements SpeedControl.

Definition at line 128 of file

Member Data Documentation

Definition at line 50 of file learned_controller.h.

Definition at line 51 of file learned_controller.h.

const int LearnedSpeedControl::numactions [private]

Definition at line 48 of file learned_controller.h.

std::map<state_t, std::vector<float> > LearnedSpeedControl::Q [private]

The primary data structure of the learning algorithm, the value function Q. For state_t s and int a, Q[s][a] gives the learned maximum expected future discounted reward conditional on executing action a in state s.

Definition at line 44 of file learned_controller.h.

std::vector<float> LearnedSpeedControl::s [private]

Definition at line 23 of file learned_controller.h.

std::set<std::vector<float> > LearnedSpeedControl::statespace [private]

Set of all distinct sensations seen. Pointers to elements of this set serve as the internal representation of the environment state.

Definition at line 38 of file learned_controller.h.

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

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