Skip to content

Commit e76ea45

Browse files
authored
Merge pull request ROBOTIS-GIT#490 from ROBOTIS-GIT/develop
fix ROS_ERROR bug
2 parents d0ca0ce + 8dfcef9 commit e76ea45

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ros/dynamixel_sdk_examples/src/indirect_address_node.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ bool syncGetPresentPositionCallback(
8080
// When reading 2 byte data from AX / MX(1.0), use read2ByteTxRx() instead.
8181
dxl_addparam_result = groupSyncRead.addParam((uint8_t)req.id1);
8282
if (dxl_addparam_result != true) {
83-
ROS_ERROR("Failed to addparam to groupSyncRead for Dynamixel ID ", req.id1);
83+
ROS_ERROR("Failed to addparam to groupSyncRead for Dynamixel ID %d", req.id1);
8484
return 0;
8585
}
8686

8787
dxl_addparam_result = groupSyncRead.addParam((uint8_t)req.id2);
8888
if (dxl_addparam_result != true) {
89-
ROS_ERROR("Failed to addparam to groupSyncRead for Dynamixel ID ", req.id2);
89+
ROS_ERROR("Failed to addparam to groupSyncRead for Dynamixel ID %d", req.id2);
9090
return 0;
9191
}
9292

@@ -101,7 +101,7 @@ bool syncGetPresentPositionCallback(
101101
groupSyncRead.clearParam();
102102
return true;
103103
} else {
104-
ROS_ERROR("Failed to get position! Result: ", dxl_comm_result);
104+
ROS_ERROR("Failed to get position! Result: %d", dxl_comm_result);
105105
groupSyncRead.clearParam();
106106
return false;
107107
}

ros/dynamixel_sdk_examples/src/sync_read_write_node.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ bool syncGetPresentPositionCallback(
7676
// When reading 2 byte data from AX / MX(1.0), use read2ByteTxRx() instead.
7777
dxl_addparam_result = groupSyncRead.addParam((uint8_t)req.id1);
7878
if (dxl_addparam_result != true) {
79-
ROS_ERROR("Failed to addparam to groupSyncRead for Dynamixel ID ", req.id1);
79+
ROS_ERROR("Failed to addparam to groupSyncRead for Dynamixel ID %d", req.id1);
8080
return 0;
8181
}
8282

8383
dxl_addparam_result = groupSyncRead.addParam((uint8_t)req.id2);
8484
if (dxl_addparam_result != true) {
85-
ROS_ERROR("Failed to addparam to groupSyncRead for Dynamixel ID ", req.id2);
85+
ROS_ERROR("Failed to addparam to groupSyncRead for Dynamixel ID %d", req.id2);
8686
return 0;
8787
}
8888

@@ -97,7 +97,7 @@ bool syncGetPresentPositionCallback(
9797
groupSyncRead.clearParam();
9898
return true;
9999
} else {
100-
ROS_ERROR("Failed to get position! Result: ", dxl_comm_result);
100+
ROS_ERROR("Failed to get position! Result: %d", dxl_comm_result);
101101
groupSyncRead.clearParam();
102102
return false;
103103
}

0 commit comments

Comments
 (0)