Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
controller::RefGenerator Class Reference

#include <ref_generator.h>

List of all members.

Public Member Functions

void generate (double x_desired, double dt, bool force_stop)
 Generates the actual reference.
double getAccelerationReference ()
double getPositionReference ()
double getVelocityReference ()
 RefGenerator (double current_x, double max_vel, double max_acc)
 Constructor for the RefGenerator.
void setCurrentPosition (double x)
void setCurrentVelocity (double vel)
 ~RefGenerator ()
 Deconstructor for the RefGenerator.

Private Member Functions

int signum (double a)

Private Attributes

double acc_
double max_acc_
double max_vel_
double pos_
double vel_

Static Private Attributes

static const double EPSILON = 1e-5

Detailed Description

Definition at line 53 of file ref_generator.h.


Constructor & Destructor Documentation

RefGenerator::RefGenerator ( double  current_x,
double  max_vel,
double  max_acc 
)

Constructor for the RefGenerator.

pos_ is set to current_x vel_ to 0 acc_ to 0 max_vel_ to max_vel max_acc_ to mac_acc

Definition at line 54 of file ref_generator.cpp.

Deconstructor for the RefGenerator.

Definition at line 58 of file ref_generator.cpp.


Member Function Documentation

void RefGenerator::generate ( double  x_desired,
double  dt,
bool  force_stop 
)

Generates the actual reference.

Creates new values for pos_, vel_ and acc_ such that progress is made to the desired position, but no (velocity or acceleration) limit is exceeded.

Parameters:
x_desiredthe desired position
dtthe time passed since the last generate
force_stopwhether to stop immediately or not

Definition at line 90 of file ref_generator.cpp.

Returns:
the value of acc_

Definition at line 86 of file ref_generator.cpp.

Returns:
the value of pos_

Definition at line 78 of file ref_generator.cpp.

Returns:
the value of vel_

Definition at line 82 of file ref_generator.cpp.

Sets pos_ to x

Definition at line 70 of file ref_generator.cpp.

void RefGenerator::setCurrentVelocity ( double  vel)

Sets vel_ to vel

Definition at line 74 of file ref_generator.cpp.

int RefGenerator::signum ( double  a) [private]
Returns:
the sign of a i.e. -1 or 1

Definition at line 61 of file ref_generator.cpp.


Member Data Documentation

Definition at line 59 of file ref_generator.h.

const double controller::RefGenerator::EPSILON = 1e-5 [static, private]

Definition at line 64 of file ref_generator.h.

Definition at line 62 of file ref_generator.h.

Definition at line 61 of file ref_generator.h.

Definition at line 57 of file ref_generator.h.

Definition at line 58 of file ref_generator.h.


The documentation for this class was generated from the following files:


amigo_gazebo
Author(s): Rob Janssen
autogenerated on Tue Jan 7 2014 11:43:55