From b066e6fa56a08221d14a0758d0128720b5133c8f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20G=C3=BCnther?= Date: Tue, 20 Mar 2018 13:12:53 +0100 Subject: [PATCH] Add warning when triggering gazebo_ros_pkgs#612 --- src/mimic_joint_plugin.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mimic_joint_plugin.cpp b/src/mimic_joint_plugin.cpp index f9de9ee..d246952 100644 --- a/src/mimic_joint_plugin.cpp +++ b/src/mimic_joint_plugin.cpp @@ -172,6 +172,10 @@ namespace gazebo { #if GAZEBO_MAJOR_VERSION >= 9 mimic_joint_->SetPosition(0, angle, true); #elif GAZEBO_MAJOR_VERSION > 2 + ROS_WARN_ONCE("The mimic_joint plugin is using the Joint::SetPosition method without preserving the link velocity."); + ROS_WARN_ONCE("As a result, gravity will not be simulated correctly for your model."); + ROS_WARN_ONCE("Please set gazebo_pid parameters or upgrade to Gazebo 9."); + ROS_WARN_ONCE("For details, see https://github.com/ros-simulation/gazebo_ros_pkgs/issues/612"); mimic_joint_->SetPosition(0, angle); #else mimic_joint_->SetAngle(0, math::Angle(angle)); -- 2.12.0