Skip to content

Commit ed1d1ee

Browse files
committed
refactor: Remove unused retryWriteItem function from Dynamixel interface
1 parent bb268c6 commit ed1d1ee

File tree

2 files changed

+0
-37
lines changed

2 files changed

+0
-37
lines changed

include/dynamixel_hardware_interface/dynamixel_hardware_interface.hpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -265,15 +265,6 @@ class DynamixelHardware : public
265265
*/
266266
bool initItems(const std::string & type_filter);
267267

268-
/**
269-
* @brief Helper function to retry writing an item to a Dynamixel device.
270-
* @param id The ID of the Dynamixel device.
271-
* @param item_name The name of the item to write.
272-
* @param value The value to write.
273-
* @return True if write was successful, false if timeout occurred.
274-
*/
275-
// bool retryWriteItem(uint8_t id, const std::string & item_name, uint32_t value);
276-
277268
/**
278269
* @brief Initializes Dynamixel items.
279270
* @return True if initialization was successful, false otherwise.

src/dynamixel_hardware_interface.cpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -732,34 +732,6 @@ bool DynamixelHardware::CommReset()
732732
return false;
733733
}
734734

735-
// bool DynamixelHardware::retryWriteItem(uint8_t id, const std::string & item_name, uint32_t value)
736-
// {
737-
// rclcpp::Time start_time = this->now();
738-
// rclcpp::Duration error_duration(0, 0);
739-
740-
// while (true) {
741-
// if (dxl_comm_->WriteItem(id, item_name, value) == DxlError::OK) {
742-
// RCLCPP_INFO_STREAM(
743-
// logger_,
744-
// "[ID:" << std::to_string(id) << "] item_name:" << item_name.c_str() <<
745-
// "\tdata:" << value);
746-
// return true;
747-
// }
748-
749-
// error_duration = this->now() - start_time;
750-
// if (error_duration.seconds() * 1000 >= err_timeout_ms_) {
751-
// RCLCPP_ERROR_STREAM(
752-
// logger_,
753-
// "[ID:" << std::to_string(id) << "] Write Item error (Timeout: " <<
754-
// error_duration.seconds() * 1000 << "ms/" << err_timeout_ms_ << "ms)");
755-
// return false;
756-
// }
757-
// RCLCPP_WARN_STREAM(
758-
// logger_,
759-
// "[ID:" << std::to_string(id) << "] Write Item retry...");
760-
// }
761-
// }
762-
763735
bool DynamixelHardware::initItems(const std::string & type_filter)
764736
{
765737
RCLCPP_INFO_STREAM(logger_, "$$$$$ Init Items for type: " << type_filter);

0 commit comments

Comments
 (0)