Go to the documentation of this file.
12 uint16_t module_number, uint8_t motor_number) :
13 Motor(p_nh, p_tmcl_interpreter, module_number, motor_number)
37 ROS_WARN_STREAM(
"[" << __func__ <<
"] \"closed loop\" is not available. Set Commutation Mode to Open loop");
48 ROS_WARN_STREAM(
"[" << __func__ <<
"] \"motor full step resolution\" is not available");
87 ROS_WARN_STREAM(
"[" << __func__ <<
"] \"MicrostepResolution\" is not available");
91 ROS_INFO_STREAM(
"[" << __func__ <<
"] Relative Positioning Option: " << val);
93 " depends on the Relative Positioning Option Axis Parameter");
98 ROS_WARN_STREAM(
"[" << __func__ <<
"] \"relative positioning option\" is not available");
116 ROS_INFO_STREAM(
"[" << __func__ <<
"] Position unit: angular degrees");
130 bool b_drv_statusflag_available =
false;
151 tmc_info_msg_.status =
"driver error flags: "+ std::to_string(val);
152 b_drv_statusflag_available =
true;
161 if(b_drv_statusflag_available)
167 tmc_info_msg_.status =
"extended error flags: " + std::to_string(val);
172 ROS_DEBUG_STREAM(
"[" << __func__ <<
"] Failed to get extended error flags");
259 float val = msg.linear.x;
260 int32_t board_val = 0;
274 ROS_DEBUG_STREAM(
"[" << __func__ <<
"] Subscriber callback entered, received: " << val <<
" board value: "
281 ROS_DEBUG_STREAM(
"\n[" << __func__ <<
"] Subscriber callback exited successfully");
290 board_val = abs(board_val);
293 ROS_DEBUG_STREAM(
"\n[" << __func__ <<
"] Subscriber callback exited successfully");
303 float convert_const_deg = 0.00;
304 int32_t unit_val = 0;
305 int32_t val = msg.data;
319 unit_val = val * convert_const_deg;
321 ROS_DEBUG_STREAM(
"[" << __func__ <<
"] Subscriber callback entered, received: " << val <<
" board value: "
326 ROS_DEBUG_STREAM(
"\n[" << __func__ <<
"] Subscriber callback exited successfully");
335 float convert_const_deg = 0;
336 int32_t unit_val = 0;
337 int32_t val = msg.data;
351 unit_val = val * convert_const_deg;
353 ROS_DEBUG_STREAM(
"[" << __func__ <<
"] Subscriber callback entered, received: " << val <<
" board value: "
358 ROS_DEBUG_STREAM(
"\n[" << __func__ <<
"] Subscriber callback exited successfully");
367 int32_t val = msg.data;
371 ROS_DEBUG_STREAM(
"[" << __func__ <<
"] Subscriber callback entered, received: " << val);
375 ROS_DEBUG_STREAM(
"\n[" << __func__ <<
"] Subscriber callback exited successfully");
float param_wheel_diameter_
void cmdVelCallback(const geometry_msgs::Twist &msg) override
#define ROS_ERROR_STREAM(args)
uint16_t microstep_resolution_
ros::Subscriber tmc_cmd_relpos_sub_
ros::Subscriber tmc_cmd_trq_sub_
float param_add_ratio_vel_
bool executeCmd(tmcl_cmd_t cmd, uint8_t type, uint8_t motor, int32_t *val)
void rosPublishTmcInfo(const ros::TimerEvent &event) override
uint32_t motor_fullstep_resolution_
const uint16_t ANGULAR_FULL_ROTATION
std::string param_tmc_cmd_vel_topic_
StepperMotor(ros::NodeHandle *p_nh, TmclInterpreter *p_tmcl_interpreter, uint16_t module_number, uint8_t motor_number)
void cmdTrqCallback(const std_msgs::Int32 msg) override
std::string param_tmc_cmd_trq_topic_
#define ROS_DEBUG_STREAM(args)
void cmdRelPosCallback(const std_msgs::Int32 msg) override
void publish(const boost::shared_ptr< M > &message) const
void initSubscriber() override
void cmdAbsPosCallback(const std_msgs::Int32 msg) override
ros::Subscriber tmc_cmd_abspos_sub_
ros::Subscriber tmc_cmd_vel_sub_
#define ROS_WARN_STREAM(args)
@ STEPPER_CLOSEDLOOP_MOTOR
stepper_comm_mode_t comm_mode_
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_
float param_add_ratio_pos_
std::string param_tmc_cmd_relpos_topic_
float param_add_ratio_trq_
bool param_pub_actual_vel_
std::string param_comm_interface_name_
adi_tmcl
Author(s):
autogenerated on Wed Apr 2 2025 02:43:01