Go to the documentation of this file.
12 uint16_t module_number, uint8_t motor_number) :
14 p_tmcl_interpreter_(p_tmcl_interpreter),
15 module_number_(module_number),
16 motor_number_(motor_number)
97 "/tmc_cmd_abspos_topic";
102 ROS_WARN_STREAM(
"[" << __func__ <<
"] Failed to get tmc_cmd_abspos_topic for motor"
106 "/tmc_cmd_relpos_topic";
111 ROS_WARN_STREAM(
"[" << __func__ <<
"] Failed to get tmc_cmd_relpos_topic for motor"
115 "/tmc_cmd_trq_topic";
132 "/additional_ratio_vel";
137 ROS_WARN_STREAM(
"[" << __func__ <<
"] Failed to get additional_ratio_vel for motor"
141 "/additional_ratio_pos";
146 ROS_WARN_STREAM(
"[" << __func__ <<
"] Failed to get additional_ratio_pos for motor"
150 "/additional_ratio_trq";
155 ROS_WARN_STREAM(
"[" << __func__ <<
"] Failed to get additional_ratio_trq for motor"
160 const std::string s_pub_rate_tmc_info=
s_node_name_ +
"/pub_rate_tmc_info";
162 const std::string s_comm_interface_name=
s_node_name_ +
"/comm_interface_name";
194 ROS_INFO_STREAM(
"[" << __func__ <<
"] Publisher TimerCallback is created successfully!");
198 ROS_ERROR_STREAM(
"[" << __func__ <<
"] Publisher TimerCallback not created!");
294 float val = msg.linear.x;
295 int32_t board_val = 0;
299 ROS_DEBUG_STREAM(
"[" << __func__ <<
"] Subscriber callback entered, received: " << val <<
" board value: "
306 ROS_DEBUG_STREAM(
"\n[" << __func__ <<
"] Subscriber callback exited successfully");
315 board_val = abs(board_val);
318 ROS_DEBUG_STREAM(
"\n[" << __func__ <<
"] Subscriber callback exited successfully");
328 int32_t val = msg.data;
332 ROS_DEBUG_STREAM(
"[" << __func__ <<
"] Subscriber callback entered, received: " << msg.data <<
" board value: "
337 ROS_DEBUG_STREAM(
"\n[" << __func__ <<
"] Subscriber callback exited successfully");
346 int32_t val = msg.data;
350 ROS_DEBUG_STREAM(
"[" << __func__ <<
"] Subscriber callback entered, received: " << msg.data <<
" board value: "
355 ROS_DEBUG_STREAM(
"\n[" << __func__ <<
"] Subscriber callback exited successfully");
364 int32_t val = msg.data;
368 ROS_DEBUG_STREAM(
"[" << __func__ <<
"] Subscriber callback entered, received: " << val);
372 ROS_DEBUG_STREAM(
"\n[" << __func__ <<
"] Subscriber callback exited successfully");
ros::Timer timer_callback_
void setParam(const std::string &key, bool b) const
const ROSCPP_DECL std::string & getNamespace()
float param_wheel_diameter_
#define ROS_ERROR_STREAM(args)
ros::Subscriber tmc_cmd_relpos_sub_
ros::Subscriber tmc_cmd_trq_sub_
virtual void cmdTrqCallback(const std_msgs::Int32 msg)
std::string param_tmc_info_topic_
bool getParam(const std::string &key, bool &b) const
float param_add_ratio_vel_
bool executeCmd(tmcl_cmd_t cmd, uint8_t type, uint8_t motor, int32_t *val)
virtual void cmdAbsPosCallback(const std_msgs::Int32 msg)
float param_pub_rate_tmc_info_
std::string param_tmc_cmd_vel_topic_
std::string param_tmc_cmd_trq_topic_
#define ROS_DEBUG_STREAM(args)
void publish(const boost::shared_ptr< M > &message) const
Publisher advertise(AdvertiseOptions &ops)
ros::Subscriber tmc_cmd_abspos_sub_
ros::Subscriber tmc_cmd_vel_sub_
Motor(ros::NodeHandle *p_nh, TmclInterpreter *p_tmcl_interpreter, uint16_t module_number, uint8_t motor_number)
#define ROS_WARN_STREAM(args)
std::string param_tmc_cmd_abspos_topic_
ros::Publisher tmc_info_pub_
TmclInterpreter * p_tmcl_interpreter_
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)
bool param_pub_actual_pos_
bool param_pub_actual_trq_
adi_tmcl::TmcInfo tmc_info_msg_
const ROSCPP_DECL std::string & getName()
float param_add_ratio_pos_
virtual void cmdVelCallback(const geometry_msgs::Twist &msg)
std::string param_tmc_cmd_relpos_topic_
virtual void initSubscriber()
float param_add_ratio_trq_
virtual void cmdRelPosCallback(const std_msgs::Int32 msg)
bool param_en_pub_tmc_info_
bool param_pub_actual_vel_
Timer createTimer(Duration period, const TimerCallback &callback, bool oneshot=false, bool autostart=true) const
virtual void rosPublishTmcInfo(const ros::TimerEvent &event)
std::string param_comm_interface_name_
adi_tmcl
Author(s):
autogenerated on Wed Apr 2 2025 02:43:01