Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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>
    <geometry>
      <cylinder>
        <radius>.0255</radius>
        <length>.01</length>
      </cylinder>
    </geometry>
  </visual>

  <collision name="left_wheel_collision">
    <pose>0 0 0 0 0 0</pose>
    <geometry>
      <cylinder>
        <radius>.0255</radius>
        <length>.01</length>
      </cylinder>
    </geometry>
    <surface>
      <friction>
        <ode>
          <mu>1000000</mu>
          <mu2>100</mu2>
          <slip1>0</slip1>
          <slip2>0</slip2>
        </ode>
      </friction>
    </surface>
  </collision>
</link>
<joint type="revolute" name="left_wheel_hinge">
  <pose>0 0 0 0 0 0</pose>
  <child>left_wheel</child>
  <parent>ejev</parent>
  <axis>
    <xyz>0 1 0</xyz>
  </axis>
</joint>

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

<inertial>
  <mass>5</mass>
  <pose>0.1 0 0 0 0 0</pose>0.063504
  <inertia>
      <ixx>0.10584</ixx> <!-- I = 1/4*m*(r^2 + 1/4*l^2) -->
      <ixy>0</ixy>
      <ixz>0</ixz>
      <iyy>0.10584</iyy> <!-- I = 1/4*m*(r^2 + 1/4*l^2) -->
      <iyz>0</iyz>
      <izz>0.15876</izz> <!-- I = 0.5*m*l^2 -->
  </inertia>
</inertial>

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.

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>
    <geometry>
      <cylinder>
        <radius>.0255</radius>
        <length>.01</length>
      </cylinder>
    </geometry>
  </visual>

  <collision name="left_wheel_collision">
    <pose>0 0 0 0 0 0</pose>
    <geometry>
      <cylinder>
        <radius>.0255</radius>
        <length>.01</length>
      </cylinder>
    </geometry>
    <surface>
      <friction>
        <ode>
          <mu>1000000</mu>
          <mu2>100</mu2>
          <slip1>0</slip1>
          <slip2>0</slip2>
        </ode>
      </friction>
    </surface>
  </collision>
</link>
<joint type="revolute" name="left_wheel_hinge">
  <pose>0 0 0 0 0 0</pose>
  <child>left_wheel</child>
  <parent>ejev</parent>
  <axis>
    <xyz>0 1 0</xyz>
  </axis>
</joint>

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

<inertial>
  <mass>5</mass>
  <pose>0.1 <pose>0 0 0 0 0 0</pose>0.063504
  <inertia>
      <ixx>0.10584</ixx> <!-- I = 1/4*m*(r^2 + 1/4*l^2) -->
      <ixy>0</ixy>
      <ixz>0</ixz>
      <iyy>0.10584</iyy> <!-- I = 1/4*m*(r^2 + 1/4*l^2) -->
      <iyz>0</iyz>
      <izz>0.15876</izz> <!-- I = 0.5*m*l^2 -->
  </inertia>
</inertial>

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.

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>
    <geometry>
      <cylinder>
        <radius>.0255</radius>
        <length>.01</length>
      </cylinder>
    </geometry>
  </visual>

  <collision name="left_wheel_collision">
    <pose>0 0 0 0 0 0</pose>
    <geometry>
      <cylinder>
        <radius>.0255</radius>
        <length>.01</length>
      </cylinder>
    </geometry>
    <surface>
      <friction>
        <ode>
          <mu>1000000</mu>
          <mu2>100</mu2>
          <slip1>0</slip1>
          <slip2>0</slip2>
        </ode>
      </friction>
    </surface>
  </collision>
</link>
<joint type="revolute" name="left_wheel_hinge">
  <pose>0 0 0 0 0 0</pose>
  <child>left_wheel</child>
  <parent>ejev</parent>
  <axis>
    <xyz>0 1 0</xyz>
  </axis>
</joint>

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

<inertial>
  <mass>5</mass>
  <pose>0 0 0 0 0 0</pose>0.063504
  <inertia>
      <ixx>0.10584</ixx> <!-- I = 1/4*m*(r^2 + 1/4*l^2) 1/3*l^2) -->
      <ixy>0</ixy>
      <ixz>0</ixz>
      <iyy>0.10584</iyy> <!-- I = 1/4*m*(r^2 + 1/4*l^2) 1/3*l^2) -->
      <iyz>0</iyz>
      <izz>0.15876</izz> <!-- I = 0.5*m*l^2 -->
  </inertia>
</inertial>

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.

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>
    <geometry>
      <cylinder>
        <radius>.0255</radius>
        <length>.01</length>
      </cylinder>
    </geometry>
  </visual>

  <collision name="left_wheel_collision">
    <pose>0 0 0 0 0 0</pose>
    <geometry>
      <cylinder>
        <radius>.0255</radius>
        <length>.01</length>
      </cylinder>
    </geometry>
    <surface>
      <friction>
        <ode>
          <mu>1000000</mu>
          <mu2>100</mu2>
          <slip1>0</slip1>
          <slip2>0</slip2>
        </ode>
      </friction>
    </surface>
  </collision>
</link>
<joint type="revolute" name="left_wheel_hinge">
  <pose>0 0 0 0 0 0</pose>
  <child>left_wheel</child>
  <parent>ejev</parent>
  <axis>
    <xyz>0 1 0</xyz>
  </axis>
</joint>

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

<inertial>
  <mass>5</mass>
  <pose>0 0 0 0 0 0</pose>0.063504
0</pose>
  <inertia>
      <ixx>0.10584</ixx> <!-- I = 1/4*m*(r^2 + 1/3*l^2) -->
      <ixy>0</ixy>
      <ixz>0</ixz>
      <iyy>0.10584</iyy> <!-- I = 1/4*m*(r^2 + 1/3*l^2) -->
      <iyz>0</iyz>
      <izz>0.15876</izz> <!-- I = 0.5*m*l^2 -->
  </inertia>
</inertial>

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.

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>
    <geometry>
      <cylinder>
        <radius>.0255</radius>
        <length>.01</length>
      </cylinder>
    </geometry>
  </visual>

  <collision name="left_wheel_collision">
    <pose>0 0 0 0 0 0</pose>
    <geometry>
      <cylinder>
        <radius>.0255</radius>
        <length>.01</length>
      </cylinder>
    </geometry>
    <surface>
      <friction>
        <ode>
          <mu>1000000</mu>
          <mu2>100</mu2>
          <slip1>0</slip1>
          <slip2>0</slip2>
        </ode>
      </friction>
    </surface>
  </collision>
</link>
<joint type="revolute" name="left_wheel_hinge">
  <pose>0 0 0 0 0 0</pose>
  <child>left_wheel</child>
  <parent>ejev</parent>
  <axis>
    <xyz>0 1 0</xyz>
  </axis>
</joint>

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

<inertial>
  <mass>5</mass>
  <pose>0 0 0 0 0 0</pose>
  <inertia>
      <ixx>0.10584</ixx> <ixx>0.092140417</ixx> <!-- I = 1/4*m*(r^2 + 1/3*l^2) -->
      <ixy>0</ixy>
      <ixz>0</ixz>
      <iyy>0.10584</iyy> <iyy>0.092140417</iyy> <!-- I = 1/4*m*(r^2 + 1/3*l^2) -->
      <iyz>0</iyz>
      <izz>0.15876</izz> <!-- I = 0.5*m*l^2 -->
  </inertia>
</inertial>

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.