Skip to content

Commit 89ad779

Browse files
committed
refactor: Remove torque_constant handling from DynamixelInfo structure and model file processing
1 parent bba2456 commit 89ad779

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

include/dynamixel_hardware_interface/dynamixel/dynamixel_info.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ typedef struct
4747

4848
typedef struct
4949
{
50-
double torque_constant;
5150
double min_radian;
5251
double max_radian;
5352
int32_t value_of_zero_radian_position;

src/dynamixel/dynamixel_info.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ void DynamixelInfo::ReadDxlModelFile(uint8_t id, uint16_t model_num)
7373
std::string line;
7474

7575
temp_dxl_info.model_num = model_num;
76-
bool torque_constant_set = false;
7776

7877
// Check if [type info] section exists
7978
bool type_info_found = false;
@@ -123,9 +122,6 @@ void DynamixelInfo::ReadDxlModelFile(uint8_t id, uint16_t model_num)
123122
temp_dxl_info.min_radian = static_cast<double>(stod(strs.at(1)));
124123
} else if (strs.at(0) == "max_radian") {
125124
temp_dxl_info.max_radian = static_cast<double>(stod(strs.at(1)));
126-
} else if (strs.at(0) == "torque_constant") {
127-
temp_dxl_info.torque_constant = static_cast<double>(stod(strs.at(1)));
128-
torque_constant_set = true;
129125
}
130126
} catch (const std::exception & e) {
131127
std::string error_msg = "Error processing line in model file: " + line +
@@ -166,13 +162,6 @@ void DynamixelInfo::ReadDxlModelFile(uint8_t id, uint16_t model_num)
166162
}
167163
}
168164

169-
if (type_info_found && !torque_constant_set) {
170-
fprintf(
171-
stderr, "[WARN] Model file '%s' doesn't contain torque_constant parameter. "
172-
"Using default value: 1.0\n", path.c_str());
173-
temp_dxl_info.torque_constant = 1.0;
174-
}
175-
176165
if (!control_table_found) {
177166
std::string error_msg = "No [control table] section found in model file for ID " +
178167
std::to_string(id);

0 commit comments

Comments
 (0)