Add missing setForce() call (otherwise PID option doesn't do anything)
authorStefan Kohlbrecher <kohlbrecher@sim.tu-darmstadt.de>
Tue, 31 May 2016 09:33:54 +0000 (11:33 +0200)
committerStefan Kohlbrecher <kohlbrecher@sim.tu-darmstadt.de>
Tue, 31 May 2016 12:44:04 +0000 (14:44 +0200)
src/mimic_joint_plugin.cpp

index 0c83e7e..c5378a4 100644 (file)
@@ -163,6 +163,7 @@ void MimicJointPlugin::UpdateChild()
         a = angle;
       double error = angle-a;
       double effort = gazebo::math::clamp(pid_.computeCommand(error, period), -max_effort_, max_effort_);
+      mimic_joint_->SetForce(0, effort);
     }
     else
       mimic_joint_->SetAngle(0, math::Angle(angle));