New error messages
authorKonstantinos Chatzilygeroudis <costashatz@gmail.com>
Tue, 7 Mar 2017 12:15:21 +0000 (13:15 +0100)
committerKonstantinos Chatzilygeroudis <costashatz@gmail.com>
Tue, 7 Mar 2017 12:15:21 +0000 (13:15 +0100)
src/disable_link_plugin.cpp
src/mimic_joint_plugin.cpp

index 9e2831c..9a15838 100644 (file)
@@ -12,7 +12,7 @@ Redistribution and use in source and binary forms, with or without modification,
 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived
     from this software without specific prior written permission.
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
 SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
@@ -51,10 +51,13 @@ namespace gazebo {
 
         // Get pointers to joints
         link_ = model_->GetLink(link_name_);
-        if (link_)
+        if (link_) {
             link_->SetEnabled(false);
+            // Output some confirmation
+            ROS_INFO_STREAM("DisableLinkPlugin loaded! Link: \"" << link_name_);
+        }
         else
-            ROS_WARN("Link %s not found!", link_name_.c_str());
+            ROS_ERROR_STREAM("Link" << link_name_ << " not found! DisableLinkPlugin could not be loaded.");
     }
 
     GZ_REGISTER_MODEL_PLUGIN(DisableLinkPlugin);
index f272a8c..1050624 100644 (file)
@@ -118,12 +118,12 @@ namespace gazebo {
         // Get pointers to joints
         joint_ = model_->GetJoint(joint_name_);
         if (!joint_) {
-            ROS_ERROR("No joint named %s. MimicJointPlugin could not be loaded.", joint_name_.c_str());
+            ROS_ERROR_STREAM("No joint named \"" << joint_name_ << "\". MimicJointPlugin could not be loaded.");
             return;
         }
         mimic_joint_ = model_->GetJoint(mimic_joint_name_);
         if (!mimic_joint_) {
-            ROS_ERROR("No (mimic) joint named %s. MimicJointPlugin could not be loaded.", mimic_joint_name_.c_str());
+            ROS_ERROR_STREAM("No (mimic) joint named \"" << mimic_joint_name_ << "\". MimicJointPlugin could not be loaded.");
             return;
         }