This issue also affects the mimic joint plugin:
https://github.com/ros-simulation/gazebo_ros_pkgs/issues/612
The commit here fixes that issue for Gazebo 9. We should change the
GAZEBO_MAJOR_VERSION check to >= 7 if the following PR gets backported
to Gazebo 7 and 8:
https://bitbucket.org/osrf/gazebo/pull-requests/2814/fix-issue-2111-by-providing-options-to/diff
mimic_joint_->SetForce(0, effort);
}
else {
-#if GAZEBO_MAJOR_VERSION > 2
+#if GAZEBO_MAJOR_VERSION >= 9
+ mimic_joint_->SetPosition(0, angle, true);
+#elif GAZEBO_MAJOR_VERSION > 2
mimic_joint_->SetPosition(0, angle);
#else
mimic_joint_->SetAngle(0, math::Angle(angle));