URDF Car model: Joint bounces/wobbles

asked 2016-11-25 05:33:37 -0600

nikku gravatar image

updated 2016-11-25 08:14:22 -0600

Hi there. I'm using Ros Indigo with Gazebo2.

I modeled a car with two fixed rearwheels and two steerable (revolute joints) frontwheels using URDF. When the simulation starts the car falls down in the front. If i reduce the mass of the chassis the car won't fall down in the front anymore but starts to bounce. If I reduce the chassis mass to a small number (1kg) it almost stops bouncing.

My guess is, that this joint can only take a certain amount of weight.

How can I resolve this issue? After all my chassis weighs over 500 kg.

Thanks.

<robot name="erod_macros" xmlns:xacro="http://www.ros.org/wiki/xacro">

<xacro:macro name="wheel" params="wheelname lr fr steerable">



<joint name="wheel_hinge_${wheelname}" type="${steerable}">
    <parent link="chassis"/>
    <child link="wheel_hinge_bearing_${wheelname}"/>
    <origin xyz="${fr*wheel_base/2} ${lr*track_width/2} ${wheel_radius-ground_clearance-chassis_height/2}"  rpy="0 0 0"/>
    <axis> xyz="0 0 1" rpy="0 0 0"
    <limit upper="0" lower="-1.57" velocity="10" effort="1"/>
    </axis>

</joint>

<link name="wheel_hinge_bearing_${wheelname}">
    <inertial>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <mass value="0.0001"/>
        <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="1"/>
    </inertial>
</link>

<!-- Joint: HingeWheel -->
<joint name="wheel_axis_${wheelname}" type="continuous">
  <parent link="wheel_hinge_bearing_${wheelname}"/>
  <child link="wheel_${wheelname}"/>
  <origin xyz="0 0 0" rpy="0 0 0"/>
  <axis xyz="0 ${lr} 0" rpy="0 0 0"/>

</joint>

<!-- Link: Wheel -->
<link name="wheel_${wheelname}">
  <collision>
    <origin xyz="0 0 0" rpy="${Pi/2} 0 0"/>
    <geometry>
      <cylinder length="${wheel_width}" radius="${wheel_radius}"/>
    </geometry>
  </collision>
  <visual>
    <origin xyz="0 0 0" rpy="${lr*Pi/2} 0 0"/>
    <geometry>
             <mesh filename="package://meshes/meshes/rad_eRod.dae"/>            </geometry>
  </visual>
  <inertial>
    <origin xyz="0 0 0" rpy="${Pi/2} 0 0"/>
    <mass value="${wheel_mass}"/>
    <inertia ixx="${wheel_I_rr}" ixy="0.0" ixz="0.0" iyy="${wheel_I_yy}" iyz="0.0" izz="${wheel_I_rr}"/>

  </inertial>
</link>


<!-- Transmission: Steer the wheel -->

<!-- Transmission: Rotate the wheel -->

<gazebo reference="wheel_${wheelname}"> <mu1 value="200.0"/> <mu2 value="200.0"/> <material>Gazebo/Black</material> </gazebo>

</xacro:macro>

</robot>

edit retag flag offensive close merge delete

Comments

What are your gazebo tags and did you set proper joint limits?

Lyndwyrm gravatar imageLyndwyrm ( 2016-11-25 07:16:18 -0600 )edit

I added the relevant snippet of my URDF

nikku gravatar imagenikku ( 2016-11-25 08:13:41 -0600 )edit

Can you try to add proper values for the rest of the gazebo tags speficified in the tutorial? http://gazebosim.org/tutorials/?tut=ros_urdf#%3Cgazebo%3Eelementforthetag

Lyndwyrm gravatar imageLyndwyrm ( 2016-11-28 03:13:33 -0600 )edit