Caster wheel sample code

asked 2020-02-18 10:22:40 -0500

TorontoRoboticsClub gravatar image

updated 2020-02-22 13:34:23 -0500


Can you please provide a urdf sample for a correctly working caster wheel setup? I have not been able to find such a resource anywhere, and it's a resource that I think is badly needed (considering how many robots use castor wheels).

I have created a repository on github to accompany this question, and this repository contains the following:

  • xacro to build a simplified urdf robot model with two caster wheels and two drive wheels
  • gazebo diff_drive plugin
  • everything needed to launch the robot model in a new world
  • instruction on how to build and launch the project, and how to drive the model around.

I striped everything out of the repository that does not relate to this question. It can be found here:

Here is what it looks like:

image description

Since in the physical world caster wheels can accommodate any diff_drive motion on a flat surface (assuming a heavy enough robot on a smooth surface) it should be possible simulate this in Gazebo. At present the friction tags (<mu1> and <mu2>) in the github package are set to 0.0. Given this setting the robot behaves correctly (as a diff_drive unit), but this looks really ugly in the simulation. I am hoping your answer will allow the friction value to be put back to 1.5 (the value for rubber), while not altering the diff_drive behavior, and will allow Gazebo to visualize the cool motion the castor performs as the robot drives around.

I tried for about 14 hours, and playing around with all these tags: ( I either made the castor wheels bounce, vibrate, turn when they should not, or get in the way of the diff_drive behavior (prevent the correct motion).

Thanks for your help.


Can you describe what's the wrong behavior you're seeing?

I have tried making this work for a while, and between all the edits I have made to the tags related to the caster links and joints, I have seen the casters vibrate, cause the robot to move, sway side to side on the z axis, make the robot sway side to side (like a ship in water), and prevent the diff_drive motion. Instead of focusing on things I do wrong, I created a minimalistic package on github (exclusively for this question), and it's probably best to start from there as it's a clean slate. If you grab the package from github ( and run it (with wireframe view), you will see that the wheel part of the caster unit is rotating. It should not be rotating. at present the <mu1></mu1> and <mu2></mu2>friction tags are at 0.0, and if both those values are set to 1.5 (the values for rubber), the robot will begin to roll. In the minimalistic example the problem I am seeing is that the wheels are moving, and they should not be. if the friction ... (more)

edit retag flag offensive close merge delete


Can you describe what's the wrong behavior you're seeing? You say it "looks really ugly", how so? Also, did you check that the caster steering axes are where you'd expect?

chapulina gravatar imagechapulina ( 2020-02-21 10:12:08 -0500 )edit

@chapulina Could you please see edit #1 in the question? Thanks for your time, and please let me know what other information I may provide.

TorontoRoboticsClub gravatar imageTorontoRoboticsClub ( 2020-02-22 13:18:41 -0500 )edit