How to move 4 wheeled robot
I have created a URDF (in Xacro format) which has 4 wheels.
I added the skid-steer Gazebo plugin and amended the joints information etc. When I exeute my launch file /cmd_vel is in my topics list but my model does not move in either rviz nor gazebo when I publish commands to /cmd_vel.
Below is my xacro file:
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="test_bot">
<xacro:include filename="$(find sweep_bot)/urdf/sensors/camera.xacro"/>
<xacro:include filename="$(find sweep_bot)/urdf/actuators/wheels.xacro"/>
<xacro:include filename="$(find sweep_bot)/urdf/sensors/MultiCamera.xacro"/>
<!-- body -->
<xacro:property name="chasis_length" value="1.0"/>
<xacro:property name="chasis_heigth" value="0.45"/>
<xacro:property name="chasis_width" value="0.5"/>
<link name="chasis">
<inertial>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<mass value="1.0"/>
<inertia ixx="0.4" ixy="0.0" ixz="0.0" iyy="0.4" iyz="0.0" izz="0.2"/>
</inertial>
<visual name="">
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<geometry>
<box size="${chasis_length} ${chasis_heigth} ${chasis_width}"/>
</geometry>
<material name="">
<color rgba="0.0 1.0 0.0 1.0"/>
<!-- <texture filename=""/> -->
</material>
</visual>
<collision>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<geometry>
<box size="${chasis_length} ${chasis_heigth} ${chasis_width}"/>
</geometry>
</collision>
</link>
<gazebo reference='chasis'>
<material>Gazebo/Orange</material>
</gazebo>
<!-- WHEELS -->
<xacro:property name="wheel_radius" value="0.1"/>
<xacro:property name="wheel_length" value="0.1"/>
<xacro:property name="wheel_rpy" value="1.55 0.0 0.0"/>
<xacro:macro name="wheel" params="side position flip alt">
<xacro:property name="wheel_xyz" value="${alt * 0.3} ${flip * 0.2} -0.25"/>
<link name="wheel_${side}_${position}">
<inertial>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<mass value="1.0"/>
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
</inertial>
<visual name="">
<origin xyz="${wheel_xyz}" rpy="${wheel_rpy}"/>
<geometry>
<cylinder radius="${wheel_radius}" length="${wheel_length}"/>
</geometry>
<material name="">
<color rgba="1.0 0.0 0.0 1.0"/>
<texture filename=""/>
</material>
</visual>
<collision>
<origin xyz="${wheel_xyz}" rpy="${wheel_rpy}"/>
<geometry>
<cylinder radius="${wheel_radius}" length="${wheel_length}"/>
</geometry>
</collision>
</link>
<gazebo reference='"wheel_${side}_${position}'>
<material>Gazebo/Red</material>
</gazebo>
<joint name="body_wheel_${side}_${position}_joint" type="revolute">
<parent link="chasis"/>
<child link="wheel_${side}_${position}"/>
<limit lower="0.0" upper="0.0" effort="0.0" velocity="0.0"/>
</joint>
</xacro:macro>
<xacro:wheel side="left" position="fore" flip='1' alt='1'/>
<xacro ...