Go to the documentation of this file.
14 p_tmc_coe_interpreter_ (p_tmc_coe_interpreter),
15 slave_number_ (slave_number),
16 motor_number_ (motor_number)
58 ROS_WARN_STREAM(
"[" << __func__ <<
"] Failed to get pub_rate_tmc_coe_info_ for slave" <<
65 if(param_pub_rate_tmc_coe_info_ < DEFAULT_RATE || param_pub_rate_tmc_coe_info_ >
MAX_RATE)
68 ROS_WARN_STREAM(
"[" << __func__ <<
"] Set value to pub_rate_tmc_coe_info_ for slave" <<
81 ROS_WARN_STREAM(
"[" << __func__ <<
"] Failed to get en_pub_tmc_coe_info for slave" <<
93 " motor" <<
static_cast<int>(
motor_number_) <<
", setting to default value: " << std::boolalpha <<
104 " motor" <<
static_cast<int>(
motor_number_) <<
", setting to default value: " << std::boolalpha <<
115 " motor" <<
static_cast<int>(
motor_number_) <<
", setting to default value: " << std::boolalpha <<
126 " motor" <<
static_cast<int>(
motor_number_) <<
", setting to default value: " <<
137 <<
" motor" <<
static_cast<int>(
motor_number_) <<
", setting to default value: " <<
147 ROS_WARN_STREAM(
"[" << __func__ <<
"] Failed to get tmc_cmd_abspos_topic for slave" <<
158 ROS_WARN_STREAM(
"[" << __func__ <<
"] Failed to get tmc_cmd_relpos_topic for slave" <<
170 <<
" motor" <<
static_cast<int>(
motor_number_) <<
", setting to default value: " <<
181 " motor" <<
static_cast<int>(
motor_number_) <<
", setting to default value: " <<
192 <<
" motor" <<
static_cast<int>(
motor_number_) <<
" is out of range, setting to default value: "
203 ROS_WARN_STREAM(
"[" << __func__ <<
"] Failed to get additional_ratio_vel for slave" <<
213 ROS_WARN_STREAM(
"[" << __func__ <<
"] Failed to get additional_ratio_pos for slave" <<
224 ROS_WARN_STREAM(
"[" << __func__ <<
"] Failed to get additional_ratio_trq for slave" <<
230 const std::string s_interface_name =
s_node_name_ +
"/interface_name";
232 const std::string s_SDO_PDO_retries =
s_node_name_ +
"/SDO_PDO_retries";
266 ROS_INFO_STREAM(
"[" << __func__ <<
"] Publisher TimerCallback is created successfully!");
270 ROS_ERROR_STREAM(
"[" << __func__ <<
"] Publisher TimerCallback not created!");
278 std::string mode_of_operation =
"";
294 case NONE: mode_of_operation =
"None";
break;
297 case HOMING_MODE: mode_of_operation =
"Homing Mode";
break;
298 case CYCLIC_SYNC_POS: mode_of_operation =
"Cyclic Synchronous Position Mode";
break;
299 case CYCLIC_SYNC_VEL: mode_of_operation =
"Cyclic Synchronous Velocity Mode";
break;
300 case CYCLIC_SYNC_TRQ: mode_of_operation =
"Cyclic Synchronous Torque Mode";
break;
301 default : mode_of_operation =
"NONE";
break;
341 float val = msg.linear.x;
347 ROS_DEBUG_STREAM(
"[" << __func__ <<
"] Subscriber callback entered, received: " << msg.linear.x <<
" board value: "
368 ROS_DEBUG_STREAM(
"["<< __func__ <<
"] Subscriber callback exited successfully");
389 ROS_DEBUG_STREAM(
"[" << __func__ <<
"] Subscriber callback entered, received: " << msg.data <<
" board value: "
428 ROS_DEBUG_STREAM(
"["<< __func__ <<
"] Subscriber callback exited successfully");
442 ROS_DEBUG_STREAM(
"[" << __func__ <<
"] Subscriber callback entered, received: " << msg.data <<
" board value: "
481 ROS_DEBUG_STREAM(
"["<< __func__ <<
"] Subscriber callback exited successfully");
@ SET_POINT_ACK_IN_PROCESS
void setParam(const std::string &key, bool b) const
const ROSCPP_DECL std::string & getNamespace()
adi_tmc_coe::TmcCoeInfo tmc_coe_info_msg_
std::vector< input_pdo_t * > input_pdo_
#define ROS_ERROR_STREAM(args)
std::string param_interface_name_
bool getParam(const std::string &key, bool &b) const
float param_pub_rate_tmc_coe_info_
float param_wheel_diameter_
float param_add_ratio_pos_
ros::Subscriber tmc_cmd_relpos_sub_
virtual void cmdAbsPosCallback(const std_msgs::Int32 msg)
TmcCoeMotor(ros::NodeHandle *p_nh, TmcCoeInterpreter *p_tmc_coe_interpreter, uint8_t slave_number, uint8_t motor_number)
int param_SDO_PDO_retries_
bool param_en_pub_tmc_coe_info_
float param_add_ratio_trq_
virtual void rosPublishTmcCoeInfo(const ros::TimerEvent &event)
std::string param_tmc_coe_info_topic_
bool statusWordState(uint8_t slave_number, fsa_state_t state)
#define ROS_DEBUG_STREAM(args)
bool param_pub_actual_trq_
void publish(const boost::shared_ptr< M > &message) const
Publisher advertise(AdvertiseOptions &ops)
std::string param_tmc_cmd_relpos_topic_
std::string param_tmc_cmd_abspos_topic_
ros::Subscriber tmc_cmd_abspos_sub_
#define ROS_WARN_STREAM(args)
virtual void initSubscriber()
std::string getSlaveName(uint8_t slave_number)
ros::Subscriber tmc_cmd_vel_sub_
std::string param_tmc_cmd_vel_topic_
Subscriber subscribe(const std::string &topic, uint32_t queue_size, const boost::function< void(C)> &callback, const VoidConstPtr &tracked_object=VoidConstPtr(), const TransportHints &transport_hints=TransportHints())
#define ROS_INFO_STREAM(args)
const ROSCPP_DECL std::string & getName()
uint8_t getCycleCounter()
ros::Publisher tmc_coe_info_pub_
virtual void cmdVelCallback(const geometry_msgs::Twist &msg)
const uint8_t DEFAULT_RATE
std::vector< output_pdo_t * > output_pdo_
TmcCoeInterpreter * p_tmc_coe_interpreter_
float param_add_ratio_vel_
virtual void cmdRelPosCallback(const std_msgs::Int32 msg)
bool param_pub_actual_pos_
bool param_pub_actual_vel_
Timer createTimer(Duration period, const TimerCallback &callback, bool oneshot=false, bool autostart=true) const
std::string param_tmc_cmd_trq_topic_
ros::Timer timer_callback_
adi_tmc_coe
Author(s):
autogenerated on Sun Feb 2 2025 03:07:24