Public Member Functions | Private Member Functions | Private Attributes | List of all members
pid_ns::PidObject Class Reference

#include <controller.h>

Public Member Functions

 PidObject ()
 
 PidObject ()
 

Private Member Functions

void doCalcs ()
 
void doCalcs ()
 
void getParams (double in, double &value, double &scale)
 
void getParams (double in, double &value, double &scale)
 
void pidEnableCallback (const std_msgs::Bool &pid_enable_msg)
 
void pidEnableCallback (const std_msgs::Bool &pid_enable_msg)
 
void plantStateCallback (const std_msgs::Float64 &state_msg)
 
void plantStateCallback (const std_msgs::Float64 &state_msg)
 
void printParameters ()
 
void printParameters ()
 
void reconfigureCallback (pid::PidConfig &config, uint32_t level)
 
void reconfigureCallback (pid::PidConfig &config, uint32_t level)
 
void setpointCallback (const std_msgs::Float64 &setpoint_msg)
 
void setpointCallback (const std_msgs::Float64 &setpoint_msg)
 
bool validateParameters ()
 
bool validateParameters ()
 

Private Attributes

bool angle_error_ = false
 
double angle_wrap_ = 2.0 * 3.14159
 
double c_ = 1.
 
double control_effort_ = 0
 
ros::Publisher control_effort_pub_
 
std_msgs::Float64 control_msg_
 
double cutoff_frequency_ = -1
 
ros::Duration delta_t_
 
double derivative_ = 0
 
std::vector< double > error_
 
std::vector< double > error_deriv_
 
double error_integral_ = 0
 
std::vector< double > filtered_error_
 
std::vector< double > filtered_error_deriv_
 
bool first_reconfig_ = true
 
double integral_ = 0
 
double Kd_ = 0
 
double Ki_ = 0
 
double Kp_ = 0
 
double lower_limit_ = -1000
 
double max_loop_frequency_ = 1000
 
int measurements_received_ = 0
 
double min_loop_frequency_ = 1
 
bool new_state_or_setpt_ = false
 
ros::Publisher pid_debug_pub_
 
std::string pid_debug_pub_name_
 
std::string pid_enable_topic_
 
bool pid_enabled_ = true
 
double plant_state_
 
ros::Time prev_time_
 
double proportional_ = 0
 
double setpoint_ = 0
 
std::string setpoint_topic_
 
std_msgs::Float64 state_msg_
 
double tan_filt_ = 1.
 
std::string topic_from_controller_
 
std::string topic_from_plant_
 
double upper_limit_ = 1000
 
double windup_limit_ = 1000
 

Detailed Description

Definition at line 41 of file controller.h.

Constructor & Destructor Documentation

PidObject::PidObject ( )

Definition at line 6 of file pid.cpp.

pid_ns::PidObject::PidObject ( )

Member Function Documentation

void PidObject::doCalcs ( )
private

Definition at line 174 of file pid.cpp.

void pid_ns::PidObject::doCalcs ( )
private
void PidObject::getParams ( double  in,
double &  value,
double &  scale 
)
private

Definition at line 101 of file pid.cpp.

void pid_ns::PidObject::getParams ( double  in,
double &  value,
double &  scale 
)
private
void PidObject::pidEnableCallback ( const std_msgs::Bool &  pid_enable_msg)
private

Definition at line 96 of file pid.cpp.

void pid_ns::PidObject::pidEnableCallback ( const std_msgs::Bool &  pid_enable_msg)
private
void PidObject::plantStateCallback ( const std_msgs::Float64 &  state_msg)
private

Definition at line 89 of file pid.cpp.

void pid_ns::PidObject::plantStateCallback ( const std_msgs::Float64 &  state_msg)
private
void PidObject::printParameters ( )
private

Definition at line 138 of file pid.cpp.

void pid_ns::PidObject::printParameters ( )
private
void PidObject::reconfigureCallback ( pid::PidConfig config,
uint32_t  level 
)
private

Definition at line 157 of file pid.cpp.

void pid_ns::PidObject::reconfigureCallback ( pid::PidConfig config,
uint32_t  level 
)
private
void PidObject::setpointCallback ( const std_msgs::Float64 &  setpoint_msg)
private

Definition at line 82 of file pid.cpp.

void pid_ns::PidObject::setpointCallback ( const std_msgs::Float64 &  setpoint_msg)
private
bool PidObject::validateParameters ( )
private

Definition at line 126 of file pid.cpp.

bool pid_ns::PidObject::validateParameters ( )
private

Member Data Documentation

bool pid_ns::PidObject::angle_error_ = false
private

Definition at line 76 of file controller.h.

double pid_ns::PidObject::angle_wrap_ = 2.0 * 3.14159
private

Definition at line 77 of file controller.h.

double pid_ns::PidObject::c_ = 1.
private

Definition at line 86 of file controller.h.

double pid_ns::PidObject::control_effort_ = 0
private

Definition at line 58 of file controller.h.

ros::Publisher pid_ns::PidObject::control_effort_pub_
private

Definition at line 101 of file controller.h.

std_msgs::Float64 pid_ns::PidObject::control_msg_
private

Definition at line 104 of file controller.h.

double pid_ns::PidObject::cutoff_frequency_ = -1
private

Definition at line 81 of file controller.h.

ros::Duration pid_ns::PidObject::delta_t_
private

Definition at line 64 of file controller.h.

double pid_ns::PidObject::derivative_ = 0
private

Definition at line 70 of file controller.h.

std::vector< double > pid_ns::PidObject::error_
private

Definition at line 98 of file controller.h.

std::vector< double > pid_ns::PidObject::error_deriv_
private

Definition at line 98 of file controller.h.

double pid_ns::PidObject::error_integral_ = 0
private

Definition at line 67 of file controller.h.

std::vector< double > pid_ns::PidObject::filtered_error_
private

Definition at line 98 of file controller.h.

std::vector< double > pid_ns::PidObject::filtered_error_deriv_
private

Definition at line 98 of file controller.h.

bool pid_ns::PidObject::first_reconfig_ = true
private

Definition at line 65 of file controller.h.

double pid_ns::PidObject::integral_ = 0
private

Definition at line 69 of file controller.h.

double pid_ns::PidObject::Kd_ = 0
private

Definition at line 73 of file controller.h.

double pid_ns::PidObject::Ki_ = 0
private

Definition at line 73 of file controller.h.

double pid_ns::PidObject::Kp_ = 0
private

Definition at line 73 of file controller.h.

double pid_ns::PidObject::lower_limit_ = -1000
private

Definition at line 92 of file controller.h.

double pid_ns::PidObject::max_loop_frequency_ = 1000
private

Definition at line 107 of file controller.h.

int pid_ns::PidObject::measurements_received_ = 0
private

Definition at line 108 of file controller.h.

double pid_ns::PidObject::min_loop_frequency_ = 1
private

Definition at line 107 of file controller.h.

bool pid_ns::PidObject::new_state_or_setpt_ = false
private

Definition at line 61 of file controller.h.

ros::Publisher pid_ns::PidObject::pid_debug_pub_
private

Definition at line 115 of file pid.h.

std::string pid_ns::PidObject::pid_debug_pub_name_
private

Definition at line 118 of file pid.h.

std::string pid_ns::PidObject::pid_enable_topic_
private

Definition at line 102 of file controller.h.

bool pid_ns::PidObject::pid_enabled_ = true
private

Definition at line 60 of file controller.h.

double pid_ns::PidObject::plant_state_
private

Definition at line 57 of file controller.h.

ros::Time pid_ns::PidObject::prev_time_
private

Definition at line 63 of file controller.h.

double pid_ns::PidObject::proportional_ = 0
private

Definition at line 68 of file controller.h.

double pid_ns::PidObject::setpoint_ = 0
private

Definition at line 59 of file controller.h.

std::string pid_ns::PidObject::setpoint_topic_
private

Definition at line 102 of file controller.h.

std_msgs::Float64 pid_ns::PidObject::state_msg_
private

Definition at line 104 of file controller.h.

double pid_ns::PidObject::tan_filt_ = 1.
private

Definition at line 89 of file controller.h.

std::string pid_ns::PidObject::topic_from_controller_
private

Definition at line 102 of file controller.h.

std::string pid_ns::PidObject::topic_from_plant_
private

Definition at line 102 of file controller.h.

double pid_ns::PidObject::upper_limit_ = 1000
private

Definition at line 92 of file controller.h.

double pid_ns::PidObject::windup_limit_ = 1000
private

Definition at line 95 of file controller.h.


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


pid
Author(s): Andy Zelenak , Paul Bouchier
autogenerated on Mon Apr 15 2019 02:41:32