diff --git a/tf2_ros/include/tf2_ros/message_filter.hpp b/tf2_ros/include/tf2_ros/message_filter.hpp index 43122661d..7c3dfc43f 100644 --- a/tf2_ros/include/tf2_ros/message_filter.hpp +++ b/tf2_ros/include/tf2_ros/message_filter.hpp @@ -62,6 +62,7 @@ #include "builtin_interfaces/msg/time.hpp" #include "rclcpp/clock.hpp" #include "rclcpp/duration.hpp" +#include "rclcpp/logger.hpp" #include "rclcpp/logging.hpp" #include "rclcpp/time.hpp" #include "rclcpp/node_interfaces/node_interfaces.hpp" @@ -69,14 +70,14 @@ #include "rclcpp/node_interfaces/get_node_clock_interface.hpp" #define TF2_ROS_MESSAGEFILTER_DEBUG(fmt, ...) \ - RCUTILS_LOG_DEBUG_NAMED( \ - "tf2_ros_message_filter", \ + RCLCPP_DEBUG( \ + rclcpp::get_logger("tf2_ros_message_filter"), \ std::string(std::string("MessageFilter [target=%s]: ") + std::string(fmt)).c_str(), \ getTargetFramesString().c_str(), __VA_ARGS__) #define TF2_ROS_MESSAGEFILTER_WARN(fmt, ...) \ - RCUTILS_LOG_WARN_NAMED( \ - "tf2_ros_message_filter", \ + RCLCPP_WARN( \ + rclcpp::get_logger("tf2_ros_message_filter"), \ std::string(std::string("MessageFilter [target=%s]: ") + std::string(fmt)).c_str(), \ getTargetFramesString().c_str(), __VA_ARGS__) diff --git a/tf2_ros/src/static_transform_broadcaster_program.cpp b/tf2_ros/src/static_transform_broadcaster_program.cpp index a1779a237..e69cb020a 100644 --- a/tf2_ros/src/static_transform_broadcaster_program.cpp +++ b/tf2_ros/src/static_transform_broadcaster_program.cpp @@ -40,9 +40,8 @@ #include "tf2/LinearMath/Quaternion.hpp" #include "tf2/LinearMath/Vector3.hpp" -#include "rcutils/logging_macros.h" - #include "rclcpp/executors.hpp" +#include "rclcpp/logger.hpp" #include "rclcpp/logging.hpp" #include "rclcpp/node_options.hpp" #include "rclcpp/utilities.hpp" @@ -305,7 +304,9 @@ int main(int argc, char ** argv) std::string ret = parse_args(args, help, rotation, translation, frame_id, child_frame_id); if (ret != "") { - RCUTILS_LOG_ERROR("error parsing command line arguments: %s", ret.c_str()); + RCLCPP_ERROR( + rclcpp::get_logger("static_transform_publisher"), + "error parsing command line arguments: %s", ret.c_str()); print_usage(); return 1; }