Skip to content

Commit 4d74929

Browse files
authored
Fix portable entity ID logging (#900) (#916)
1 parent 4b00f0c commit 4d74929

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

gz_ros2_control/src/gz_ros2_control_plugin.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,21 +213,22 @@ GazeboSimROS2ControlPluginPrivate::GetEnabledJoints(
213213
}
214214
case sdf::JointType::FIXED:
215215
{
216-
RCLCPP_INFO(
217-
node_->get_logger(), "[gz_ros2_control] Fixed joint ['%s'] (Entity='%llu') is skipped.",
218-
jointName.c_str(), static_cast<unsigned long long>(jointEntity));
216+
RCLCPP_INFO_STREAM(
217+
node_->get_logger(),
218+
"[gz_ros2_control] Fixed joint ['" << jointName << "'] (Entity='" << jointEntity
219+
<< "') is skipped.");
219220
continue;
220221
}
221222
case sdf::JointType::REVOLUTE2:
222223
case sdf::JointType::SCREW:
223224
case sdf::JointType::BALL:
224225
case sdf::JointType::UNIVERSAL:
225226
{
226-
RCLCPP_WARN(
227+
RCLCPP_WARN_STREAM(
227228
node_->get_logger(),
228-
"[gz_ros2_control] Joint ['%s'] (Entity='%llu') is of unsupported type."
229-
" Only joints with a single axis are supported.",
230-
jointName.c_str(), static_cast<unsigned long long>(jointEntity));
229+
"[gz_ros2_control] Joint ['" << jointName << "'] (Entity='" << jointEntity
230+
<< "') is of unsupported type."
231+
" Only joints with a single axis are supported.");
231232
continue;
232233
}
233234
default:

0 commit comments

Comments
 (0)