diff_drive_controller only drives straight, no turning
I'm testing out a two wheeled robot I designed and put in gazebo. I also have a static back wheel with very little friction that is only there for structural support. When I give linear x commands the bot drives forward and backward, however any angular z commands are completely ignored and the robot does nothing. My files are as follows:
rover_control.yaml:
rover:
# Publish all joint states -----------------------------------
joint_state_controller:
type: joint_state_controller/JointStateController
publish_rate: 50
mobile_base_controller:
type: "diff_drive_controller/DiffDriveController"
left_wheel: 'motor_wheel_left'
right_wheel: 'motor_wheel_right'
publish_rate: 50.0
pose_covariance_diagonal : [0.001, .001, 1000000., 1000000., 1000000., 1000.]
twist_covariance_diagonal: [0.001, .001, 1000000., 1000000., 1000000., 1000.]
wheel_radius : 0.0508
rover_control.launch
<?xml version='1.0' encoding="UTF-8"?>
<launch>
<rosparam file="$(find rover_description)/config/rover_control.yaml" command="load"/>
<param name="rover/robot_description" command="cat $(find rover_description)/urdf/rover_description.urdf" />
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
output="screen" ns="/rover" args="joint_state_controller
mobile_base_controller"/>
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"
respawn="false" output="screen">
<remap from="/joint_states" to="rover/joint_states"/>
</node>
</launch>
rover_description.urdf
<robot
name="rover_description">
<link
name="base_link">
<inertial>
<origin
xyz="-0.081461 0.072568 0.22578"
rpy="0 0 0" />
<mass
value="0.02" />
<inertia
ixx="0.0017841"
ixy="-2.5191E-21"
ixz="-3.1496E-20"
iyy="0.0031046"
iyz="-3.5569E-22"
izz="0.0013209" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://rover_description/meshes/base_link.STL" />
</geometry>
<material
name="">
<color
rgba="1 1 1 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://rover_description/meshes/base_link.STL" />
</geometry>
</collision>
</link>
<link
name="motor_right">
<inertial>
<origin
xyz="0.025956 0.025203 1.9204E-06"
rpy="0 0 0" />
<mass
value="0.11635" />
<inertia
ixx="2.1884E-05"
ixy="-6.1285E-06"
ixz="1.7317E-08"
iyy="0.00012501"
iyz="-1.7272E-10"
izz="0.00012659" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://rover_description/meshes/motor_right.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://rover_description/meshes/motor_right.STL" />
</geometry>
</collision>
</link>
<joint
name="base_motor_right"
type="fixed">
<origin
xyz="0.024539 -0.097801 0.074156"
rpy="1.5708 0 3.1416" />
<parent
link="base_link" />
<child
link="motor_right" />
<axis
xyz="0 0 0" />
<limit
effort="1"
velocity="0.05" />
</joint>
<link
name="wheel_right">
<inertial>
<origin
xyz="6.9389E-17 -0.0127 0"
rpy="0 0 0" />
<mass
value="0.078876" />
<inertia
ixx="7.3551E-05"
ixy="-5.5111E-11"
ixz="8.4703E-21"
iyy="0.00014131"
iyz="-1.8331E-21"
izz="7.3551E-05" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://rover_description/meshes/wheel_right.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://rover_description/meshes/wheel_right.STL" />
</geometry>
</collision>
</link>
<joint
name="motor_wheel_right"
type="continuous">
<origin
xyz="-0.042 0.019 0"
rpy="0 ...
In what directions do your wheels spin in 1) gazebo 2) rviz when turning?
In both gazebo and rviz the wheels would both spin counter-clockwise and clockwise depending on the value of linear.x.
And with rotational speed only?
Wheels do not move, in both rviz and gazebo
Have you checked the tf in rviz?