Gazebo | Ignition | Community
Ask Your Question

Double caster wheel problem

asked 2013-02-11 18:36:19 -0600

pablogaralv gravatar image

updated 2013-02-14 11:02:19 -0600

Hi guys, I'm trying to implement a double wheeled caster. Obviously it's different from the other one of the tutorial, which it's a sphere.

My new caster works well, except when the model try to turn 180º. At this point, the joint doesn't turn 180º only, it continues turning...

Here is the code of my caster: (PASTED IN PASTEBIN) Here you have a picture with the bot having the issue:

I tried with different types of joints, parameters as physics or surface with mu, etc. but nothing better (maybe I was doing wrong).

Sorry for my English and thank you very much!

EDIT 1: The limits are not the solution. I've tried the limit to PI (180 degrees are PI rads) and the behavior isn't good. The caster should turn totally free, but without affect the model chassis. It's like if the caster has more priority or weight at the moment of turning or movement.

A video better than 1000 words:

EDIT 2: I've applied the force to the joints of big wheels, not to the caster wheels. Caster wheels is always at 0 N/m². I want a behavior similar as the office chairs casters, only joint, without force.

EDIT 3: Matrix, Dumping, and many other intents of modify the physical or dynamic properties of the joint and nothing. Absolutely nothing. I paste the code of the robot and the castor models here, maybe you can see something wrong or try to implement the model in Gazebo (I'm in 1.3.1): Model: Double wheel castor:

A little explanation from the castor: is a unique link for the body (with 3 parts, in 'S' form). At the top of this, there is a small cylinder to joint the castor with another model. And below are 1 collision (instead 2, 1 for each wheel) and 2 visual (1 for each wheel).

The name of the parts are in Spanish: Rueda = Wheel Eje = Axis/Hing Castor = Caster Izq = Left Der = Right

I don't know how much difficult could be this to's too simple: the castor must stop turning when the robot acquires a direction! :D

SOLUTION: As my German friend saids, the intertial matrix had the solution. Changing some values I have obtained a best behavior. Video: It's not perfect, but better by far from the first one.

The code of this castor:

Thank you !!

Now, I will try to improve the behavior :)

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

answered 2013-02-14 12:25:45 -0600

ffurrer gravatar image

updated 2013-02-14 12:34:38 -0600

Hi I quickly tried to make your model work as I would want it to look.

What I figured is that you didn't add any rotational part of the castor wheel itself, so this should be something like this (I just added the left wheel of the castor wheel):

<link name="left_wheel">
  <pose>0.0295 0.0087 0.0255 0 1.5707 1.5707</pose>
  <visual name='left_wheel_visual'>
    <pose>0 0 0 0 0 0</pose>

  <collision name="left_wheel_collision">
    <pose>0 0 0 0 0 0</pose>
<joint type="revolute" name="left_wheel_hinge">
  <pose>0 0 0 0 0 0</pose>
    <xyz>0 1 0</xyz>

If you add this I got an expected behaviour, you probably also want to add some inertial properties to your chassis link:

  <pose>0 0 0 0 0 0</pose>
      <ixx>0.092140417</ixx> <!-- I = 1/4*m*(r^2 + 1/3*l^2) -->
      <iyy>0.092140417</iyy> <!-- I = 1/4*m*(r^2 + 1/3*l^2) -->
      <izz>0.15876</izz> <!-- I = 0.5*m*l^2 -->

And yes you probably also want to add inertial properties to the wheels and the rod and you want to make sure that you have friction coefficients such that the wheel doesn't slip. I usually display the joints, by right clicking on the model ->view->joints.

Hope that helps.

edit flag offensive delete link more


Hi! I have 3 doubts for you: 1-Why you use these values in mu and mu2 when these parameters only take a value between 0 and 1? 2-Why you add a new wheel to the caster? Look at my model, I have 2 visuals (left and right) but only 1 collision to less restrictions in the physical engine. 3-Where can I find the formulas you used? Is a rectangular box, and I haven't got the same values (having care the different mass value, of course). However, thanks you for your purpose! I'll try it.

pablogaralv gravatar imagepablogaralv ( 2013-02-15 03:57:34 -0600 )edit

@pablogaralv: 1. yes you are right, my mu values were arbitrary and I copied them from some other model and the documentation of sdf states that the values should be between 0 and 1 including boundaries but in the code (as far as I looked into it) this is never enforced and ODE also just suggests values around 1. 2. you don't necessarily need this, but having a wheel would give you a better behaviour in the sense that it actually rolls in one direction and blocks in the other. 3.not enough chars

ffurrer gravatar imageffurrer ( 2013-02-15 11:56:43 -0600 )edit

@pablogaralv: 3. this are simple inertias for a cylinder; as you have this as your body: <cylinder> <radius>0.252</radius> <length>0.175</length> </cylinder> you can find the formulas for the different axis of a cylinder on:

ffurrer gravatar imageffurrer ( 2013-02-15 11:59:38 -0600 )edit

answered 2013-02-12 02:35:38 -0600

AndreiHaidu gravatar image

updated 2013-02-12 12:58:54 -0600


If you want to have the maximum turning points of +/-180 degrees you could add limits (in radians) to the joint.

If you don't want to have limits, then maybe you just added to turn in degrees and not in radians, and that is why it does not stop (just and assumption).


As I saw in the video you added a force to the joint, meaning that the added force will always be applied on the joint, until you change it (for example you had -1 , if at a moment you will put +1 the wheel will turn in the other direction).

I you want to change the position of the joint, then go to the 'Position' tab and add there values.


Then, another thing that could make the wheel start turning is the lack of the rotational inertia matrix in your sdf file. Values can be computed with the help of this wikipedia page.

Here is an example (maybe try these values before computing more accurate ones):

        <pose>0 0 0 0 0 0</pose>


edit flag offensive delete link more


As I edited in my initial answer, the force I've applied was to the 2 big wheels, not to the caster. My only purpose is that the caster turn only with when the cassis change his direction, and avoid keep turning as I show in the video.

pablogaralv gravatar imagepablogaralv ( 2013-02-12 10:02:51 -0600 )edit

Fine! Finally, after many changes of the inertial matrix, I achieved best behavior, it's not perfect yet but it's something. I will upload a video to youtube to show the result. And I will edit the initial post with the new code ;)

pablogaralv gravatar imagepablogaralv ( 2013-02-14 10:45:12 -0600 )edit

answered 2013-02-13 12:58:36 -0600

nkoenig gravatar image

You can try adding a damping term to the caster joint:

edit flag offensive delete link more


I've tried with random values of damping and friction and nothing better...I pasted the complete code of both models in pastebin to better comprehension.

pablogaralv gravatar imagepablogaralv ( 2013-02-13 18:55:47 -0600 )edit

Question Tools


Asked: 2013-02-11 18:36:19 -0600

Seen: 5,201 times

Last updated: Feb 14 '13