Skip to content

Commit

Permalink
Add fix for gazebo_ros_pkgs#612
Browse files Browse the repository at this point in the history
This issue also affects the mimic joint plugin:

    ros-simulation/gazebo_ros_pkgs#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
  • Loading branch information
mintar committed Mar 16, 2018
1 parent 1075b76 commit 4522c86
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mimic_joint_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ namespace gazebo {
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));
Expand Down

0 comments on commit 4522c86

Please sign in to comment.