Functions | Variables
pacmod_node.cpp File Reference
#include <pacmod/pacmod_ros_msg_handler.h>
#include <unistd.h>
#include <time.h>
#include <algorithm>
#include <mutex>
#include <string>
#include <thread>
#include <unordered_map>
#include <vector>
#include <memory>
#include <utility>
#include <std_msgs/Int16.h>
#include <std_msgs/Bool.h>
#include <std_msgs/Float64.h>
#include <can_msgs/Frame.h>
Include dependency graph for pacmod_node.cpp:

Go to the source code of this file.

Functions

void callback_accelerator_set_cmd (const pacmod_msgs::PacmodCmd::ConstPtr &msg)
 
void callback_brake_set_cmd (const pacmod_msgs::PacmodCmd::ConstPtr &msg)
 
void callback_headlight_set_cmd (const pacmod_msgs::PacmodCmd::ConstPtr &msg)
 
void callback_horn_set_cmd (const pacmod_msgs::PacmodCmd::ConstPtr &msg)
 
void callback_pacmod_enable (const std_msgs::Bool::ConstPtr &msg)
 
void callback_shift_set_cmd (const pacmod_msgs::PacmodCmd::ConstPtr &msg)
 
void callback_steering_set_cmd (const pacmod_msgs::PositionWithSpeed::ConstPtr &msg)
 
void callback_turn_signal_set_cmd (const pacmod_msgs::PacmodCmd::ConstPtr &msg)
 
void callback_wiper_set_cmd (const pacmod_msgs::PacmodCmd::ConstPtr &msg)
 
void can_read (const can_msgs::Frame::ConstPtr &msg)
 
void can_write ()
 
int main (int argc, char *argv[])
 
void send_can (int32_t id, const std::vector< unsigned char > &vec)
 
void set_enable (bool val)
 

Variables

ros::Publisher accel_rpt_pub
 
ros::Publisher brake_rpt_detail_1_pub
 
ros::Publisher brake_rpt_detail_2_pub
 
ros::Publisher brake_rpt_detail_3_pub
 
ros::Publisher brake_rpt_pub
 
std::chrono::milliseconds can_error_pause = std::chrono::milliseconds(1000)
 
ros::Publisher can_rx_pub
 
ros::Publisher date_time_rpt_pub
 
std::mutex enable_mut
 
ros::Publisher enable_pub
 
bool enable_state = false
 
bool global_keep_going = true
 
ros::Publisher global_rpt_pub
 
PacmodTxRosMsgHandler handler
 
ros::Publisher headlight_rpt_pub
 
std::shared_ptr< ros::Subscriberheadlight_set_cmd_sub
 
ros::Publisher horn_rpt_pub
 
std::shared_ptr< ros::Subscriberhorn_set_cmd_sub
 
std::mutex keep_going_mut
 
double last_global_rpt_msg_received = 0.0
 
ros::Publisher lat_lon_heading_rpt_pub
 
std::mutex override_mut
 
bool override_state = false
 
ros::Publisher parking_brake_status_rpt_pub
 
std::unordered_map< int64_t, ros::Publisherpub_tx_list
 
std::unordered_map< int64_t, int64_t > rpt_cmd_list
 
std::unordered_map< int64_t, std::shared_ptr< LockedData > > rx_list
 
ros::Publisher shift_rpt_pub
 
ros::Publisher steer_rpt_2_pub
 
ros::Publisher steer_rpt_3_pub
 
ros::Publisher steer_rpt_pub
 
ros::Publisher steering_pid_rpt_1_pub
 
ros::Publisher steering_pid_rpt_2_pub
 
ros::Publisher steering_pid_rpt_3_pub
 
ros::Publisher steering_pid_rpt_4_pub
 
ros::Publisher steering_rpt_detail_1_pub
 
ros::Publisher steering_rpt_detail_2_pub
 
ros::Publisher steering_rpt_detail_3_pub
 
ros::Publisher turn_rpt_pub
 
VehicleType veh_type = VehicleType::POLARIS_GEM
 
std::string veh_type_string = "POLARIS_GEM"
 
ros::Publisher vehicle_speed_ms_pub
 
ros::Publisher vehicle_speed_pub
 
ros::Publisher vin_rpt_pub
 
const double watchdog_timeout = 0.3
 
ros::Publisher wheel_speed_rpt_pub
 
ros::Publisher wiper_rpt_pub
 
std::shared_ptr< ros::Subscriberwiper_set_cmd_sub
 
ros::Publisher yaw_rate_rpt_pub
 

Function Documentation

◆ callback_accelerator_set_cmd()

void callback_accelerator_set_cmd ( const pacmod_msgs::PacmodCmd::ConstPtr &  msg)

Definition at line 203 of file pacmod_node.cpp.

◆ callback_brake_set_cmd()

void callback_brake_set_cmd ( const pacmod_msgs::PacmodCmd::ConstPtr &  msg)

Definition at line 237 of file pacmod_node.cpp.

◆ callback_headlight_set_cmd()

void callback_headlight_set_cmd ( const pacmod_msgs::PacmodCmd::ConstPtr &  msg)

Definition at line 135 of file pacmod_node.cpp.

◆ callback_horn_set_cmd()

void callback_horn_set_cmd ( const pacmod_msgs::PacmodCmd::ConstPtr &  msg)

Definition at line 152 of file pacmod_node.cpp.

◆ callback_pacmod_enable()

void callback_pacmod_enable ( const std_msgs::Bool::ConstPtr &  msg)

Definition at line 112 of file pacmod_node.cpp.

◆ callback_shift_set_cmd()

void callback_shift_set_cmd ( const pacmod_msgs::PacmodCmd::ConstPtr &  msg)

Definition at line 186 of file pacmod_node.cpp.

◆ callback_steering_set_cmd()

void callback_steering_set_cmd ( const pacmod_msgs::PositionWithSpeed::ConstPtr &  msg)

Definition at line 220 of file pacmod_node.cpp.

◆ callback_turn_signal_set_cmd()

void callback_turn_signal_set_cmd ( const pacmod_msgs::PacmodCmd::ConstPtr &  msg)

Definition at line 118 of file pacmod_node.cpp.

◆ callback_wiper_set_cmd()

void callback_wiper_set_cmd ( const pacmod_msgs::PacmodCmd::ConstPtr &  msg)

Definition at line 169 of file pacmod_node.cpp.

◆ can_read()

void can_read ( const can_msgs::Frame::ConstPtr &  msg)

Definition at line 337 of file pacmod_node.cpp.

◆ can_write()

void can_write ( )

Definition at line 268 of file pacmod_node.cpp.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 457 of file pacmod_node.cpp.

◆ send_can()

void send_can ( int32_t  id,
const std::vector< unsigned char > &  vec 
)

Definition at line 253 of file pacmod_node.cpp.

◆ set_enable()

void set_enable ( bool  val)

Definition at line 105 of file pacmod_node.cpp.

Variable Documentation

◆ accel_rpt_pub

ros::Publisher accel_rpt_pub

Definition at line 80 of file pacmod_node.cpp.

◆ brake_rpt_detail_1_pub

ros::Publisher brake_rpt_detail_1_pub

Definition at line 66 of file pacmod_node.cpp.

◆ brake_rpt_detail_2_pub

ros::Publisher brake_rpt_detail_2_pub

Definition at line 67 of file pacmod_node.cpp.

◆ brake_rpt_detail_3_pub

ros::Publisher brake_rpt_detail_3_pub

Definition at line 68 of file pacmod_node.cpp.

◆ brake_rpt_pub

ros::Publisher brake_rpt_pub

Definition at line 82 of file pacmod_node.cpp.

◆ can_error_pause

std::chrono::milliseconds can_error_pause = std::chrono::milliseconds(1000)

Definition at line 102 of file pacmod_node.cpp.

◆ can_rx_pub

ros::Publisher can_rx_pub

Definition at line 86 of file pacmod_node.cpp.

◆ date_time_rpt_pub

ros::Publisher date_time_rpt_pub

Definition at line 60 of file pacmod_node.cpp.

◆ enable_mut

std::mutex enable_mut

Definition at line 92 of file pacmod_node.cpp.

◆ enable_pub

ros::Publisher enable_pub

Definition at line 85 of file pacmod_node.cpp.

◆ enable_state

bool enable_state = false

Definition at line 91 of file pacmod_node.cpp.

◆ global_keep_going

bool global_keep_going = true

Definition at line 95 of file pacmod_node.cpp.

◆ global_rpt_pub

ros::Publisher global_rpt_pub

Definition at line 76 of file pacmod_node.cpp.

◆ handler

Definition at line 46 of file pacmod_node.cpp.

◆ headlight_rpt_pub

ros::Publisher headlight_rpt_pub

Definition at line 50 of file pacmod_node.cpp.

◆ headlight_set_cmd_sub

std::shared_ptr<ros::Subscriber> headlight_set_cmd_sub

Definition at line 71 of file pacmod_node.cpp.

◆ horn_rpt_pub

ros::Publisher horn_rpt_pub

Definition at line 51 of file pacmod_node.cpp.

◆ horn_set_cmd_sub

std::shared_ptr<ros::Subscriber> horn_set_cmd_sub

Definition at line 71 of file pacmod_node.cpp.

◆ keep_going_mut

std::mutex keep_going_mut

Definition at line 96 of file pacmod_node.cpp.

◆ last_global_rpt_msg_received

double last_global_rpt_msg_received = 0.0

Definition at line 41 of file pacmod_node.cpp.

◆ lat_lon_heading_rpt_pub

ros::Publisher lat_lon_heading_rpt_pub

Definition at line 59 of file pacmod_node.cpp.

◆ override_mut

std::mutex override_mut

Definition at line 94 of file pacmod_node.cpp.

◆ override_state

bool override_state = false

Definition at line 93 of file pacmod_node.cpp.

◆ parking_brake_status_rpt_pub

ros::Publisher parking_brake_status_rpt_pub

Definition at line 61 of file pacmod_node.cpp.

◆ pub_tx_list

std::unordered_map<int64_t, ros::Publisher> pub_tx_list

Definition at line 45 of file pacmod_node.cpp.

◆ rpt_cmd_list

std::unordered_map<int64_t, int64_t> rpt_cmd_list

Definition at line 89 of file pacmod_node.cpp.

◆ rx_list

std::unordered_map<int64_t, std::shared_ptr<LockedData> > rx_list

Definition at line 88 of file pacmod_node.cpp.

◆ shift_rpt_pub

ros::Publisher shift_rpt_pub

Definition at line 79 of file pacmod_node.cpp.

◆ steer_rpt_2_pub

ros::Publisher steer_rpt_2_pub

Definition at line 52 of file pacmod_node.cpp.

◆ steer_rpt_3_pub

ros::Publisher steer_rpt_3_pub

Definition at line 53 of file pacmod_node.cpp.

◆ steer_rpt_pub

ros::Publisher steer_rpt_pub

Definition at line 81 of file pacmod_node.cpp.

◆ steering_pid_rpt_1_pub

ros::Publisher steering_pid_rpt_1_pub

Definition at line 55 of file pacmod_node.cpp.

◆ steering_pid_rpt_2_pub

ros::Publisher steering_pid_rpt_2_pub

Definition at line 56 of file pacmod_node.cpp.

◆ steering_pid_rpt_3_pub

ros::Publisher steering_pid_rpt_3_pub

Definition at line 57 of file pacmod_node.cpp.

◆ steering_pid_rpt_4_pub

ros::Publisher steering_pid_rpt_4_pub

Definition at line 58 of file pacmod_node.cpp.

◆ steering_rpt_detail_1_pub

ros::Publisher steering_rpt_detail_1_pub

Definition at line 63 of file pacmod_node.cpp.

◆ steering_rpt_detail_2_pub

ros::Publisher steering_rpt_detail_2_pub

Definition at line 64 of file pacmod_node.cpp.

◆ steering_rpt_detail_3_pub

ros::Publisher steering_rpt_detail_3_pub

Definition at line 65 of file pacmod_node.cpp.

◆ turn_rpt_pub

ros::Publisher turn_rpt_pub

Definition at line 78 of file pacmod_node.cpp.

◆ veh_type

VehicleType veh_type = VehicleType::POLARIS_GEM

Definition at line 44 of file pacmod_node.cpp.

◆ veh_type_string

std::string veh_type_string = "POLARIS_GEM"

Definition at line 43 of file pacmod_node.cpp.

◆ vehicle_speed_ms_pub

ros::Publisher vehicle_speed_ms_pub

Definition at line 84 of file pacmod_node.cpp.

◆ vehicle_speed_pub

ros::Publisher vehicle_speed_pub

Definition at line 83 of file pacmod_node.cpp.

◆ vin_rpt_pub

ros::Publisher vin_rpt_pub

Definition at line 77 of file pacmod_node.cpp.

◆ watchdog_timeout

const double watchdog_timeout = 0.3

Definition at line 42 of file pacmod_node.cpp.

◆ wheel_speed_rpt_pub

ros::Publisher wheel_speed_rpt_pub

Definition at line 54 of file pacmod_node.cpp.

◆ wiper_rpt_pub

ros::Publisher wiper_rpt_pub

Definition at line 49 of file pacmod_node.cpp.

◆ wiper_set_cmd_sub

std::shared_ptr<ros::Subscriber> wiper_set_cmd_sub

Definition at line 71 of file pacmod_node.cpp.

◆ yaw_rate_rpt_pub

ros::Publisher yaw_rate_rpt_pub

Definition at line 62 of file pacmod_node.cpp.



pacmod
Author(s): Joe Driscoll , Josh Whitley
autogenerated on Mon Feb 28 2022 23:03:08