Go to the documentation of this file.
3 #ifndef ETHERCAT_HARDWARE_MOTOR_MODEL_H
4 #define ETHERCAT_HARDWARE_MOTOR_MODEL_H
10 #include <ethercat_hardware/MotorTraceSample.h>
11 #include <ethercat_hardware/MotorTrace.h>
12 #include <ethercat_hardware/ActuatorInfo.h>
13 #include <ethercat_hardware/BoardInfo.h>
17 #include <boost/utility.hpp>
18 #include <boost/thread/mutex.hpp>
24 bool initialize(
const ethercat_hardware::ActuatorInfo &actuator_info,
25 const ethercat_hardware::BoardInfo &board_info);
26 void flagPublish(
const std::string &reason,
int level,
int delay);
29 void sample(
const ethercat_hardware::MotorTraceSample &
s);
55 void sample(
double value,
double filter_coefficient);
66 Filter(
double filter_coefficient);
Filter measured_voltage_error_
bool initialize(const ethercat_hardware::ActuatorInfo &actuator_info, const ethercat_hardware::BoardInfo &board_info)
Initializes motor trace publisher.
std::vector< ethercat_hardware::MotorTraceSample > trace_buffer_
double filter_coefficient_
Filter abs_board_voltage_
Filter abs_motor_voltage_error_
bool previous_pwm_saturated_
void sample(double value, double filter_coefficient)
Updates filter with newly sampled value.
bool sample(double value)
Updates filter with newly sampled value, also tracks max value.
void flagPublish(const std::string &reason, int level, int delay)
flags delayed publish of motor trace.
std::string publish_reason_
void checkPublish()
Publishes motor trace if delay time is up.
Filter(double filter_coefficient)
ethercat_hardware::ActuatorInfo actuator_info_
double filter_max() const
Filter abs_current_error_
MotorModel(unsigned trace_size)
boost::mutex diagnostics_mutex_
bool verify()
Check for errors between sample data and motor model.
double max_filtered_value_
Filter abs_measured_voltage_error_
double current_error_limit_
ethercat_hardware::BoardInfo board_info_
Filter abs_position_delta_
Filter abs_measured_current_
unsigned published_traces_
Filter motor_voltage_error_
void diagnostics(diagnostic_updater::DiagnosticStatusWrapper &d)
Collects and publishes device diagnostics.
SimpleFilter motor_resistance_
std::string diagnostics_reason_
void sample(const ethercat_hardware::MotorTraceSample &s)
Call for each update.
realtime_tools::RealtimePublisher< ethercat_hardware::MotorTrace > * publisher_
ethercat_hardware
Author(s): Rob Wheeler
, Derek King
autogenerated on Thu Sep 26 2024 02:44:04