I tried simulating a differential drive robot in gazebo but it behaves strangely when controlled with teleop_twist.
With the forward command it moves properly but with the backward command it goes in a circle. Here is the URDF code
enter code here
<robot
name="explorer_description">
<link name="base_footprint"/>
<joint name="base_joint" type="fixed">
<parent link="base_footprint"/>
<child link="base_link"/>
<origin xyz="0.0 0.0 0.010" rpy="0 0 0"/>
</joint>
<link
name="base_link">
<inertial>
<origin
xyz="0 0 -0.01"
rpy="0 0 0" />
<mass
value="0.4" />
<inertia
ixx="0.0025025"
ixy="0.0017336"
ixz="0.0020685"
iyy="0.0066445"
iyz="0.000924"
izz="0.0062071" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://explorer_description/meshes/base_link.STL" />
</geometry>
<material
name="">
<color
rgba="0.79216 0.81961 0.93333 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://explorer_description/meshes/base_link.STL" />
</geometry>
</collision>
</link>
<link
name="wheel_left">
<inertial>
<origin
xyz="0 0.002 0"
rpy="0 0 0" />
<mass
value="0.05" />
<inertia
ixx="2.4267E-05"
ixy="0"
ixz="0"
iyy="3.24E-05"
iyz="0"
izz="2.4267E-05" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://explorer_description/meshes/wheel_left.STL" />
</geometry>
<material
name="">
<color
rgba="0.29804 0.29804 0.29804 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://explorer_description/meshes/wheel_left.STL" />
</geometry>
</collision>
</link>
<joint
name="wheel_left_joint"
type="continuous">
<origin
xyz="-0.056 0.0695 -0.0275"
rpy="0 0 0" />
<parent
link="base_link" />
<child
link="wheel_left" />
<axis
xyz="0 1 0" />
</joint>
<link
name="wheel_right">
<inertial>
<origin
xyz="0 -0.002 0"
rpy="0 0 0" />
<mass
value="0.05" />
<inertia
ixx="2.4267E-05"
ixy="0"
ixz="0"
iyy="3.24E-05"
iyz="0"
izz="2.4267E-05" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://explorer_description/meshes/wheel_right.STL" />
</geometry>
<material
name="">
<color
rgba="0.29804 0.29804 0.29804 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://explorer_description/meshes/wheel_right.STL" />
</geometry>
</collision>
</link>
<joint
name="wheel_right_joint"
type="continuous">
<origin
xyz="-0.056 -0.0695 -0.0275"
rpy="0 0 0" />
<parent
link="base_link" />
<child
link="wheel_right" />
<axis
xyz="0 1 0" />
</joint>
<link
name="lidar">
<inertial>
<origin
xyz="0 0 -0.02825"
rpy="0 0 0" />
<mass
value="0.2" />
<inertia
ixx="0.00051467"
ixy="0.00033"
ixz="0.00029"
iyy="0.00089093"
iyz="0.0001914"
izz="0.00095707" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://explorer_description/meshes/lidar.STL" />
</geometry>
<material
name="">
<color
rgba="0.79216 0.81961 0.93333 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://explorer_description/meshes/lidar.STL" />
</geometry>
</collision>
</link>
<joint
name="lidar_joint"
type="fixed">
<origin
xyz="0 9.74576271186439E-05 0.0987"
rpy="0 0 0" />
<parent
link="base_link" />
<child
link="lidar" />
<axis
xyz="0 0 0" />
</joint>
<link ...
I am facing similar problem. did you get it working?