@@ -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