Skip to content

Commit ee6f240

Browse files
committed
- changed all values read by bulk read are saved to dxl_state_->bulk_read_table_.
1 parent 6ad9f4d commit ee6f240

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

robotis_controller/src/robotis_controller/robotis_controller.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ void RobotisController::initializeDevice(const std::string init_file_path)
499499
bulkread_data_length += addr_leng;
500500
for (int l = 0; l < addr_leng; l++)
501501
{
502-
// ROS_WARN("[%12s] INDIR_ADDR: %d, ITEM_ADDR: %d", joint_name.c_str(), indirect_addr, dxl->ctrl_table[dxl->bulk_read_items[i]->item_name]->address + _l);
502+
//ROS_WARN("[%12s] INDIR_ADDR: %d, ITEM_ADDR: %d", joint_name.c_str(), indirect_addr, dxl->ctrl_table_[dxl->bulk_read_items_[i]->item_name_]->address_ + l);
503503
read2Byte(joint_name, indirect_addr, &data16);
504504
if (data16 != dxl->ctrl_table_[dxl->bulk_read_items_[i]->item_name_]->address_ + l)
505505
{
@@ -946,8 +946,8 @@ void RobotisController::process()
946946
dxl->dxl_state_->goal_velocity_ = dxl->convertValue2Velocity(data);
947947
else if (dxl->goal_current_item_ != 0 && item->item_name_ == dxl->goal_current_item_->item_name_)
948948
dxl->dxl_state_->goal_torque_ = dxl->convertValue2Torque(data);
949-
else
950-
dxl->dxl_state_->bulk_read_table_[item->item_name_] = data;
949+
950+
dxl->dxl_state_->bulk_read_table_[item->item_name_] = data;
951951
}
952952
}
953953

@@ -1166,8 +1166,8 @@ void RobotisController::process()
11661166
dxl->dxl_state_->goal_velocity_ = dxl->convertValue2Velocity(data);
11671167
else if (dxl->goal_current_item_ != 0 && item->item_name_ == dxl->goal_current_item_->item_name_)
11681168
dxl->dxl_state_->goal_torque_ = dxl->convertValue2Torque(data);
1169-
else
1170-
dxl->dxl_state_->bulk_read_table_[item->item_name_] = data;
1169+
1170+
dxl->dxl_state_->bulk_read_table_[item->item_name_] = data;
11711171
}
11721172
}
11731173

@@ -1251,7 +1251,7 @@ void RobotisController::process()
12511251

12521252
if (result_state == NULL)
12531253
{
1254-
fprintf(stderr, "[%s] %s", (*module_it)->getModuleName().c_str(), joint_name.c_str());
1254+
ROS_ERROR("[%s] %s ", (*module_it)->getModuleName().c_str(), joint_name.c_str());
12551255
continue;
12561256
}
12571257

0 commit comments

Comments
 (0)