Robot moves but wheels are not Rotating

asked 2019-11-17 10:27:07 -0600

Irudhaya gravatar image

I am building a four wheeled mecanum robot with ROS interface. In order to do the simulation I used gazebo and the I used planar plugin to provide the inverse kinematics to the wheels. But, when I publish the velocity commands to the robot, I found that only the robot is moving without rotating the wheels. It seems that the the base of the the robot just slides without rotating the wheels.I am using gazebo version 9

Is there any solutions to fix it...

Here you can find the URDF of my file,

 <robot name="ROSBOT">

<gazebo>
    <plugin name="mecanum_drive" filename="libgazebo_ros_planar_move.so">
      <commandTopic>cmd_vel</commandTopic>
      <odometryTopic>odom</odometryTopic>
      <odometryFrame>odom</odometryFrame>
      <odometryRate>50.0</odometryRate>
      <robotBaseFrame>base_footprint</robotBaseFrame>
      <publishTF>true</publishTF>
      <publishOdomTF>true</publishOdomTF>
    </plugin>
 </gazebo>

<gazebo reference="laser">
    <sensor type="ray" name="rp_lidar_sensor">
      <pose>
        <x>0.0</x>
        <y>0.0</y>
        <z>0.0</z>
        <r>0.0</r>
        <p>0.0</p>
        <y>0.0</y>
      </pose>
      <visualize>false</visualize>
      <update_rate>50</update_rate>
      <ray>
        <scan>
          <horizontal>
            <samples>360</samples>
            <resolution>1</resolution>
            <min_angle>0.0</min_angle>
            <max_angle>6.28319</max_angle>
          </horizontal>
        </scan>
        <range>
          <min>0.120</min>
          <max>3.5</max>
          <resolution>0.015</resolution>
        </range>
        <noise>
          <type>gaussian</type>
          <mean>0.0</mean>
          <stddev>0.01</stddev>
        </noise>
      </ray>
      <plugin name="gazebo_ros_lds_lfcd_controller" filename="libgazebo_ros_laser.so">
        <topicName>scan</topicName>
        <frameName>laser</frameName>
      </plugin>
    </sensor>
  </gazebo>
<gazebo reference="base_link">
    <material>Gazebo/Yellow</material>
</gazebo>

<gazebo reference="front_right_wheel_link">
    <material>Gazebo/Green</material>
    <mu1 value="0.1"/>
    <mu2 value="0."/>
    <kp value="50000.0" />
    <kd value="10.0" />
    <fdir1 value="1 0 0"/>
    <minDepth>0.001</minDepth>
    <maxVel>0.1</maxVel>  
</gazebo>

<gazebo reference="front_left_wheel_link">
    <material>Gazebo/Green</material>
    <mu1 value="0.1"/>
    <mu2 value="0."/>
    <kp value="50000.0" />
    <kd value="10.0" />
    <fdir1 value="1 0 0"/>
    <minDepth>0.001</minDepth>
    <maxVel>0.1</maxVel>  
</gazebo>

<gazebo reference="back_right_wheel_link">
    <material>Gazebo/Green</material>
    <mu1 value="0.1"/>
    <mu2 value="0."/>
    <kp value="50000.0" />
    <kd value="10.0" />
    <fdir1 value="1 0 0"/>
    <minDepth>0.001</minDepth>
    <maxVel>0.1</maxVel>  
</gazebo>

<gazebo reference="back_left_wheel_link">
    <material>Gazebo/Green</material>
    <mu1 value="0.1"/>
    <mu2 value="0."/>
    <kp value="50000.0" />
    <kd value="10.0" />
    <fdir1 value="1 0 0"/>
    <minDepth>0.001</minDepth>
    <maxVel>0.1</maxVel>  
</gazebo>

    <!--<link name="map"/>



    <joint name="map_odom" type="fixed">
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <parent link="map"/>
        <child link="odom"/>
    </joint>

    <joint name="odom_base_footprint" type="fixed">
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <parent link="odom"/>
        <child link="base_footprint"/>
    </joint>-->
    <!--<link name="odom"/>
    <joint name="odom_base_footprint" type="fixed">
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <parent link="odom"/>
        <child link="base_footprint"/>
    </joint>-->

    <link name="base_footprint"/>

    <material name="yellow">
        <color rgba="0 1 1 1"/>
    </material>

    <material name="green">
        <color rgba="0 1 0 1"/>
    </material>

    <link name="base_link">
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <box size="0.45 0.30 0.05"/>
            </geometry>
            <material name="yellow ...
(more)
edit retag flag offensive close merge delete

Comments

Hi, were you able to solve this? I am facing the same issue.

cygnus gravatar imagecygnus ( 2022-01-11 13:09:53 -0600 )edit