Code cleaning...
authorKonstantinos Chatzilygeroudis <costashatz@gmail.com>
Sat, 7 Mar 2015 17:44:24 +0000 (19:44 +0200)
committerKonstantinos Chatzilygeroudis <costashatz@gmail.com>
Sat, 7 Mar 2015 17:44:24 +0000 (19:44 +0200)
README.md
include/roboticsgroup_gazebo_plugins/disable_link_plugin.h
include/roboticsgroup_gazebo_plugins/mimic_joint_plugin.h
src/disable_link_plugin.cpp
src/mimic_joint_plugin.cpp

index 4aa54c5..7dc696e 100644 (file)
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@ A simple (Model) plugin for Gazebo in order to add to Gazebo the mimic joint fun
 
     - hasPID
     
-      Determines whether the joint has PID in order to be controlled via PID position/effort controller. Takes no value: *<hasPID/>* means that the mimic joint is controlled via PID. Ommit it so that the mimic joint is controlled via setAngle.
+      Determines whether the joint has PID in order to be controlled via PID position/effort controller. Takes no value: *\<hasPID/\>* means that the mimic joint is controlled via PID. Ommit it so that the mimic joint is controlled via setAngle.
 
 ###DisableLinkPlugin
 
index e9ecba1..f57727a 100644 (file)
@@ -35,9 +35,6 @@ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISE
 #include <gazebo/physics/physics.hh>
 #include <gazebo/common/common.hh>
 
-
-using std::string;
-
 namespace gazebo
 {
   class DisableLinkPlugin : public ModelPlugin
@@ -51,7 +48,7 @@ namespace gazebo
 
     private:
       // Parameters
-      string link_name_;
+      std::string link_name_;
 
       bool kill_sim;
 
@@ -67,4 +64,4 @@ namespace gazebo
   };
 }
 
-#endif
\ No newline at end of file
+#endif
index 12ef1f7..eba4813 100644 (file)
@@ -22,7 +22,8 @@ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISE
 
 #include <roboticsgroup_gazebo_plugins/disable_link_plugin.h>
 
-using namespace gazebo;
+namespace gazebo
+{
 
 DisableLinkPlugin::DisableLinkPlugin()
 {
@@ -38,8 +39,8 @@ DisableLinkPlugin::~DisableLinkPlugin()
 
 void DisableLinkPlugin::Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf )
 {
-  this->model_ = _parent;
-  this->world_ = this->model_->GetWorld();
+  model_ = _parent;
+  world_ = model_->GetWorld();
 
   // Check for link element
   if (!_sdf->HasElement("link"))
@@ -58,4 +59,6 @@ void DisableLinkPlugin::Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf )
     ROS_WARN("Link %s not found!", link_name_.c_str());
 }
 
-GZ_REGISTER_MODEL_PLUGIN(DisableLinkPlugin);
\ No newline at end of file
+GZ_REGISTER_MODEL_PLUGIN(DisableLinkPlugin);
+
+}
index ef8860f..0c83e7e 100644 (file)
@@ -22,7 +22,8 @@ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISE
 
 #include <roboticsgroup_gazebo_plugins/mimic_joint_plugin.h>
 
-using namespace gazebo;
+namespace gazebo
+{
 
 MimicJointPlugin::MimicJointPlugin()
 {
@@ -168,4 +169,6 @@ void MimicJointPlugin::UpdateChild()
   }
 }
 
-GZ_REGISTER_MODEL_PLUGIN(MimicJointPlugin);
\ No newline at end of file
+GZ_REGISTER_MODEL_PLUGIN(MimicJointPlugin);
+
+}