From 05e2cd9c03ffa77f0c0d5bd3e788d33e06480b25 Mon Sep 17 00:00:00 2001 From: Manuel Galliker Date: Sat, 10 Apr 2021 12:40:13 +0200 Subject: [PATCH] Removed unused computation of CoG (#737) * Removed unused computation of CoG In the lift drag plugin there were a few lines of code used to compute the center of gravity of the respective link. Since the variables themselfes are unused I propose to remove them. * Revert "Removed unused computation of CoG" This reverts commit 97378945e26c16ce3341090c4b453731b2aeadd9. Reverted changes to undo the formatting. * Removed unused computation of CoG In the lift drag plugin there were a few lines of code used to compute the center of gravity of the respective link. Since the variables themselfes are unused I propose to remove them. --- src/liftdrag_plugin/liftdrag_plugin.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/liftdrag_plugin/liftdrag_plugin.cpp b/src/liftdrag_plugin/liftdrag_plugin.cpp index fabea3bf4a76..30da8250e590 100644 --- a/src/liftdrag_plugin/liftdrag_plugin.cpp +++ b/src/liftdrag_plugin/liftdrag_plugin.cpp @@ -381,12 +381,6 @@ void LiftDragPlugin::OnUpdate() // compute moment (torque) at cp ignition::math::Vector3d moment = cm * q * this->area * momentDirection; -#if GAZEBO_MAJOR_VERSION >= 9 - ignition::math::Vector3d cog = this->link->GetInertial()->CoG(); -#else - ignition::math::Vector3d cog = ignitionFromGazeboMath(this->link->GetInertial()->GetCoG()); -#endif - // force about cg in inertial frame ignition::math::Vector3d force = lift + drag;