diff --git a/src/triton_gazebo/src/thruster_driver_plugin.cpp b/src/triton_gazebo/src/thruster_driver_plugin.cpp index cb2eadd8..e5945931 100644 --- a/src/triton_gazebo/src/thruster_driver_plugin.cpp +++ b/src/triton_gazebo/src/thruster_driver_plugin.cpp @@ -29,8 +29,7 @@ namespace triton_gazebo this->topic_name, 10, std::bind(&ThrusterDriver::GetForceCmd, this, _1)); - - RCLCPP_INFO(node->get_logger(), "Listening on " + this->topic_name + "\n"); + RCLCPP_INFO(node->get_logger(), "Listening on %s", this->topic_name.c_str()); std::string model_name = _model->GetName(); @@ -39,7 +38,7 @@ namespace triton_gazebo std::string thruster_name = model_name + "::thruster" + std::to_string(i) + "::thruster"; this->thruster.push_back(_model->GetLink(thruster_name)); - RCLCPP_INFO(this->node->get_logger(), this->thruster[i-1]->GetName()); + RCLCPP_INFO(this->node->get_logger(), this->thruster[i-1]->GetName().c_str()); } this->updateConnection_ = gazebo::event::Events::ConnectWorldUpdateBegin( diff --git a/src/triton_gazebo/src/underwater_camera.cpp b/src/triton_gazebo/src/underwater_camera.cpp index a333827b..e0dfcb1f 100644 --- a/src/triton_gazebo/src/underwater_camera.cpp +++ b/src/triton_gazebo/src/underwater_camera.cpp @@ -236,7 +236,7 @@ namespace triton_gazebo underwater_image_pub_.publish(message); auto runtime = this->get_clock()->now() - timer; - RCLCPP_INFO(this->get_logger(),"Processing took: "+ std::to_string(runtime.seconds()) + "s"); + RCLCPP_INFO(this->get_logger(), "Processing took: %lfs", runtime.seconds()); } } // namespace triton_gazebo diff --git a/src/triton_object_recognition/src/object_recognizer.cpp b/src/triton_object_recognition/src/object_recognizer.cpp index d48f8891..1e27aeef 100644 --- a/src/triton_object_recognition/src/object_recognizer.cpp +++ b/src/triton_object_recognition/src/object_recognizer.cpp @@ -76,7 +76,7 @@ namespace triton_object_recognition //Check cfg file exists and downloads if it doesn't boost::filesystem::path model_config = model_folder / cfg_filename_; if (!boost::filesystem::exists(model_config)){ - RCLCPP_WARN(get_logger(),"Model config not found. Downloading from " + cfg_url_); + RCLCPP_WARN(get_logger(), "Model config not found. Downloading from %s", cfg_url_.c_str()); //Warning: This command is not portable string command = "wget -O " + model_config.string() + " " + cfg_url_; if (system(command.c_str())){ @@ -87,7 +87,7 @@ namespace triton_object_recognition //Check weights file exists and download if it doesn't boost::filesystem::path model_weights = model_folder / weights_filename_; if (!boost::filesystem::exists(model_weights)){ - RCLCPP_WARN(get_logger(),"Model weights not found. Downloading from " + weights_url_); + RCLCPP_WARN(get_logger(), "Model weights not found. Downloading from %s", weights_url_.c_str()); //Warning: This command is not portable string command = "wget -O " + model_weights.string() + " " + weights_url_; if (system(command.c_str())){