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::TwistStamped::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_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 fan_speed_sub
 
double fast_rate_hz_
 
ros::Publisher fast_rate_pub
 
ros::WallTimer fast_timer
 
const int FLIPPER_MOTOR_INDEX_
 
std::ofstream fs_
 
bool is_charging_
 
ros::Publisher is_charging_pub
 
bool is_serial_coms_open_
 
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_
 
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_
 
ros::Publisher vel_calc_pub
 

Detailed Description

Definition at line 23 of file openrover.hpp.

Constructor & Destructor Documentation

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

Definition at line 30 of file openrover_basic.cpp.

Member Function Documentation

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

Definition at line 302 of file openrover_basic.cpp.

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

Definition at line 292 of file openrover_basic.cpp.

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

Definition at line 835 of file openrover_basic.cpp.

bool openrover::OpenRover::openComs ( )

Definition at line 861 of file openrover_basic.cpp.

void openrover::OpenRover::publishFastRateData ( )
private

Definition at line 437 of file openrover_basic.cpp.

void openrover::OpenRover::publishMedRateData ( )
private

Definition at line 452 of file openrover_basic.cpp.

void openrover::OpenRover::publishMotorSpeeds ( )
private

Definition at line 539 of file openrover_basic.cpp.

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

Definition at line 346 of file openrover_basic.cpp.

void openrover::OpenRover::publishSlowRateData ( )
private

Definition at line 508 of file openrover_basic.cpp.

void openrover::OpenRover::publishWheelVels ( )
private

Definition at line 415 of file openrover_basic.cpp.

int openrover::OpenRover::readCommand ( )
private

Definition at line 767 of file openrover_basic.cpp.

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

Definition at line 265 of file openrover_basic.cpp.

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

Definition at line 252 of file openrover_basic.cpp.

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

Definition at line 239 of file openrover_basic.cpp.

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

Definition at line 733 of file openrover_basic.cpp.

void openrover::OpenRover::serialManager ( )

Definition at line 551 of file openrover_basic.cpp.

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

Definition at line 817 of file openrover_basic.cpp.

bool openrover::OpenRover::setupRobotParams ( )

Definition at line 105 of file openrover_basic.cpp.

bool openrover::OpenRover::start ( )

Definition at line 64 of file openrover_basic.cpp.

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

Definition at line 284 of file openrover_basic.cpp.

void openrover::OpenRover::updateMeasuredVelocities ( )

Definition at line 668 of file openrover_basic.cpp.

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

Definition at line 712 of file openrover_basic.cpp.

Member Data Documentation

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

Definition at line 73 of file openrover.hpp.

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

Definition at line 81 of file openrover.hpp.

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

Definition at line 81 of file openrover.hpp.

bool openrover::OpenRover::closed_loop_control_on_

Definition at line 48 of file openrover.hpp.

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

Definition at line 123 of file openrover.hpp.

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

Definition at line 83 of file openrover.hpp.

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

Definition at line 57 of file openrover.hpp.

bool openrover::OpenRover::e_stop_on_

Definition at line 49 of file openrover.hpp.

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

Definition at line 84 of file openrover.hpp.

double openrover::OpenRover::fast_rate_hz_
private

Definition at line 96 of file openrover.hpp.

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

Definition at line 78 of file openrover.hpp.

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

Definition at line 66 of file openrover.hpp.

const int openrover::OpenRover::FLIPPER_MOTOR_INDEX_
private

Definition at line 94 of file openrover.hpp.

std::ofstream openrover::OpenRover::fs_
private

Definition at line 53 of file openrover.hpp.

bool openrover::OpenRover::is_charging_
private

Definition at line 90 of file openrover.hpp.

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

Definition at line 74 of file openrover.hpp.

bool openrover::OpenRover::is_serial_coms_open_
private

Definition at line 95 of file openrover.hpp.

OdomControl openrover::OpenRover::left_controller_

Definition at line 28 of file openrover.hpp.

const int openrover::OpenRover::LEFT_MOTOR_INDEX_
private

Definition at line 92 of file openrover.hpp.

double openrover::OpenRover::left_vel_commanded_
private

Definition at line 109 of file openrover.hpp.

double openrover::OpenRover::left_vel_filtered_
private

Definition at line 113 of file openrover.hpp.

double openrover::OpenRover::left_vel_measured_
private

Definition at line 111 of file openrover.hpp.

double openrover::OpenRover::medium_rate_hz_
private

Definition at line 97 of file openrover.hpp.

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

Definition at line 79 of file openrover.hpp.

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

Definition at line 67 of file openrover.hpp.

int openrover::OpenRover::motor_speed_angular_coef_
private

Definition at line 117 of file openrover.hpp.

int openrover::OpenRover::motor_speed_deadband_
private

Definition at line 119 of file openrover.hpp.

int openrover::OpenRover::motor_speed_flipper_coef_
private

Definition at line 118 of file openrover.hpp.

int openrover::OpenRover::motor_speed_linear_coef_
private

Definition at line 116 of file openrover.hpp.

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

Definition at line 91 of file openrover.hpp.

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

Definition at line 75 of file openrover.hpp.

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

Definition at line 62 of file openrover.hpp.

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

Definition at line 63 of file openrover.hpp.

float openrover::OpenRover::odom_angular_coef_
private

Definition at line 103 of file openrover.hpp.

float openrover::OpenRover::odom_axle_track_
private

Definition at line 102 of file openrover.hpp.

float openrover::OpenRover::odom_covariance_0_
private

Definition at line 105 of file openrover.hpp.

float openrover::OpenRover::odom_covariance_35_
private

Definition at line 106 of file openrover.hpp.

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

Definition at line 72 of file openrover.hpp.

float openrover::OpenRover::odom_encoder_coef_
private

Definition at line 101 of file openrover.hpp.

float openrover::OpenRover::odom_traction_factor_
private

Definition at line 104 of file openrover.hpp.

PidGains openrover::OpenRover::pidGains_

Definition at line 31 of file openrover.hpp.

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

Definition at line 56 of file openrover.hpp.

bool openrover::OpenRover::publish_fast_rate_values_

Definition at line 45 of file openrover.hpp.

bool openrover::OpenRover::publish_med_rate_values_

Definition at line 46 of file openrover.hpp.

bool openrover::OpenRover::publish_slow_rate_values_

Definition at line 47 of file openrover.hpp.

OdomControl openrover::OpenRover::right_controller_

Definition at line 29 of file openrover.hpp.

const int openrover::OpenRover::RIGHT_MOTOR_INDEX_
private

Definition at line 93 of file openrover.hpp.

double openrover::OpenRover::right_vel_commanded_
private

Definition at line 110 of file openrover.hpp.

double openrover::OpenRover::right_vel_filtered_
private

Definition at line 114 of file openrover.hpp.

double openrover::OpenRover::right_vel_measured_
private

Definition at line 112 of file openrover.hpp.

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

Definition at line 89 of file openrover.hpp.

int openrover::OpenRover::serial_baud_rate_
private

Definition at line 87 of file openrover.hpp.

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

Definition at line 128 of file openrover.hpp.

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

Definition at line 125 of file openrover.hpp.

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

Definition at line 126 of file openrover.hpp.

int openrover::OpenRover::serial_port_fd_
private

Definition at line 88 of file openrover.hpp.

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

Definition at line 127 of file openrover.hpp.

double openrover::OpenRover::slow_rate_hz_
private

Definition at line 98 of file openrover.hpp.

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

Definition at line 80 of file openrover.hpp.

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

Definition at line 68 of file openrover.hpp.

float openrover::OpenRover::timeout_
private

Definition at line 59 of file openrover.hpp.

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

Definition at line 69 of file openrover.hpp.

float openrover::OpenRover::total_weight_
private

Definition at line 121 of file openrover.hpp.

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

Definition at line 76 of file openrover.hpp.


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


rr_openrover_basic
Author(s): Jack Kilian
autogenerated on Fri Jan 17 2020 03:18:17