diff --git a/franka_hw/src/resource_helpers.cpp b/franka_hw/src/resource_helpers.cpp index cf22c58126be252100a3afcff35bd2a1c590d93c..f9219967f7560a1b83b53ae7de396c91ecfbb317 100644 --- a/franka_hw/src/resource_helpers.cpp +++ b/franka_hw/src/resource_helpers.cpp @@ -46,9 +46,8 @@ bool getArmClaimedMap(ResourceWithClaimsMap& resource_map, ArmClaimedMap& arm_cl // 7 non-torque claims on joint_level or one claim on cartesian level. for (auto map_it = resource_map.begin(); map_it != resource_map.end(); map_it++) { if (!findArmIdInResourceId(map_it->first, ¤t_arm_id)) { - ROS_ERROR_STREAM("Could not find arm_id in resource " - << map_it->first - << ". Conflict! Name joints as '<robot_arm_id>_joint<jointnumber>'"); + ROS_ERROR_STREAM("Resource conflict: Could not find arm_id in resource " + << map_it->first << ". Name joints as '<robot_arm_id>_joint<jointnumber>'"); return false; } ResourceClaims new_claim; @@ -139,8 +138,9 @@ ControlMode getControlMode(const std::string& arm_id, ArmClaimedMap& arm_claim_m bool hasConflictingMultiClaim(const ResourceWithClaimsMap& resource_map) { for (const auto& resource : resource_map) { if (resource.second.size() > 2) { - ROS_ERROR_STREAM("FrankaHW: Resource " - << resource.first << " claimed with more than two interfaces. Conflict!"); + ROS_ERROR_STREAM("Resource conflict: " << resource.first + << " is claimed with more than two command interfaces " + "which is not supported."); return true; } uint8_t torque_claims = 0; @@ -154,9 +154,10 @@ bool hasConflictingMultiClaim(const ResourceWithClaimsMap& resource_map) { } } if (torque_claims != 1) { - ROS_ERROR_STREAM("FrankaHW: Resource " + ROS_ERROR_STREAM("Resource conflict: " << resource.first - << " is claimed with two non-compatible interfaces. Conflict!"); + << " is claimed with a combination of two interfaces that is not " + "supported."); return true; } } @@ -174,8 +175,9 @@ bool hasConflictingJointAndCartesianClaim(const ArmClaimedMap& arm_claim_map, arm_claim_map.at(arm_id).joint_position_claims + arm_claim_map.at(arm_id).joint_velocity_claims > 0)) { - ROS_ERROR_STREAM("FrankaHW: Invalid claims on joint AND cartesian level on arm " - << arm_id << ". Conflict!"); + ROS_ERROR_STREAM( + "Resource conflict: Invalid combination of claims on joint AND cartesian level on arm " + << arm_id << " which is not supported."); return true; } } @@ -192,8 +194,9 @@ bool partiallyClaimsArmJoints(const ArmClaimedMap& arm_claim_map, const std::str arm_claim_map.at(arm_id).joint_velocity_claims != 7) || (arm_claim_map.at(arm_id).joint_torque_claims > 0 && arm_claim_map.at(arm_id).joint_torque_claims != 7)) { - ROS_ERROR_STREAM("FrankaHW: Non-consistent claims on the joints of " - << arm_id << ". Not supported. Conflict!"); + ROS_ERROR_STREAM("Resource conflict: Partially claiming joints of arm " + << arm_id + << " is not supported. Make sure to claim all 7 joints of the robot."); return true; } }