Hi there,
I am a bit confused about the gazebo differential drive plugin as it over-write my urdf settings.
The right wheel and left wheel of the robot should be connected to the base_link instead of base_footpirnt.
and the publisher of them should be /robot_state_publisher instead of /gazebo???
here is my differential drive settings:
<gazebo>
<plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so">
<legacyMode>true</legacyMode>
<alwaysOn>true</alwaysOn>
<publishWheelTF>true</publishWheelTF>
<publishTf>1</publishTf>
<wheelSeparation>1.1</wheelSeparation>
<wheelDiameter>0.34</wheelDiameter>
<publishWheelJointState>true</publishWheelJointState>
<updateRate>100.0</updateRate>
<leftJoint>left_wheel_joint</leftJoint>
<rightJoint>right_wheel_joint</rightJoint>
<wheelAcceleration>1.0</wheelAcceleration>
<torque>20</torque>
<commandTopic>/weeding_robot/cmd_vel</commandTopic>
<odometryTopic>/odom</odometryTopic>
<odometryFrame>/odom</odometryFrame>
<robotBaseFrame>/base_footprint</robotBaseFrame>
</plugin>
</gazebo>
and here is the wheel part of the urdf of the robot
<link name="left_wheel">
<inertial>
<origin xyz="0 0 0" rpy="0 0 0"/>
<mass value="2.9" />
<inertia ixx="0.0269397916667" ixy="0.0" ixz="0.0" iyy="0.0269397916667" iyz="0.0" izz="0.04440625"/>
</inertial>
<collision>
<origin rpy="0 0 1.57" xyz="0.07 -0.175 -0.175"/>
<geometry>
<mesh filename="package://weeding_robot_description/models/wheelcollisionBox.STL" scale="0.001 0.001 0.001"/>
</geometry>
</collision>
<visual>
<origin rpy="1.57 0 0" xyz="-0.0677 0.142 -0.1420"/>
<geometry>
<mesh filename="package://weeding_robot_description/models/wheel.STL" scale="0.001 0.001 0.001"/>
</geometry>
<material name="grey"/>
</visual>
</link>
<joint name="left_wheel_joint" type="continuous">
<parent link="base_link"/>
<child link="left_wheel"/>
<origin xyz="-0.572 0.195 -0.03" rpy="0 3.14 0"/>
<axis xyz="1 0 0"/>
</joint>
<transmission name="left_wheel_tran">
<type>transmission_interface/SimpleTransmission</type>
<joint name="left_wheel_joint">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="left_motor">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
thanks for any help.