ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

you are missing tags in your libgazebo_ros_diff_drive plugin:

<odometrySource>world</odometrySource> <!-- 'encoder' instead of 'world' is also possible -->
<publishTf>1</publishTf>

here is a full example of a correct definition:

  <!-- differential drive -->
<gazebo>
    <plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so">
        <alwaysOn>true</alwaysOn>
        <updateRate>40</updateRate>
        <legacyMode>false</legacyMode>
        <leftJoint>base_right_wheel_joint</leftJoint>
        <rightJoint>base_left_wheel_joint</rightJoint>
        <wheelSeparation>0.39</wheelSeparation>
        <wheelDiameter>0.15</wheelDiameter>
        <torque>5</torque>
        <commandTopic>cmd_vel</commandTopic>
        <odometryTopic>odom</odometryTopic>
        <odometryFrame>odom</odometryFrame>
        <robotBaseFrame>base_link</robotBaseFrame>
        <publishWheelTF>false</publishWheelTF>
        <publishWheelJointState>false</publishWheelJointState>
        <rosDebugLevel>na</rosDebugLevel>
        <wheelAcceleration>0</wheelAcceleration>
        <wheelTorque>5</wheelTorque>
        <odometrySource>world</odometrySource>
        <publishTf>1</publishTf>
    </plugin>
</gazebo>