Ask Your Question
0

Can't parse transmissions. Invalid robot description.

asked 2020-07-14 22:31:29 -0500

Khule gravatar image

I want to simulate my robotic arm in gazebo. This error is coming whenever I am spawning my robot in gazebo and I can't able to load any of my joint_position controllers. I am attaching my urdf , control.yaml, and the launch files. error when spawning the robot

[ERROR] [1594782495.582555693, 0.326000000]: Can't parse transmissions. Invalid robot description.
[ERROR] [1594782495.669790261, 0.326000000]: Error document empty.

error when loading the controllers:

[ERROR] [1594783081.365081451, 539.791000000]: Exception thrown while initializing controller joint_1_position_controller.
Could not find resource 'joint_1' in 'hardware_interface::EffortJointInterface'.
[ERROR] [1594783081.365288101, 539.791000000]: Initializing controller 'joint_1_position_controller' failed

error while loading controller in another terminal

 Loading controller: joint_1_position_controller
    [ERROR] [1594783082.375160, 540.688000]: Failed to load joint_1_position_controller
    [INFO] [1594783082.375588, 540.688000]: Loading controller: joint_2_position_controller
    [ERROR] [1594783083.453085, 541.622000]: Failed to load joint_2_position_controller

This is my controller file

test_1_urdf:
#publish all joint states ------
  joint_state_controller:
    type: joint_state_controller/JointStateController
    publish_rate: 50

#position Controllers
  joint_1_position_controller:
    type: effort_controllers/JointPositionController
    joint: joint_1
    pid: {p: 100.0 , i: 0.01 , d: 10 }
  joint_2_position_controller:
    type: effort_controllers/JointPositionController
    joint: joint_2
    pid: {p: 100.0 , i: 0.01 , d: 10 }
  joint_3_position_controller:
    type: effort_controllers/JointPositionController
    joint: joint_3
    pid: {p: 100.0 , i: 0.01 , d: 10 }
  joint_4_position_controller:
    type: effort_controllers/JointPositionController
    joint: joint_4
    pid: {p: 100.0 , i: 0.01 , d: 10 }
  joint_5_position_controller:
    type: effort_controllers/JointPositionController
    joint: joint_5
    pid: {p: 100.0 , i: 0.01 , d: 10 }

This my urdf file

<?xml version="1.0"?>
<!-- This URDF was automatically created by SolidWorks to URDF Exporter! Originally created by Stephen Brawner (brawner@gmail.com) 
     Commit Version: 1.5.1-0-g916b5db  Build Version: 1.5.7152.31018
     For more information, please see http://wiki.ros.org/sw_urdf_exporter -->
<robot
  name="test_1_urdf">

 <!-- <link name="world"/>
  <joint name="fixed" type="fixed">
    <parent name="world"/>
    <chile name="base_link"/>
  </joint>-->

  <link
    name="base_link">
    <inertial>
      <origin
        xyz="0.026901 0.024709 -0.0098697"
        rpy="0 0 0" />
      <mass
        value="0.34742" />
      <inertia
        ixx="0.00046368"
        ixy="-2.9001E-06"
        ixz="-3.7543E-19"
        iyy="0.0010571"
        iyz="-5.1522E-19"
        izz="0.00076443" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://test_1_urdf/meshes/base_link.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.79216 0.81961 0.93333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://test_1_urdf/meshes/base_link.STL" />
      </geometry>
    </collision>
  </link>
  <link
    name="link_1">
    <inertial>
      <origin
        xyz="-0.033996 0.053779 0.0013632"
        rpy="0 0 0" />
      <mass
        value="0.62403" />
      <inertia
        ixx="0.00055304"
        ixy="3.8373E-06"
        ixz="1.4793E-07"
        iyy="0.00073956"
        iyz="-2.5812E-09"
        izz="0.00076923" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://test_1_urdf/meshes/link_1.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.79216 0.81961 0.93333 1" />
      </material> ...
(more)
edit retag flag offensive close merge delete

Comments

Hi, @Khule

Maybe the problem is how you specify your transmission and the ROS control plugin params. From my own projects I use transmission like this:

<transmission name="trans_1">
  <type>transmission_interface/SimpleTransmission</type>
  <joint name="joint_1">
    <hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
  </joint>
  <actuator name="motor_1">
    <mechanicalReduction>1</mechanicalReduction>
  </actuator>
 </transmission>

An the plugin like this:

<gazebo>
  <plugin filename="libgazebo_ros_control.so" name="ros_control"
   <robotNamespace>/test_1_urdf</robotNamespace>
   <robotParam>robot_description</robotParam>
   <controlPeriod>0.001</controlPeriod>
   <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType
   <legacyModeNS>true</legacyModeNS>
  </plugin>    
</gazebo>

Maybe the most important part is the robotSimType param since you are using Gazebo.

Weasfas gravatar image Weasfas  ( 2020-07-15 06:21:16 -0500 )edit

Hi Weasfas, I try your code also but same error is coming. That is transmission in not loaded in the gazebo.

Khule gravatar image Khule  ( 2020-07-15 13:52:54 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-07-16 08:10:11 -0500

Weasfas gravatar image

updated 2020-07-16 08:12:40 -0500

Hi @Khule,

I will post this as an answer since to not have a cap in the max characters.

I took the liberty of using/modifying your files in order to solve the problem and I came up with this solution. In my last comment I said that the problem maybe the transmissions:

<transmission name="trans_1">
  <type>transmission_interface/SimpleTransmission</type>
  <joint name="joint_1">
    <hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
  </joint>
  <actuator name="motor_1">
    <mechanicalReduction>1</mechanicalReduction>
  </actuator>
 </transmission>

And that is technicaally not true since the proper definition seems to be:

<transmission name="tran1">
  <type>transmission_interface/SimpleTransmission</type>
  <joint name="joint_1">
    <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
  </joint>
  <actuator name="motor1">
    <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
    <mechanicalReduction>1</mechanicalReduction>
  </actuator>
</transmission>

At least with the effort controllers, I used in the past the velocity ones and I did not need the hardwareInterface on the actuator part. In fact the official documentation says that the tag should be placed only in the joint but from my experience with your description if you do that the joint_state_controller is unable to produce a proper tf tree and ROS_control will not work since that tree is broken.

For this reason what I have done is properly instantiated new transmission, tidy up your description and provide full proper configuration and launchers. So I will post here all this files and hope this can help you.

The description should look like this:

<?xml version="1.0"?>
<!-- This URDF was automatically created by SolidWorks to URDF Exporter! Originally created by Stephen Brawner (brawner@gmail.com) 
     Commit Version: 1.5.1-0-g916b5db  Build Version: 1.5.7152.31018
     For more information, please see http://wiki.ros.org/sw_urdf_exporter -->
<robot name="test_1_urdf">
  <link name="world"/>

  <joint name="fixed" type="fixed">
    <parent link="world"/>
    <child link="base_link"/>
  </joint>

  <link name="base_link">
    <inertial>
      <origin xyz="0.026901 0.024709 -0.0098697" rpy="0 0 0" />
      <mass value="0.34742" />
      <inertia
        ixx="0.00046368" ixy="-2.9001E-06" ixz="-3.7543E-19"
        iyy="0.0010571"  iyz="-5.1522E-19" izz="0.00076443" />
    </inertial>
    <visual>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://test_1_urdf/meshes/base_link.STL" />
      </geometry>
      <material name="base_link_material">
        <color rgba="0.79216 0.81961 0.93333 1" />
      </material>
    </visual>
    <collision>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <mesh filename="package://test_1_urdf/meshes/base_link.STL" />
      </geometry>
    </collision>
  </link>

  <joint name="joint_1" type="revolute">
    <origin xyz="0 0.01 0" rpy="1.5708 0 0" />
    <parent link="base_link" />
    <child link="link_1" />
    <axis xyz="0 1 0" />
    <limit lower="-1.57" upper="1.57" effort="10" velocity="1" />
  </joint>

  <link name="link_1">
    <inertial>
      <origin xyz="-0.033996 0.053779 0.0013632" rpy="0 0 0" />
      <mass value="0.62403" />
      <inertia
        ixx="0.00055304" ixy="3.8373E-06"  ixz="1.4793E-07"
        iyy="0.00073956 ...
(more)
edit flag offensive delete link more

Comments

Thank you Weasfas. It worked for me finally. I am stuck on that problem for 3 weeks Thank you sooo much Weasfas. I can not able express my gratitude in words. Atlast thank you again.

Khule gravatar image Khule  ( 2020-07-16 13:19:56 -0500 )edit

Hi @Khule,

Glad to heard that!

If you do not mind can you check the answer as valid? to let others know that the solution is viable.

Thanks! =)

Weasfas gravatar image Weasfas  ( 2020-07-16 14:33:13 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-07-14 22:31:29 -0500

Seen: 160 times

Last updated: Jul 16 '20