From: Konstantinos Chatzilygeroudis Date: Sat, 7 Mar 2015 17:44:24 +0000 (+0200) Subject: Code cleaning... X-Git-Tag: 0.1.0~16 X-Git-Url: http://git.ece.ufrgs.br/?a=commitdiff_plain;h=7454b9dbb57baacec7192b68f575ef481a3299da;p=roboticsgroup_upatras_gazebo_plugins.git Code cleaning... --- diff --git a/README.md b/README.md index 4aa54c5..7dc696e 100644 --- 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: ** 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: *\* means that the mimic joint is controlled via PID. Ommit it so that the mimic joint is controlled via setAngle. ###DisableLinkPlugin diff --git a/include/roboticsgroup_gazebo_plugins/disable_link_plugin.h b/include/roboticsgroup_gazebo_plugins/disable_link_plugin.h index e9ecba1..f57727a 100644 --- a/include/roboticsgroup_gazebo_plugins/disable_link_plugin.h +++ b/include/roboticsgroup_gazebo_plugins/disable_link_plugin.h @@ -35,9 +35,6 @@ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISE #include #include - -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 diff --git a/include/roboticsgroup_gazebo_plugins/mimic_joint_plugin.h b/include/roboticsgroup_gazebo_plugins/mimic_joint_plugin.h index bd21dc8..eff5070 100644 --- a/include/roboticsgroup_gazebo_plugins/mimic_joint_plugin.h +++ b/include/roboticsgroup_gazebo_plugins/mimic_joint_plugin.h @@ -75,4 +75,4 @@ namespace gazebo }; } -#endif \ No newline at end of file +#endif diff --git a/src/disable_link_plugin.cpp b/src/disable_link_plugin.cpp index 12ef1f7..eba4813 100644 --- a/src/disable_link_plugin.cpp +++ b/src/disable_link_plugin.cpp @@ -22,7 +22,8 @@ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISE #include -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); + +} diff --git a/src/mimic_joint_plugin.cpp b/src/mimic_joint_plugin.cpp index ef8860f..0c83e7e 100644 --- a/src/mimic_joint_plugin.cpp +++ b/src/mimic_joint_plugin.cpp @@ -22,7 +22,8 @@ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISE #include -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); + +}