Public Member Functions | Private Member Functions | Private Attributes
ArtBrakeModel Class Reference

#include <model_brake.h>

List of all members.

Public Member Functions

 ArtBrakeModel (float init_pos)
int interpret (const char *string, char *status, int nbytes)
 ~ArtBrakeModel ()

Private Member Functions

double getAccel (double direction)
 Get acceleration constant from direction of movement (-, 0, +).
void move (double start, double finish)
double plan (double dx)
void update (void)
void update_sensors (float position)

Private Attributes

double a_
double actuator_accel_
double actuator_max_vel_
Animaticsam_
float brake_position_
int digital_potentiometer_
int digital_pressure_
int encoder_goal_
double last_update_time_
ros::NodeHandle node_
ActuatorPlan plan_
int sim_encoder_
int sim_status_
double v_
double x_

Detailed Description

Definition at line 107 of file model_brake.h.


Constructor & Destructor Documentation

ArtBrakeModel::ArtBrakeModel ( float  init_pos)

Constructor

Definition at line 30 of file model_brake.cc.

Definition at line 60 of file model_brake.cc.


Member Function Documentation

double ArtBrakeModel::getAccel ( double  direction) [inline, private]

Get acceleration constant from direction of movement (-, 0, +).

Definition at line 146 of file model_brake.h.

int ArtBrakeModel::interpret ( const char *  string,
char *  status,
int  nbytes 
)

Interpret actuator command and return response.

interpret brake command and return response

Only certain commands require interpretation. All others are just accepted, acknowledged, and ignored.

Definition at line 70 of file model_brake.cc.

void ArtBrakeModel::move ( double  start,
double  finish 
) [private]

Move simulated actuator.

Parameters:
starttime for simulation
finishtime.

The Animatics Smart Motor provides a constant acceleration and deceleration up to a maximum velocity.

Definition at line 154 of file model_brake.cc.

double ArtBrakeModel::plan ( double  dx) [private]

Plan actuator relative move.

Parameters:
dx= encoder ticks to move.
Returns:
time (in seconds) required to get there.

This calculation assumes a triangular velocity profile with constant acceleration |a|, applied first in one direction, then in the other.

Erase any previous plan, then move the actuator in two steps:

(1) accelerate in direction requested; (2) decelerate to zero velocity

The real device supports a trapezoidal velocity profile with a maximum velocity (actuator_max_vel_). Since it takes a long time to reach actuator_max_vel_, this model ignores that detail, which does not seem to matter much in practice.

Definition at line 206 of file model_brake.cc.

void ArtBrakeModel::update ( void  ) [private]

update brake actuator model for start of cycle

Definition at line 243 of file model_brake.cc.

void ArtBrakeModel::update_sensors ( float  position) [private]

Definition at line 285 of file model_brake.cc.


Member Data Documentation

double ArtBrakeModel::a_ [private]

Definition at line 140 of file model_brake.h.

Definition at line 134 of file model_brake.h.

Definition at line 135 of file model_brake.h.

Definition at line 124 of file model_brake.h.

Definition at line 126 of file model_brake.h.

Definition at line 131 of file model_brake.h.

Definition at line 130 of file model_brake.h.

Definition at line 129 of file model_brake.h.

Definition at line 122 of file model_brake.h.

Definition at line 120 of file model_brake.h.

Definition at line 142 of file model_brake.h.

Definition at line 128 of file model_brake.h.

Definition at line 127 of file model_brake.h.

double ArtBrakeModel::v_ [private]

Definition at line 139 of file model_brake.h.

double ArtBrakeModel::x_ [private]

Definition at line 138 of file model_brake.h.


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


art_servo
Author(s): Austin Robot Technology, Jack O'Quin
autogenerated on Fri Jan 3 2014 11:09:12