Added ability to check for bulkread success.

This commit is contained in:
Kayman
2019-06-05 16:27:49 +09:00
parent af992c7d15
commit 1b746fbf04

View File

@ -925,11 +925,14 @@ void RobotisController::process()
for (auto& it : port_to_bulk_read_)
{
robot_->ports_[it.first]->setPacketTimeout(0.0);
//it.second->rxPacket();
int result = it.second->rxPacket();
if(result != COMM_SUCCESS)
ROS_ERROR_STREAM("Bulk Read Fail : " << it.first);
if(DEBUG_PRINT)
{
int result = it.second->rxPacket();
if(result != COMM_SUCCESS)
ROS_ERROR_STREAM("Bulk Read Fail : " << it.first);
}
else
it.second->rxPacket();
}
// -> save to robot->dxls_[]->dxl_state_