Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
openrover::OpenRover Class Reference

#include <openrover.hpp>

Public Member Functions

bool openComs ()
 
 OpenRover (ros::NodeHandle &nh, ros::NodeHandle &nh_priv)
 
void robotDataFastCB (const ros::WallTimerEvent &e)
 
void robotDataMediumCB (const ros::WallTimerEvent &e)
 
void robotDataSlowCB (const ros::WallTimerEvent &e)
 
void serialManager ()
 
bool setupRobotParams ()
 
bool start ()
 
void timeoutCB (const ros::WallTimerEvent &e)
 
void updateMeasuredVelocities ()
 

Public Attributes

bool closed_loop_control_on_
 
bool e_stop_on_
 
OdomControl left_controller_
 
PidGains pidGains_
 
bool publish_fast_rate_values_
 
bool publish_med_rate_values_
 
bool publish_slow_rate_values_
 
OdomControl right_controller_
 

Private Member Functions

void cmdVelCB (const geometry_msgs::Twist::ConstPtr &msg)
 
void eStopCB (const std_msgs::Bool::ConstPtr &msg)
 
void eStopResetCB (const std_msgs::Bool::ConstPtr &msg)
 
void fanSpeedCB (const std_msgs::Int32::ConstPtr &msg)
 
int getParameterData (int parameter)
 
void publishFastRateData ()
 
void publishMedRateData ()
 
void publishMotorSpeeds ()
 
void publishOdometry (float left_vel, float right_vel)
 
void publishSlowRateData ()
 
void publishWheelVels ()
 
int readCommand ()
 
bool sendCommand (int param1, int param2)
 
bool setParameterData (int param1, int param2)
 
void updateRobotData (int parameter)
 

Private Attributes

ros::Publisher battery_state_of_charge_pub
 
ros::Publisher battery_state_pub
 
ros::Publisher battery_status_a_pub
 
ros::Publisher battery_status_b_pub
 
geometry_msgs::Twist cmd_vel_commanded_
 
ros::Subscriber cmd_vel_sub
 
std::string drive_type_
 
ros::Subscriber e_stop_reset_sub
 
ros::Subscriber e_stop_sub
 
ros::Subscriber fan_speed_sub
 
double fast_rate_hz_
 
ros::Publisher fast_rate_pub
 
ros::WallTimer fast_timer
 
const int FLIPPER_MOTOR_INDEX_
 
bool is_charging_
 
ros::Publisher is_charging_pub
 
bool is_serial_coms_open_
 
std::ofstream l_fs_
 
std::string l_pid_csv_file_
 
const int LEFT_MOTOR_INDEX_
 
double left_vel_commanded_
 
double left_vel_filtered_
 
double left_vel_measured_
 
double medium_rate_hz_
 
ros::Publisher medium_rate_pub
 
ros::WallTimer medium_timer
 
int motor_speed_angular_coef_
 
int motor_speed_deadband_
 
int motor_speed_flipper_coef_
 
int motor_speed_linear_coef_
 
int motor_speeds_commanded_ [3]
 
ros::Publisher motor_speeds_pub
 
ros::NodeHandlenh_
 
ros::NodeHandlenh_priv_
 
float odom_angular_coef_
 
float odom_axle_track_
 
float odom_covariance_0_
 
float odom_covariance_35_
 
ros::Publisher odom_enc_pub
 
float odom_encoder_coef_
 
float odom_traction_factor_
 
std::string port_
 
std::ofstream r_fs_
 
std::string r_pid_csv_file_
 
const int RIGHT_MOTOR_INDEX_
 
double right_vel_commanded_
 
double right_vel_filtered_
 
double right_vel_measured_
 
int robot_data_ [250]
 
int serial_baud_rate_
 
std::vector< unsigned char > serial_fan_buffer_
 
std::vector< unsigned char > serial_fast_buffer_
 
std::vector< unsigned char > serial_medium_buffer_
 
int serial_port_fd_
 
std::vector< unsigned char > serial_slow_buffer_
 
double slow_rate_hz_
 
ros::Publisher slow_rate_pub
 
ros::WallTimer slow_timer
 
float timeout_
 
ros::WallTimer timeout_timer
 
float total_weight_
 
bool use_legacy_
 
ros::Publisher vel_calc_pub
 

Detailed Description

Definition at line 24 of file openrover.hpp.

Constructor & Destructor Documentation

openrover::OpenRover::OpenRover ( ros::NodeHandle nh,
ros::NodeHandle nh_priv 
)

Definition at line 30 of file openrover_driver.cpp.

Member Function Documentation

void openrover::OpenRover::cmdVelCB ( const geometry_msgs::Twist::ConstPtr &  msg)
private

Definition at line 390 of file openrover_driver.cpp.

void openrover::OpenRover::eStopCB ( const std_msgs::Bool::ConstPtr &  msg)
private

Definition at line 437 of file openrover_driver.cpp.

void openrover::OpenRover::eStopResetCB ( const std_msgs::Bool::ConstPtr &  msg)
private

Definition at line 451 of file openrover_driver.cpp.

void openrover::OpenRover::fanSpeedCB ( const std_msgs::Int32::ConstPtr &  msg)
private

Definition at line 380 of file openrover_driver.cpp.

int openrover::OpenRover::getParameterData ( int  parameter)
private

Definition at line 975 of file openrover_driver.cpp.

bool openrover::OpenRover::openComs ( )

Definition at line 1001 of file openrover_driver.cpp.

void openrover::OpenRover::publishFastRateData ( )
private

Definition at line 551 of file openrover_driver.cpp.

void openrover::OpenRover::publishMedRateData ( )
private

Definition at line 568 of file openrover_driver.cpp.

void openrover::OpenRover::publishMotorSpeeds ( )
private

Definition at line 663 of file openrover_driver.cpp.

void openrover::OpenRover::publishOdometry ( float  left_vel,
float  right_vel 
)
private

Definition at line 460 of file openrover_driver.cpp.

void openrover::OpenRover::publishSlowRateData ( )
private

Definition at line 626 of file openrover_driver.cpp.

void openrover::OpenRover::publishWheelVels ( )
private

Definition at line 529 of file openrover_driver.cpp.

int openrover::OpenRover::readCommand ( )
private

Definition at line 907 of file openrover_driver.cpp.

void openrover::OpenRover::robotDataFastCB ( const ros::WallTimerEvent e)

Definition at line 350 of file openrover_driver.cpp.

void openrover::OpenRover::robotDataMediumCB ( const ros::WallTimerEvent e)

Definition at line 337 of file openrover_driver.cpp.

void openrover::OpenRover::robotDataSlowCB ( const ros::WallTimerEvent e)

Definition at line 324 of file openrover_driver.cpp.

bool openrover::OpenRover::sendCommand ( int  param1,
int  param2 
)
private

Definition at line 873 of file openrover_driver.cpp.

void openrover::OpenRover::serialManager ( )

Definition at line 675 of file openrover_driver.cpp.

bool openrover::OpenRover::setParameterData ( int  param1,
int  param2 
)
private

Definition at line 957 of file openrover_driver.cpp.

bool openrover::OpenRover::setupRobotParams ( )

Definition at line 128 of file openrover_driver.cpp.

bool openrover::OpenRover::start ( )

Definition at line 63 of file openrover_driver.cpp.

void openrover::OpenRover::timeoutCB ( const ros::WallTimerEvent e)

Definition at line 369 of file openrover_driver.cpp.

void openrover::OpenRover::updateMeasuredVelocities ( )

Definition at line 808 of file openrover_driver.cpp.

void openrover::OpenRover::updateRobotData ( int  parameter)
private

Definition at line 852 of file openrover_driver.cpp.

Member Data Documentation

ros::Publisher openrover::OpenRover::battery_state_of_charge_pub
private

Definition at line 86 of file openrover.hpp.

ros::Publisher openrover::OpenRover::battery_state_pub
private

Definition at line 77 of file openrover.hpp.

ros::Publisher openrover::OpenRover::battery_status_a_pub
private

Definition at line 85 of file openrover.hpp.

ros::Publisher openrover::OpenRover::battery_status_b_pub
private

Definition at line 85 of file openrover.hpp.

bool openrover::OpenRover::closed_loop_control_on_

Definition at line 49 of file openrover.hpp.

geometry_msgs::Twist openrover::OpenRover::cmd_vel_commanded_
private

Definition at line 131 of file openrover.hpp.

ros::Subscriber openrover::OpenRover::cmd_vel_sub
private

Definition at line 88 of file openrover.hpp.

std::string openrover::OpenRover::drive_type_
private

Definition at line 61 of file openrover.hpp.

bool openrover::OpenRover::e_stop_on_

Definition at line 50 of file openrover.hpp.

ros::Subscriber openrover::OpenRover::e_stop_reset_sub
private

Definition at line 91 of file openrover.hpp.

ros::Subscriber openrover::OpenRover::e_stop_sub
private

Definition at line 90 of file openrover.hpp.

ros::Subscriber openrover::OpenRover::fan_speed_sub
private

Definition at line 89 of file openrover.hpp.

double openrover::OpenRover::fast_rate_hz_
private

Definition at line 104 of file openrover.hpp.

ros::Publisher openrover::OpenRover::fast_rate_pub
private

Definition at line 82 of file openrover.hpp.

ros::WallTimer openrover::OpenRover::fast_timer
private

Definition at line 70 of file openrover.hpp.

const int openrover::OpenRover::FLIPPER_MOTOR_INDEX_
private

Definition at line 101 of file openrover.hpp.

bool openrover::OpenRover::is_charging_
private

Definition at line 97 of file openrover.hpp.

ros::Publisher openrover::OpenRover::is_charging_pub
private

Definition at line 78 of file openrover.hpp.

bool openrover::OpenRover::is_serial_coms_open_
private

Definition at line 102 of file openrover.hpp.

std::ofstream openrover::OpenRover::l_fs_
private

Definition at line 56 of file openrover.hpp.

std::string openrover::OpenRover::l_pid_csv_file_
private

Definition at line 54 of file openrover.hpp.

OdomControl openrover::OpenRover::left_controller_

Definition at line 29 of file openrover.hpp.

const int openrover::OpenRover::LEFT_MOTOR_INDEX_
private

Definition at line 99 of file openrover.hpp.

double openrover::OpenRover::left_vel_commanded_
private

Definition at line 117 of file openrover.hpp.

double openrover::OpenRover::left_vel_filtered_
private

Definition at line 121 of file openrover.hpp.

double openrover::OpenRover::left_vel_measured_
private

Definition at line 119 of file openrover.hpp.

double openrover::OpenRover::medium_rate_hz_
private

Definition at line 105 of file openrover.hpp.

ros::Publisher openrover::OpenRover::medium_rate_pub
private

Definition at line 83 of file openrover.hpp.

ros::WallTimer openrover::OpenRover::medium_timer
private

Definition at line 71 of file openrover.hpp.

int openrover::OpenRover::motor_speed_angular_coef_
private

Definition at line 125 of file openrover.hpp.

int openrover::OpenRover::motor_speed_deadband_
private

Definition at line 127 of file openrover.hpp.

int openrover::OpenRover::motor_speed_flipper_coef_
private

Definition at line 126 of file openrover.hpp.

int openrover::OpenRover::motor_speed_linear_coef_
private

Definition at line 124 of file openrover.hpp.

int openrover::OpenRover::motor_speeds_commanded_[3]
private

Definition at line 98 of file openrover.hpp.

ros::Publisher openrover::OpenRover::motor_speeds_pub
private

Definition at line 79 of file openrover.hpp.

ros::NodeHandle& openrover::OpenRover::nh_
private

Definition at line 66 of file openrover.hpp.

ros::NodeHandle& openrover::OpenRover::nh_priv_
private

Definition at line 67 of file openrover.hpp.

float openrover::OpenRover::odom_angular_coef_
private

Definition at line 111 of file openrover.hpp.

float openrover::OpenRover::odom_axle_track_
private

Definition at line 110 of file openrover.hpp.

float openrover::OpenRover::odom_covariance_0_
private

Definition at line 113 of file openrover.hpp.

float openrover::OpenRover::odom_covariance_35_
private

Definition at line 114 of file openrover.hpp.

ros::Publisher openrover::OpenRover::odom_enc_pub
private

Definition at line 76 of file openrover.hpp.

float openrover::OpenRover::odom_encoder_coef_
private

Definition at line 109 of file openrover.hpp.

float openrover::OpenRover::odom_traction_factor_
private

Definition at line 112 of file openrover.hpp.

PidGains openrover::OpenRover::pidGains_

Definition at line 32 of file openrover.hpp.

std::string openrover::OpenRover::port_
private

Definition at line 60 of file openrover.hpp.

bool openrover::OpenRover::publish_fast_rate_values_

Definition at line 46 of file openrover.hpp.

bool openrover::OpenRover::publish_med_rate_values_

Definition at line 47 of file openrover.hpp.

bool openrover::OpenRover::publish_slow_rate_values_

Definition at line 48 of file openrover.hpp.

std::ofstream openrover::OpenRover::r_fs_
private

Definition at line 57 of file openrover.hpp.

std::string openrover::OpenRover::r_pid_csv_file_
private

Definition at line 55 of file openrover.hpp.

OdomControl openrover::OpenRover::right_controller_

Definition at line 30 of file openrover.hpp.

const int openrover::OpenRover::RIGHT_MOTOR_INDEX_
private

Definition at line 100 of file openrover.hpp.

double openrover::OpenRover::right_vel_commanded_
private

Definition at line 118 of file openrover.hpp.

double openrover::OpenRover::right_vel_filtered_
private

Definition at line 122 of file openrover.hpp.

double openrover::OpenRover::right_vel_measured_
private

Definition at line 120 of file openrover.hpp.

int openrover::OpenRover::robot_data_[250]
private

Definition at line 96 of file openrover.hpp.

int openrover::OpenRover::serial_baud_rate_
private

Definition at line 94 of file openrover.hpp.

std::vector<unsigned char> openrover::OpenRover::serial_fan_buffer_
private

Definition at line 136 of file openrover.hpp.

std::vector<unsigned char> openrover::OpenRover::serial_fast_buffer_
private

Definition at line 133 of file openrover.hpp.

std::vector<unsigned char> openrover::OpenRover::serial_medium_buffer_
private

Definition at line 134 of file openrover.hpp.

int openrover::OpenRover::serial_port_fd_
private

Definition at line 95 of file openrover.hpp.

std::vector<unsigned char> openrover::OpenRover::serial_slow_buffer_
private

Definition at line 135 of file openrover.hpp.

double openrover::OpenRover::slow_rate_hz_
private

Definition at line 106 of file openrover.hpp.

ros::Publisher openrover::OpenRover::slow_rate_pub
private

Definition at line 84 of file openrover.hpp.

ros::WallTimer openrover::OpenRover::slow_timer
private

Definition at line 72 of file openrover.hpp.

float openrover::OpenRover::timeout_
private

Definition at line 63 of file openrover.hpp.

ros::WallTimer openrover::OpenRover::timeout_timer
private

Definition at line 73 of file openrover.hpp.

float openrover::OpenRover::total_weight_
private

Definition at line 129 of file openrover.hpp.

bool openrover::OpenRover::use_legacy_
private

Definition at line 103 of file openrover.hpp.

ros::Publisher openrover::OpenRover::vel_calc_pub
private

Definition at line 80 of file openrover.hpp.


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


rr_openrover_driver
Author(s): Jack Kilian
autogenerated on Thu Sep 10 2020 03:38:39