EtherCAT Control Framework v0.9
Implementation of EtherCAT protocol using IgH EtherCAT library for robot controller.
Controller Struct Reference

Opens, reads from and publishes joystick events. More...

#include <ecat_definitions.hpp>

Public Member Functions

 Controller ()
 
int main (int argc, char **argv)
 Opens joystick port, reads from port and publishes while node is active. More...
 

Public Attributes

float left_x_axis_
 
float left_y_axis_
 
float right_x_axis_
 
float right_y_axis_
 
float left_t_axis_
 
float right_t_axis_
 
uint8_t blue_button_
 
uint8_t green_button_
 
uint8_t red_button_
 
uint8_t yellow_button_
 
uint8_t left_r_button_
 
uint8_t left_l_button_
 
uint8_t left_u_button_
 
uint8_t left_d_button_
 
uint8_t left_rb_button_
 
uint8_t right_rb_button_
 
uint8_t left_start_button_
 
uint8_t right_start_button_
 
uint8_t xbox_button_
 

Private Member Functions

std::string get_dev_by_joy_name (const std::string &joy_name, rclcpp::Logger logger)
 Returns the device path of the first joystick that matches joy_name. If no match is found, an empty string is returned. More...
 

Private Attributes

bool open_
 
bool sticky_buttons_
 
bool default_trig_val_
 
std::string joy_dev_
 
std::string joy_dev_name_
 
double deadzone_
 
double autorepeat_rate_
 
double coalesce_interval_
 
int event_count_
 
int pub_count_
 
rclcpp::Publisher< sensor_msgs::msg::Joy >::SharedPtr pub_
 
double lastDiagTime_
 

Detailed Description

Opens, reads from and publishes joystick events.

Constructor & Destructor Documentation

◆ Controller()

Controller::Controller ( )
inline

Member Function Documentation

◆ get_dev_by_joy_name()

std::string Controller::get_dev_by_joy_name ( const std::string &  joy_name,
rclcpp::Logger  logger 
)
inlineprivate

Returns the device path of the first joystick that matches joy_name. If no match is found, an empty string is returned.

◆ main()

int Controller::main ( int  argc,
char **  argv 
)
inline

Opens joystick port, reads from port and publishes while node is active.

Member Data Documentation

◆ autorepeat_rate_

double Controller::autorepeat_rate_
private

◆ blue_button_

uint8_t Controller::blue_button_

◆ coalesce_interval_

double Controller::coalesce_interval_
private

◆ deadzone_

double Controller::deadzone_
private

◆ default_trig_val_

bool Controller::default_trig_val_
private

◆ event_count_

int Controller::event_count_
private

◆ green_button_

uint8_t Controller::green_button_

◆ joy_dev_

std::string Controller::joy_dev_
private

◆ joy_dev_name_

std::string Controller::joy_dev_name_
private

◆ lastDiagTime_

double Controller::lastDiagTime_
private

◆ left_d_button_

uint8_t Controller::left_d_button_

◆ left_l_button_

uint8_t Controller::left_l_button_

◆ left_r_button_

uint8_t Controller::left_r_button_

◆ left_rb_button_

uint8_t Controller::left_rb_button_

◆ left_start_button_

uint8_t Controller::left_start_button_

◆ left_t_axis_

float Controller::left_t_axis_

◆ left_u_button_

uint8_t Controller::left_u_button_

◆ left_x_axis_

float Controller::left_x_axis_

◆ left_y_axis_

float Controller::left_y_axis_

◆ open_

bool Controller::open_
private

◆ pub_

rclcpp::Publisher<sensor_msgs::msg::Joy>::SharedPtr Controller::pub_
private

◆ pub_count_

int Controller::pub_count_
private

◆ red_button_

uint8_t Controller::red_button_

◆ right_rb_button_

uint8_t Controller::right_rb_button_

◆ right_start_button_

uint8_t Controller::right_start_button_

◆ right_t_axis_

float Controller::right_t_axis_

◆ right_x_axis_

float Controller::right_x_axis_

◆ right_y_axis_

float Controller::right_y_axis_

◆ sticky_buttons_

bool Controller::sticky_buttons_
private

◆ xbox_button_

uint8_t Controller::xbox_button_

◆ yellow_button_

uint8_t Controller::yellow_button_

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