Robotics StackExchange | Archived questions

URDF Error No valid hardware interface element found in joint

Dear all,

I am fairly new to ROS and Gazebo.

I am using ros-kinetic and gazebo7.3 on Ubuntu 16.04. I have been following this tutorial (http://www.generationrobots.com/blog/en/2015/02/robotic-simulation-scenarios-with-gazebo-and-ros/) 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 get the same errors when using the same command on the project provided at the above link. I assume that means that I am missing something in ros or Gazebo.

Running:

roslaunch jaguar4x4gazebo jaguar4x4world.launch

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

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

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

Also:

[ERROR] [1472045218.646822285, 0.365000000]: Exception thrown while initializing controller leftfrontWheeleffortcontroller. Could not find resource 'leftfrontwheelhinge' in 'hardwareinterface::EffortJointInterface'. [ERROR] [1472045218.646923303, 0.366000000]: Initializing controller 'leftfrontWheeleffortcontroller' failed [ERROR] [WallTime: 1472045219.647578] [1.363000] Failed to load leftfrontWheeleffortcontroller [INFO] [WallTime: 1472045219.647938] [1.363000] Loading controller: leftbackwheeleffortcontroller [ERROR] [1472045219.650602709, 1.366000000]: Could not load controller 'leftbackwheeleffortcontroller' because the type was not specified. Did you load the controller configuration on the parameter server (namespace: '/jaguar4x4/leftbackwheeleffortcontroller')? [ERROR] [WallTime: 1472045220.651591] [2.366000] Failed to load leftbackwheeleffortcontroller

This error is repeated for each of the 4 wheels.

I have seen similar error messages posted on this site, the solutions don’t seem to fix mine.

(1). http://answers.gazebosim.org/question/6654/gazeboos-x-109-no-valid-hardware-interface-element-found-in-joint/

I already use the hardwareInterface tags

(2). I have already installed ros_control

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 [leftbackwheel]

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">
   <parent link="footprint"/>
   <child link="chassis"/>
 </joint>

I now get a number of errors when trying to combine the joint and transmission blocks, so I imagine that this is not the best way to go?

Edit 2 -------------------------------------------------------------------------

Here is my jaguar4x4control/config/jaguar4x4control.yaml file:

jaguar4x4:
  # Publish all joint states -----------------------------------
  joint_state_controller:
    type: joint_state_controller/JointStateController
    publish_rate: 50  


  # Effort Controllers ---------------------------------------
  leftfrontWheel_effort_controller:
    type: effort_controllers/JointEffortController
    joint: left_front_wheel_hinge
    pid: {p: 100.0, i: 0.1, d: 10.0}
  leftbackWheel_effort_controller:
    type: effort_controllers/JointEffortController
    joint: left_back_wheel_hinge
    pid: {p: 100.0, i: 0.1, d: 10.0}
  rightfrontWheel_effort_controller:
    type: effort_controllers/JointEffortController
    joint: right_front_wheel_hinge
    pid: {p: 100.0, i: 0.1, d: 10.0}
  rightbackWheel_effort_controller:
    type: effort_controllers/JointEffortController
    joint: right_back_wheel_hinge
    pid: {p: 100.0, i: 0.1, d: 10.0}

Asked by LukeT on 2016-08-24 08:48:42 UTC

Comments

Try transmission_interface/SimpleTransmission EffortJointInterface /> EffortJointInterface 10

Could you give the config file for your gazebo ros controller?

Asked by GuillaumeB on 2016-09-29 06:02:21 UTC

@GuillaumeB sorry for the slow response. I tried the code but I get the same errors. I have attached my config file

Asked by LukeT on 2016-10-11 05:23:10 UTC

Your config file seems correct. have you : /robot_gazebo

in your urdf?

you really need to specify the hardwareinterface twice in the . One time for the and one time for the

Asked by GuillaumeB on 2016-10-14 04:32:16 UTC

@GuillaumeB I do have that code in my URDF. I tried adding the additional hardwareInterface but that didn't work. I really thought it had worked but it was just another model that was still appearing in my gazebo.

I still get the controller spawner warning and an error stating that a process had died

Asked by LukeT on 2016-10-24 06:27:58 UTC

I have now created a new model using a single .world file. (I followed this tutorial mostly http://machineawakening.blogspot.co.uk/2015/05/controlling-differential-drive-robot-in.html). I can use the turtlesim teleop key node and I can use twist commands. I just now need to work out how to publish twist command via scripts and process images etc.

Do you think it is worth me giving up on the URDF one do you see any future issues with this single file approach?

Asked by LukeT on 2016-10-24 06:37:59 UTC

Using only one file is not 'modular' but if you just need something to work as soon as possible use this. If you are still interrested in using your URDF and gazebo_ros_controller please see -> http://www.generationrobots.com/blog/en/2015/02/robotic-simulation-scenarios-with-gazebo-and-ros/ I found that it was a pretty complete tutorial

Asked by GuillaumeB on 2016-10-24 11:18:14 UTC

@GuillaumeB Thanks for the help, that was actually the tutorial I used. However, as I mentioned in the original post I couldn't actually run the code supplied by that tutorial, I received the same errors as the one that I have on my own code. It'd be good if I could get the URDF working eventually, but I think for now it is probably best to make some progress so I will use the single file for now. Thanks again for the help.

Asked by LukeT on 2016-10-25 04:16:26 UTC

Were there any solutions for this problem? I recently got the same kind of error and cannot figure out what the problem is: link text

Asked by juan on 2018-01-01 21:17:35 UTC

Answers

Were there any solutions for this problem? I recently got the same kind of error and cannot figure out what the problem is: link text

Asked by juan on 2018-01-01 21:17:25 UTC

Comments