kobuki base keeps shaking in gazebo > v2
Whatever I try, my kobuki base keeps shaking, also often referred as "wobbling" behavior in gazebo > 2
My environment (where I want it to work)
ROS Indigo + osrf ros_gazebo5_pkgs + kobuki(from source)
Where it works: ROS Indigo either x32/x64 with gazebo2 (same sources of kobuki - just recompile..)
Where it doesn't work: ROS + gazebo > v2
Where I tried: ROS Jade + gazebo5 ROS Indigo x32/x64 + gazebo4/gazebo5
- gazebo7 -> no compile (too many errors to fix)
- gazebo6 -> no compile (too many errors to fix)
- gazebo5 -> compiles
gazebo4 -> compiles
I found and tried several solutions, most point to the deprecated velocity /force commands.:
change / remove the velocity command. http://answers.gazebosim.org/question...
also mentioned max_force https://bitbucket.org/osrf/gazebo/com...
more confusion about max_force or fmax http://answers.gazebosim.org/question...
suggests fmax right https://github.com/ros-simulation/gaz...
suggests max_force right https://bitbucket.org/osrf/gazebo/src...
For me its currently unclear what's correct fmax or max_force however just commenting out should also work.
The problem in Code:
/* // deprecated joints_[LEFT]->SetVelocity(0, wheel_speed_cmd_[LEFT] / (wheel_diam_ / 2.0)); joints_[RIGHT]->SetVelocity(0, wheel_speed_cmd_[RIGHT] / (wheel_diam_ / 2.0)); // some suggest just comment SetMaxForce (the following) joints_[LEFT]->SetMaxForce(0, torque_); joints_[RIGHT]->SetMaxForce(0, torque_); // some suggest this as alternative code to SetMaxForce, but max_force seems wrong, it should be fmax joints_[LEFT]->SetParam("max_force",0, torque_); joints_[RIGHT]->SetParam("max_force",0, torque_); */ // my best solution (that still didnt work) joints_[LEFT]->SetParam("vel",0, wheel_speed_cmd_[LEFT] / (wheel_diam_ / 2.0)); joints_[RIGHT]->SetParam("vel",0, wheel_speed_cmd_[RIGHT] / (wheel_diam_ / 2.0)); joints_[LEFT]->SetParam("fmax",0, torque_); joints_[RIGHT]->SetParam("fmax",0, torque_);
I tried various versions of this.. including just commenting everything. Yes I cleaned and recompiled everytime..
Note: Without Gravity -> no problems, but.. no gravity is not a solution
So what could also happen? damper? weight? I played with kp,kd,mu1/2, mass, inertia nothing helped.
Others had the same issue and for them it worked.. https://github.com/mayfieldrobotics/k... from forum http://answers.ros.org/question/20912... and even used for a "jade" branch https://github.com/yujinrobot/kobuki_... its officially applied..
but its not working (for me)
according to Javier it should work in gazebo4
I have tested the same code in Gazebo4.1.3 and it works like a charm, so it is a Gazebo5 problem. Javier V. Gómez (May 13 '15)
I tried, it didn’t.. (for me..)
-> the error happens already in gazebo4
something in the migration from gazebo2 to gazebo4?
PS: Yes I also tested the execution of my changes by messaging the ROS_INFO_STREAM
what magic ingredient am I missing?