# ROS/Gazebo: URDF Error: No valid hardware interface element found in joint

I am fairly new to ROS and Gazebo. I have posted this question on the ROS/Gazebo forums, but they appear to be dead.

I am using ros-kinetic and gazebo7.3 on Ubuntu 16.04. I have been following this tutorial (Tutorial) and have adapted it slightly for my own vehicle (4 wheels instead of 2, skid drive plugin instead of diff drive).

I receive errors when running roslaunch on my own project, and I also get the same errors when using the same command on the completed project provided by the creators of the tutorial, Complete Project Github. I assume that means that I am missing something in ros or Gazebo.

Running:

roslaunch jaguar4x4_gazebo jaguar4x4_world.launch

gives the following errors (repeated for each of the four joint and trans):

[ERROR] [1472045218.311147687, 0.142000000]: No valid hardware interface element found in joint 'left_back_wheel_hinge'.

[ERROR] [1472045218.311359894, 0.142000000]: Failed to load joints for transmission 'left_back_trans'.


Also:

[ERROR] [1472045218.646822285, 0.365000000]: Exception thrown while initializing controller leftfrontWheel_effort_controller. Could not find resource 'left_front_wheel_hinge' in 'hardware_interface::EffortJointInterface'. [ERROR] [WallTime: 1472045219.647578] [1.363000] Failed to load leftfrontWheel_effort_controller [INFO] [WallTime: 1472045219.647938] [1.363000] Loading controller: leftbackwheel_effort_controller [ERROR] [WallTime: 1472045220.651591] [2.366000] Failed to load leftbackwheel_effort_controller

This error is repeated for each of the 4 wheels.

I have seen similar error messages posted online, however, the solutions don’t seem to fix mine (I can't post any more links due to my reputation level).

(1). I already use the hardwareInterface tags

(2). I have already installed ros_control

If anyone has any ideas on how to fix these errors I would appreciate it.

EDIT -------------------------------------------------------------------

I think maybe there is an issue with the way that I have created my joints and the use of the hardwareInterface tags.

In my macros.xacro file I create my joints and link the transmission separately (I repeat this twice for the front and back wheels):

   <joint name="${lr}_front_wheel_hinge" type="continuous"> <parent link="chassis"/> <child link="${lr}_front_wheel"/>
<origin xyz="${+wheelPos-chassisLength+2*wheelRadius}${tY*wheelWidth/2+tY*chassisWidth/2} ${wheelRadius}" rpy="0 0 0" /> <axis xyz="0 1 0" rpy="0 0 0" /> <limit effort="100" velocity="100"/> <joint_properties damping="0.0" friction="0.0"/> </joint>   <transmission name="${lr}_front_trans">
<type>transmission_interface/SimpleTransmission</type>
<joint name="${lr}_front_wheel_hinge" /> <actuator name="${lr}_front_Motor">
<hardwareInterface>EffortJointInterface</hardwareInterface>
<mechanicalReduction>10</mechanicalReduction>
</actuator>
</transmission>


Doing it this way gives the errors mentioned above, but my model in Gazebo appears.

If I try to merge both of these blocks so that there is just one joint tag wrapped by the transmission tags then I get the following error and my model does not appear in Gazebo:

[ERROR] [1473672367.041892175]: Failed to find root link: Two root links found: [footprint] and [left_back_wheel]

I don't understand why I get this error because I have a joint between my chassis base link and the world in my Jaguar4x4.xacro file :

 <link name="footprint" />

<joint name="base_joint" type="fixed">