1
$\begingroup$

I am using ubuntu 22.04 humble ros2.

I am trying to run a robot with wheels on gazebo using the differential drive plugin from https://classic.gazebosim.org/tutorials?tut=ros_gzplugins. When i try to launch the gazebo file i get the following error

[gzserver-3] Error [Element.cc:914] Missing element description for [left_joint]
[gzserver-3] Error [Element.cc:914] Missing element description for [right_joint]

i have created a seperate control file and included it in my URDF

The control file looks like this

    <?xml version="1.0" ?>
<robot name="marsrover" xmlns:xacro="http://www.ros.org/wiki/xacro" >

    <gazebo>
  <plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so">

    <!-- Plugin update rate in Hz -->
    <updateRate>100</updateRate>

    <!-- Name of left joint, defaults to `left_joint` -->
    <leftJoint>Revolute 8</leftJoint>

    <!-- Name of right joint, defaults to `right_joint` -->
    <rightJoint>Revolute 10</rightJoint>

    <!-- The distance from the center of one wheel to the other, in meters, defaults to 0.34 m -->
    <wheelSeparation>0.60</wheelSeparation>

    <!-- Diameter of the wheels, in meters, defaults to 0.15 m -->
    <wheelDiameter>0.26</wheelDiameter>

    <!-- Wheel acceleration, in rad/s^2, defaults to 0.0 rad/s^2 -->
    <wheelAcceleration>1.0</wheelAcceleration>

    <!-- Maximum torque which the wheels can produce, in Nm, defaults to 5 Nm -->
    <wheelTorque>50</wheelTorque>

    <!-- Topic to receive geometry_msgs/Twist message commands, defaults to `cmd_vel` -->
    <commandTopic>cmd_vel</commandTopic>

    <!-- Topic to publish nav_msgs/Odometry messages, defaults to `odom` -->
    <odometryTopic>odom</odometryTopic>

    <!-- Odometry frame, defaults to `odom` -->
    <odometryFrame>odom</odometryFrame>

    <!-- Robot frame to calculate odometry from, defaults to `base_footprint` -->
    <robotBaseFrame>base_link</robotBaseFrame>

    <!-- Odometry source, 0 for ENCODER, 1 for WORLD, defaults to WORLD -->
    <odometrySource>1</odometrySource>

    <!-- Set to true to publish transforms for the wheel links, defaults to false -->
    <publishWheelTF>true</publishWheelTF>

    <!-- Set to true to publish transforms for the odometry, defaults to true -->
    <publishOdom>true</publishOdom>

    <!-- Set to true to publish sensor_msgs/JointState on /joint_states for the wheel joints, defaults to false -->
    <publishWheelJointState>true</publishWheelJointState>

    <!-- Set to true to swap right and left wheels, defaults to true -->
    <legacyMode>false</legacyMode>
  </plugin>
</gazebo>

</robot>

My URDF looks like this

<?xml version="1.0" ?>
<robot name="marsrover" xmlns:xacro="http://www.ros.org/wiki/xacro">

<xacro:include filename="$(find marsrover_description)/urdf/materials.xacro" />
<xacro:include filename="$(find marsrover_description)/urdf/marsrover.trans" />
<xacro:include filename="$(find marsrover_description)/urdf/marsrover.gazebo" />
<xacro:include filename="$(find marsrover_description)/urdf/marsrover_control.xacro" />

<link name="base_link">
  <inertial>
    <origin xyz="0.1079014386962853 -0.018704254362633656 0.6454702576619512" rpy="0 0 0"/>
    <mass value="1123.0178027625177"/>
    <inertia ixx="42.702699" iyy="66.247576" izz="91.981429" ixy="-2.722801" iyz="0.096354" ixz="1.746058"/>
  </inertial>
  <visual>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/base_link.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="silver"/>
  </visual>
  <collision>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/base_link.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>
</link>

<link name="rightleg_big_1">
  <inertial>
    <origin xyz="0.08026176688942216 0.02500033810921609 -0.15057691313293592" rpy="0 0 0"/>
    <mass value="22.546629703835407"/>
    <inertia ixx="0.328749" iyy="2.046875" izz="1.727521" ixy="0.0" iyz="-0.0" ixz="0.322481"/>
  </inertial>
  <visual>
    <origin xyz="-0.028011 -0.292969 -0.648297" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/rightleg_big_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="silver"/>
  </visual>
  <collision>
    <origin xyz="-0.028011 -0.292969 -0.648297" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/rightleg_big_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>
</link>

<link name="leftleg_big_1">
  <inertial>
    <origin xyz="0.08026176688941755 -0.02499966189078373 -0.1505769131329358" rpy="0 0 0"/>
    <mass value="22.546629703835407"/>
    <inertia ixx="0.328749" iyy="2.046875" izz="1.727521" ixy="0.0" iyz="-0.0" ixz="0.322481"/>
  </inertial>
  <visual>
    <origin xyz="-0.028011 0.347031 -0.648297" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/leftleg_big_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="silver"/>
  </visual>
  <collision>
    <origin xyz="-0.028011 0.347031 -0.648297" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/leftleg_big_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>
</link>

<link name="rightleg_small_1">
  <inertial>
    <origin xyz="-0.0641436530031968 0.02500033810921981 -0.0835318655770268" rpy="0 0 0"/>
    <mass value="21.006548439283524"/>
    <inertia ixx="0.162855" iyy="1.268194" izz="1.114091" ixy="0.0" iyz="-0.0" ixz="0.048486"/>
  </inertial>
  <visual>
    <origin xyz="0.396172 -0.342969 -0.41332" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/rightleg_small_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="silver"/>
  </visual>
  <collision>
    <origin xyz="0.396172 -0.342969 -0.41332" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/rightleg_small_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>
</link>

<link name="leftleg_small_1">
  <inertial>
    <origin xyz="-0.07117981414108449 -0.02499966189077979 -0.07762348003982011" rpy="0 0 0"/>
    <mass value="21.006548439283524"/>
    <inertia ixx="0.178501" iyy="1.268194" izz="1.098446" ixy="0.0" iyz="-0.0" ixz="0.130339"/>
  </inertial>
  <visual>
    <origin xyz="0.396172 0.397031 -0.41332" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/leftleg_small_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="silver"/>
  </visual>
  <collision>
    <origin xyz="0.396172 0.397031 -0.41332" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/leftleg_small_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>
</link>

<link name="wheel2_1">
  <inertial>
    <origin xyz="4.6187777968942356e-07 -0.08499966189077818 2.1514828360547078e-07" rpy="0 0 0"/>
    <mass value="24.630675452766535"/>
    <inertia ixx="0.231272" iyy="0.343906" izz="0.231272" ixy="0.0" iyz="0.0" ixz="-0.0"/>
  </inertial>
  <visual>
    <origin xyz="0.729843 0.447031 -0.156291" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/wheel2_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="silver"/>
  </visual>
  <collision>
    <origin xyz="0.729843 0.447031 -0.156291" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/wheel2_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>
</link>

<link name="wheel1_1">
  <inertial>
    <origin xyz="-3.179377151552032e-07 0.08500033810922158 -5.305311800984924e-08" rpy="0 0 0"/>
    <mass value="24.630675452766535"/>
    <inertia ixx="0.231272" iyy="0.343906" izz="0.231272" ixy="0.0" iyz="-0.0" ixz="-0.0"/>
  </inertial>
  <visual>
    <origin xyz="0.706171 -0.392969 -0.128188" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/wheel1_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="silver"/>
  </visual>
  <collision>
    <origin xyz="0.706171 -0.392969 -0.128188" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/wheel1_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>
</link>

<link name="wheel4_1">
  <inertial>
    <origin xyz="2.529740886214604e-07 0.08500033810921648 3.7330526453382973e-07" rpy="0 0 0"/>
    <mass value="24.630675452766535"/>
    <inertia ixx="0.231272" iyy="0.343906" izz="0.231272" ixy="0.0" iyz="-0.0" ixz="0.0"/>
  </inertial>
  <visual>
    <origin xyz="0.052627 -0.392969 -0.175811" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/wheel4_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="silver"/>
  </visual>
  <collision>
    <origin xyz="0.052627 -0.392969 -0.175811" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/wheel4_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>
</link>

<link name="wheel26_1">
  <inertial>
    <origin xyz="-7.933437029539192e-08 0.0850003381092132 3.1630714458774634e-07" rpy="0 0 0"/>
    <mass value="24.630675452766535"/>
    <inertia ixx="0.231272" iyy="0.343906" izz="0.231272" ixy="0.0" iyz="0.0" ixz="0.0"/>
  </inertial>
  <visual>
    <origin xyz="-0.434229 -0.342969 -0.191392" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/wheel26_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="silver"/>
  </visual>
  <collision>
    <origin xyz="-0.434229 -0.342969 -0.191392" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/wheel26_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>
</link>

<link name="wheel3_1">
  <inertial>
    <origin xyz="-2.4651678172393776e-07 -0.08499966189078317 2.5749494830806796e-07" rpy="0 0 0"/>
    <mass value="24.630675452766535"/>
    <inertia ixx="0.231272" iyy="0.343906" izz="0.231272" ixy="0.0" iyz="-0.0" ixz="0.0"/>
  </inertial>
  <visual>
    <origin xyz="0.074634 0.447031 -0.146773" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/wheel3_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="silver"/>
  </visual>
  <collision>
    <origin xyz="0.074634 0.447031 -0.146773" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/wheel3_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>
</link>

<link name="wheel5_1">
  <inertial>
    <origin xyz="-7.933437534690668e-08 -0.08499966189078612 3.1630714411590155e-07" rpy="0 0 0"/>
    <mass value="24.630675452766535"/>
    <inertia ixx="0.231272" iyy="0.343906" izz="0.231272" ixy="0.0" iyz="-0.0" ixz="0.0"/>
  </inertial>
  <visual>
    <origin xyz="-0.434229 0.397031 -0.191392" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/wheel5_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="silver"/>
  </visual>
  <collision>
    <origin xyz="-0.434229 0.397031 -0.191392" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/wheel5_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>
</link>

<link name="rightleglink_1">
  <inertial>
    <origin xyz="-0.3354348448034716 0.032519338109216644 -0.666434058596638" rpy="0 0 0"/>
    <mass value="0.16957453765781244"/>
    <inertia ixx="0.000188" iyy="0.000192" izz="6e-06" ixy="0.0" iyz="0.0" ixz="4e-06"/>
  </inertial>
  <visual>
    <origin xyz="-0.363607 -0.31545 -1.399928" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/rightleglink_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="silver"/>
  </visual>
  <collision>
    <origin xyz="-0.363607 -0.31545 -1.399928" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/rightleglink_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>
</link>

<link name="leftleglink_1">
  <inertial>
    <origin xyz="0.40452915519652305 -0.027480661890782798 -0.659159058596637" rpy="0 0 0"/>
    <mass value="0.16957453765781244"/>
    <inertia ixx="0.000188" iyy="0.000192" izz="6e-06" ixy="0.0" iyz="-0.0" ixz="4e-06"/>
  </inertial>
  <visual>
    <origin xyz="0.376357 0.37455 -1.392653" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/leftleglink_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="silver"/>
  </visual>
  <collision>
    <origin xyz="0.376357 0.37455 -1.392653" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/leftleglink_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>
</link>

<link name="boggiemiddleshit_1">
  <inertial>
    <origin xyz="0.13875725093888558 0.027030338109217733 -0.5040354381025404" rpy="0 0 0"/>
    <mass value="0.036370775253551875"/>
    <inertia ixx="2e-06" iyy="2e-06" izz="1e-06" ixy="-0.0" iyz="0.0" ixz="-0.0"/>
  </inertial>
  <visual>
    <origin xyz="0.215019 0.054061 -1.316123" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/boggiemiddleshit_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="silver"/>
  </visual>
  <collision>
    <origin xyz="0.215019 0.054061 -1.316123" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/boggiemiddleshit_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>
</link>

<link name="leftboggielink_1">
  <inertial>
    <origin xyz="0.05639229827838968 9.925958193768292e-06 -0.015470958365142118" rpy="0 0 0"/>
    <mass value="0.16957453765781244"/>
    <inertia ixx="1e-05" iyy="0.00019" izz="0.000186" ixy="-1.6e-05" iyz="2e-06" ixz="1.9e-05"/>
  </inertial>
  <visual>
    <origin xyz="0.075908 -0.342969 -0.822081" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/leftboggielink_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="silver"/>
  </visual>
  <collision>
    <origin xyz="0.075908 -0.342969 -0.822081" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/leftboggielink_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>
</link>

<link name="rightboggielink_1">
  <inertial>
    <origin xyz="0.05639079038116439 -9.154467956962176e-06 -0.015476453623781805" rpy="0 0 0"/>
    <mass value="0.16957453765781244"/>
    <inertia ixx="1e-05" iyy="0.00019" izz="0.000186" ixy="1.6e-05" iyz="-2e-06" ixz="1.9e-05"/>
  </inertial>
  <visual>
    <origin xyz="0.075908 0.397031 -0.822081" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/rightboggielink_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="silver"/>
  </visual>
  <collision>
    <origin xyz="0.075908 0.397031 -0.822081" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/rightboggielink_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>
</link>

<link name="bigboggie_1">
  <inertial>
    <origin xyz="0.00017673760116454496 3.3810921771723623e-07 0.004997178425846904" rpy="0 0 0"/>
    <mass value="2.133721996073983"/>
    <inertia ixx="0.097387" iyy="0.000258" izz="0.097608" ixy="-0.0" iyz="0.0" ixz="8e-06"/>
  </inertial>
  <visual>
    <origin xyz="0.075908 0.027031 -0.822081" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/bigboggie_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="silver"/>
  </visual>
  <collision>
    <origin xyz="0.075908 0.027031 -0.822081" rpy="0 0 0"/>
    <geometry>
      <mesh filename="file://$(find marsrover_description)/meshes/bigboggie_1.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>
</link>

<joint name="Revolute 1" type="fixed">
  <origin xyz="0.028011 0.292969 0.648297" rpy="0 0 0"/>
  <parent link="base_link"/>
  <child link="rightleg_big_1"/>
  <axis xyz="0.0 1.0 -0.0"/>
</joint>

<joint name="Revolute 2" type="fixed">
  <origin xyz="0.028011 -0.347031 0.648297" rpy="0 0 0"/>
  <parent link="base_link"/>
  <child link="leftleg_big_1"/>
  <axis xyz="-0.0 -1.0 0.0"/>
</joint>

<joint name="Revolute 3" type="continuous">
  <origin xyz="-0.424183 0.05 -0.234977" rpy="0 0 0"/>
  <parent link="rightleg_big_1"/>
  <child link="rightleg_small_1"/>
  <axis xyz="0.0 1.0 -0.0"/>
</joint>

<joint name="Revolute 4" type="continuous">
  <origin xyz="-0.424183 -0.05 -0.234977" rpy="0 0 0"/>
  <parent link="leftleg_big_1"/>
  <child link="leftleg_small_1"/>
  <axis xyz="-0.0 -1.0 0.0"/>
</joint>

<joint name="Revolute 6" type="continuous">
  <origin xyz="-0.333671 -0.05 -0.257029" rpy="0 0 0"/>
  <parent link="leftleg_small_1"/>
  <child link="wheel2_1"/>
  <axis xyz="-0.0 -1.0 0.0"/>
</joint>

<joint name="Revolute 7" type="continuous">
  <origin xyz="-0.309999 0.05 -0.285132" rpy="0 0 0"/>
  <parent link="rightleg_small_1"/>
  <child link="wheel1_1"/>
  <axis xyz="0.0 1.0 -0.0"/>
</joint>

<joint name="Revolute 8" type="continuous">
  <origin xyz="0.343545 0.05 -0.237509" rpy="0 0 0"/>
  <parent link="rightleg_small_1"/>
  <child link="wheel4_1"/>
  <axis xyz="0.0 1.0 -0.0"/>
</joint>

<joint name="Revolute 9" type="continuous">
  <origin xyz="0.406218 0.05 -0.456905" rpy="0 0 0"/>
  <parent link="rightleg_big_1"/>
  <child link="wheel26_1"/>
  <axis xyz="0.0 1.0 -0.0"/>
</joint>

<joint name="Revolute 10" type="continuous">
  <origin xyz="0.321538 -0.05 -0.266547" rpy="0 0 0"/>
  <parent link="leftleg_small_1"/>
  <child link="wheel3_1"/>
  <axis xyz="-0.0 -1.0 0.0"/>
</joint>

<joint name="Revolute 11" type="continuous">
  <origin xyz="0.406218 -0.05 -0.456905" rpy="0 0 0"/>
  <parent link="leftleg_big_1"/>
  <child link="wheel5_1"/>
  <axis xyz="-0.0 -1.0 0.0"/>
</joint>

<joint name="Rigid 13" type="fixed">
  <origin xyz="0.008429 0.055 0.142869" rpy="0 0 0"/>
  <parent link="rightleg_big_1"/>
  <child link="rightleglink_1"/>
</joint>

<joint name="Rigid 14" type="fixed">
  <origin xyz="0.008429 -0.055 0.142869" rpy="0 0 0"/>
  <parent link="leftleg_big_1"/>
  <child link="leftleglink_1"/>
</joint>

<joint name="Rigid 20" type="fixed">
  <origin xyz="-0.215019 -0.054061 1.316123" rpy="0 0 0"/>
  <parent link="base_link"/>
  <child link="boggiemiddleshit_1"/>
</joint>

<joint name="Ball 21" type="continuous">
  <origin xyz="0.0 0.37 0.0" rpy="0 0 0"/>
  <parent link="bigboggie_1"/>
  <child link="leftboggielink_1"/>
  <axis xyz="-0.0 -1.0 0.0"/>
</joint>

<joint name="Ball 22" type="continuous">
  <origin xyz="0.0 -0.37 0.0" rpy="0 0 0"/>
  <parent link="bigboggie_1"/>
  <child link="rightboggielink_1"/>
  <axis xyz="-0.0 -1.0 0.0"/>  
</joint>

<joint name="Ball 23" type="continuous">
  <origin xyz="0.112348 -0.005 -0.030915" rpy="0 0 0"/>
  <parent link="rightboggielink_1"/>
  <child link="rightleglink_1"/>
  <axis xyz="-0.0 -1.0 0.0"/>  
</joint>

<joint name="Ball 24" type="continuous">
  <origin xyz="0.112348 0.005 -0.030915" rpy="0 0 0"/>
  <parent link="leftboggielink_1"/>
  <child link="leftleglink_1"/>
  <axis xyz="-0.0 -1.0 0.0"/>  
</joint>

<joint name="Revolute 25" type="fixed">
  <origin xyz="0.139111 0.02703 -0.494042" rpy="0 0 0"/>
  <parent link="boggiemiddleshit_1"/>
  <child link="bigboggie_1"/>
  <axis xyz="0.035366 0.0 0.999374"/>
</joint>

</robot>
$\endgroup$
1
  • $\begingroup$ Fyi: I just removed the ros2_control tag as this is a direct gazebo classic plugin and has nothing to do with ros2_control. $\endgroup$ Commented Jan 8 at 12:00

1 Answer 1

1
$\begingroup$

The docs you are using might be for a newer version of gazebo.

I was getting the same joint errors when using camelCase tags as you have shown.

This file works for me:

<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" >
    <gazebo>
        <plugin name="diff_drive" filename="libgazebo_ros_diff_drive.so">
            <!-- wheel info -->
            <left_joint>left_wheel_joint</left_joint>
            <right_joint>right_wheel_joint</right_joint>
            <wheel_separation>0.35</wheel_separation>
            <wheel_diameter>0.1</wheel_diameter>

            <!-- Limits -->
            <max_wheel_torque>200</max_wheel_torque>
            <max_wheel_acceleration>10.0</max_wheel_acceleration>

            <!-- Output -->
            <odometry_frame>odom</odometry_frame>
            <robot_base_frame>base_link</robot_base_frame>

            <publish_odom>true</publish_odom>
            <publish_odom_tf>true</publish_odom_tf>
            <publish_wheel_tf>true</publish_wheel_tf>
        </plugin>
    </gazebo>
</robot>
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.