Classes | Public Member Functions | Protected Attributes
MotorModel Class Reference

#include <motor_model.h>

Inheritance diagram for MotorModel:
Inheritance graph
[legend]

List of all members.

Classes

class  Filter
class  SimpleFilter

Public Member Functions

void checkPublish ()
 Publishes motor trace if delay time is up.
void diagnostics (diagnostic_updater::DiagnosticStatusWrapper &d)
 Collects and publishes device diagnostics.
void flagPublish (const std::string &reason, int level, int delay)
 flags delayed publish of motor trace.
bool initialize (const ethercat_hardware::ActuatorInfo &actuator_info, const ethercat_hardware::BoardInfo &board_info)
 Initializes motor trace publisher.
 MotorModel (unsigned trace_size)
void reset ()
void sample (const ethercat_hardware::MotorTraceSample &s)
 Call for each update.
bool verify ()
 Check for errors between sample data and motor model.

Protected Attributes

Filter abs_board_voltage_
Filter abs_current_error_
Filter abs_measured_current_
Filter abs_measured_voltage_error_
Filter abs_motor_voltage_error_
Filter abs_position_delta_
Filter abs_velocity_
ethercat_hardware::ActuatorInfo actuator_info_
double backemf_constant_
ethercat_hardware::BoardInfo board_info_
Filter current_error_
double current_error_limit_
int diagnostics_level_
boost::mutex diagnostics_mutex_
std::string diagnostics_reason_
Filter measured_voltage_error_
SimpleFilter motor_resistance_
Filter motor_voltage_error_
bool previous_pwm_saturated_
int publish_delay_
int publish_level_
std::string publish_reason_
unsigned published_traces_
realtime_tools::RealtimePublisher
< ethercat_hardware::MotorTrace > * 
publisher_
std::vector
< ethercat_hardware::MotorTraceSample
trace_buffer_
unsigned trace_index_
unsigned trace_size_

Detailed Description

Definition at line 20 of file motor_model.h.


Constructor & Destructor Documentation

MotorModel::MotorModel ( unsigned  trace_size)

Definition at line 6 of file motor_model.cpp.


Member Function Documentation

Publishes motor trace if delay time is up.

Definition at line 87 of file motor_model.cpp.

Collects and publishes device diagnostics.

Definition at line 143 of file motor_model.cpp.

void MotorModel::flagPublish ( const std::string &  reason,
int  level,
int  delay 
)

flags delayed publish of motor trace.

New publish will only take precedence of previous publish iff level is higher than previous level

Definition at line 125 of file motor_model.cpp.

bool MotorModel::initialize ( const ethercat_hardware::ActuatorInfo actuator_info,
const ethercat_hardware::BoardInfo board_info 
)

Initializes motor trace publisher.

Definition at line 53 of file motor_model.cpp.

Definition at line 27 of file motor_model.cpp.

Call for each update.

Adds sample to motor model. Also, adds sample to motor trace.

Definition at line 198 of file motor_model.cpp.

Check for errors between sample data and motor model.

Parameters:
reasonstring is filled in when error or warning occurs
levelfilled in with 2 (ERROR) or 1 (WARN).
Returns:
returns false if motor should halt

Definition at line 313 of file motor_model.cpp.


Member Data Documentation

Definition at line 89 of file motor_model.h.

Definition at line 83 of file motor_model.h.

Definition at line 88 of file motor_model.h.

Definition at line 81 of file motor_model.h.

Definition at line 79 of file motor_model.h.

Definition at line 90 of file motor_model.h.

Definition at line 87 of file motor_model.h.

Definition at line 36 of file motor_model.h.

double MotorModel::backemf_constant_ [protected]

Definition at line 38 of file motor_model.h.

Definition at line 37 of file motor_model.h.

Definition at line 82 of file motor_model.h.

Definition at line 42 of file motor_model.h.

Definition at line 48 of file motor_model.h.

boost::mutex MotorModel::diagnostics_mutex_ [protected]

Definition at line 77 of file motor_model.h.

std::string MotorModel::diagnostics_reason_ [protected]

Definition at line 49 of file motor_model.h.

Definition at line 80 of file motor_model.h.

Definition at line 84 of file motor_model.h.

Definition at line 78 of file motor_model.h.

Definition at line 39 of file motor_model.h.

int MotorModel::publish_delay_ [protected]

Definition at line 43 of file motor_model.h.

int MotorModel::publish_level_ [protected]

Definition at line 44 of file motor_model.h.

std::string MotorModel::publish_reason_ [protected]

Definition at line 45 of file motor_model.h.

unsigned MotorModel::published_traces_ [protected]

Definition at line 35 of file motor_model.h.

realtime_tools::RealtimePublisher<ethercat_hardware::MotorTrace>* MotorModel::publisher_ [protected]

Definition at line 41 of file motor_model.h.

Definition at line 40 of file motor_model.h.

unsigned MotorModel::trace_index_ [protected]

Definition at line 34 of file motor_model.h.

unsigned MotorModel::trace_size_ [protected]

Definition at line 33 of file motor_model.h.


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


ethercat_hardware
Author(s): Rob Wheeler (email: wheeler@willowgarage.com), Maintained by Derek King (email: dking@willowgarage.com)
autogenerated on Thu Apr 24 2014 15:43:45