Add warning when triggering gazebo_ros_pkgs#612
authorMartin Günther <martin.guenther@dfki.de>
Tue, 20 Mar 2018 12:12:53 +0000 (13:12 +0100)
committerMartin Günther <martin.guenther@dfki.de>
Tue, 20 Mar 2018 12:12:53 +0000 (13:12 +0100)
src/mimic_joint_plugin.cpp

index f9de9ee..d246952 100644 (file)
@@ -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));