From bd6408ed9bc7e8126d77a7b4c928dc149bbf5936 Mon Sep 17 00:00:00 2001
From: Johannes Mey <johannes.mey@tu-dresden.de>
Date: Mon, 6 Jul 2020 09:41:03 +0200
Subject: [PATCH] less verbose, some documentation

---
 src/RobotStateProvider.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/RobotStateProvider.cpp b/src/RobotStateProvider.cpp
index ff4c6e2..8444434 100644
--- a/src/RobotStateProvider.cpp
+++ b/src/RobotStateProvider.cpp
@@ -21,7 +21,9 @@ namespace robot_state_provider {
  */
   std::map<std::string, std::string> topics{};
 
-
+  /**
+   * The MQTT QOS is set to 0, meaning each message is received *at most* once.
+   */
   constexpr int QOS = 0;
 
   const std::string CLIENT_ID = "robot_state_provider_mqtt";
@@ -162,7 +164,7 @@ namespace robot_state_provider {
 
         messages.push_back(pls_msg);
       } else {
-        ROS_INFO_STREAM_NAMED("MqttToRosNode", "Skipping the status of link " << name << ".");
+        ROS_DEBUG_STREAM("Skipping the status of link " << name << ".");
       }
     }
 
@@ -177,7 +179,7 @@ namespace robot_state_provider {
 
           std::string mqtt_msg;
           if (!pls_msg.SerializeToString(&mqtt_msg)) {
-            ROS_ERROR_STREAM_NAMED("MqttToRosNode", "Serialization of incoming MQTT message has failed.");
+            ROS_ERROR_STREAM("Serialization of incoming MQTT message has failed.");
           }
 
           auto pubmsg = mqtt::make_message(pls_msg.name(), mqtt_msg);
@@ -190,7 +192,7 @@ namespace robot_state_provider {
         return;
       }
     } else {
-      ROS_ERROR_STREAM_NAMED("MqttToRosNode", "Not connected! Unable to listen to messages.");
+      ROS_ERROR_STREAM("Not connected! Unable to listen to messages.");
     }
   }
 
-- 
GitLab