diff_drive_controller makes robot move faster in RViz compared to Gazebo
My robot moves faster in RViz than in Gazebo. I'm using diff_drive_controller to make my robot move in Gazebo. I noticed that the robot rotates and moves faster in RViz. I checked it by placing a camera in my robot urdf and placing a blue cube in Gazebo in front of the robot. Then on rotating the robot, the RViz image output shows the blue cube when the robot is at a different z-orientation compared to its previous z-orientation wherein the blue cube was visible.
You can download my package from here and run the following command:
roslaunch rosbots_description gazebo_n_rviz_visualize.launch
Then you can place the blue cube in Gazebo by running this command:
rosrun gazebo_ros spawn_model -file /home/hashim/catkin_ws/src/rosbots_description/urdf/object.urdf -urdf -x 1 -y 0 -z 1 -model my_object
Then publish velocity commands on the topic rosbots/mobile_base_controller/cmd_vel using this gui:
rosrun rqt_robot_steering rqt_robot_steering
I researched quite a lot on google but could not find an answer. Thanks!
If you've already figured this out, please post your answer. If not, the wheel radius in your controller configuration (my_rosbot_controller.yaml, line 19) is 0.26 m, while the URDF shows a wheel radius of 0.23 (my_robots.xacro, lines 289 and 329). I'm not sure that's the cause as I didn't try running it, but it's worth looking into.