Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Problem with conversion from URDF to SDF

Hello. Ubuntu 12.04, ROS Hydro, Gazebo 1.9.3

I have successfully ran the rrbot demo in Gazebo; the 3 linkages load, and I can control them from the command line. All very good. Based on that success, I want to extend that to a larger model: 1 World link, 9 joints, 9 links. So, I just add some more links, joints, and transmission elements in hopes that would all work. However, it all goes wrong. If anyone has any insight to this, that would be greatly appreciated -- I've been banging my head against the wall for a couple days on this one.

Issue#1: Gazebo doesn't seem to load to the model. Issue#2: That problem seems to come from the conversion from URDF to SDF, as seen from gzsdf print:

<sdf version="1.4"> <model name="6dof"> <static>0</static> <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so"> <robotnamespace>/6dof</robotnamespace> </plugin> <link name="__default__"> <velocity_decay> <linear>0</linear> <angular>0</angular> </velocity_decay> </link> </model> </sdf>

Whereas my URDF model is much larger:

<?xml version="1.0" ?>

<robot name="6dof" xmlns:xacro="http://ros.org/wiki/xacro"> <gazebo> <plugin filename="libgazebo_ros_control.so" name="gazebo_ros_control"> <robotnamespace>/6dof</robotnamespace> </plugin> </gazebo> <gazebo reference="6dof_link_base"> <material>Gazebo/FlatBlack</material> </gazebo> <gazebo reference="6dof_link_1"> <material>Gazebo/FlatBlack</material> <mu1>0.2</mu1> <mu2>0.2</mu2> </gazebo> <gazebo reference="6dof_link_2"> <material>Gazebo/FlatBlack</material> <mu1>0.2</mu1> <mu2>0.2</mu2> </gazebo> <gazebo reference="6dof_link_3"> <material>Gazebo/FlatBlack</material> <mu1>0.2</mu1> <mu2>0.2</mu2> </gazebo> <gazebo reference="6dof_link_4"> <material>Gazebo/FlatBlack</material> <mu1>0.2</mu1> <mu2>0.2</mu2> </gazebo> <gazebo reference="6dof_link_5"> <material>Gazebo/FlatBlack</material> <mu1>0.2</mu1> <mu2>0.2</mu2> </gazebo> <gazebo reference="6dof_link_hand"> <material>Gazebo/FlatBlack</material> <mu1>0.2</mu1> <mu2>0.2</mu2> </gazebo> <gazebo reference="6dof_link_finger_1"> <material>Gazebo/FlatBlack</material> <mu1>0.2</mu1> <mu2>0.2</mu2> </gazebo> <gazebo reference="6dof_link_finger_2"> <material>Gazebo/FlatBlack</material> <mu1>0.2</mu1> <mu2>0.2</mu2> </gazebo> <material name="carbon_fiber"> <color rgba="0.792156862745098 0.819607843137255 0.933333333333333 1"/> </material> <material name="black"> <color rgba="0.0 0.0 0.0 1.0"/> </material> <material name="blue"> <color rgba="0.0 0.0 0.8 1.0"/> </material> <material name="green"> <color rgba="0.0 0.8 0.0 1.0"/> </material> <material name="grey"> <color rgba="0.2 0.2 0.2 1.0"/> </material> <material name="orange"> <color rgba="1.0 0.423529411765 0.0392156862745 1.0"/> </material> <material name="brown"> <color rgba="0.870588235294 0.811764705882 0.764705882353 1.0"/> </material> <material name="red"> <color rgba="0.8 0.0 0.0 1.0"/> </material> <material name="white"> <color rgba="1.0 1.0 1.0 1.0"/> </material> <link name="world"/> <joint name="fixed" type="fixed"> <parent link="world"/> <child link="6dof_link_base"/> </joint> <link name="6dof_link_base"> <collision> <origin rpy="0 0 0" xyz="0 0 0.05"/> <geometry> <cylinder length="0.1" radius="0.05"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0.05"/> <geometry> <cylinder length="0.1" radius="0.05"/> </geometry> <material name="carbon_fiber"/> </visual> <intertial> <origin rpy="0 0 0" xyz="0 0 0.05"/> <mass value="0.1"/> <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/> </intertial> </link> <joint name="6dof_joint_1" type="continuous"> <parent link="6dof_link_base"/> <child link="6dof_link_1"/> <origin rpy="0 0 0" xyz="0 0 0.1"/> <dynamics damping="0.7"/> <axis xyz="0 0 1"/> </joint> <link name="6dof_link_1"> <collision> <origin rpy="0 0 0" xyz="0 0 0.15"/> <geometry> <box size="0.1 0.1 0.1"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0.15"/> <geometry> <box size="0.1 0.1 0.1"/> </geometry> <material name="carbon_fiber"/> </visual> <intertial> <origin rpy="0 0 0" xyz="0 0 0.15"/> <mass value="0.1"/> <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/> </intertial> </link> <joint name="6dof_joint_2" type="continuous"> <parent link="6dof_link_1"/> <child link="6dof_link_2"/> <origin rpy="0 0 0" xyz="0 -0.05 0.15"/> <dynamics damping="0.7"/> <axis xyz="0 1 0"/> </joint> <link name="6dof_link_2"> <collision> <origin rpy="0 0 0" xyz="0 -0.1 0.35"/> <geometry> <box size="0.1 0.1 0.5"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 -0.1 0.35"/> <geometry> <box size="0.1 0.1 0.5"/> </geometry> <material name="carbon_fiber"/> </visual> <intertial> <origin rpy="0 0 0" xyz="0 -0.1 0.35"/> <mass value="0.5"/> <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/> </intertial> </link> <joint name="6dof_joint_3" type="continuous"> <parent link="6dof_link_2"/> <child link="6dof_link_3"/> <origin rpy="0 0 0" xyz="0 -0.05 0.55"/> <axis xyz="0 1 0"/> <dynamics damping="0.7"/> </joint> <link name="6dof_link_3"> <collision> <origin rpy="0 0 0" xyz="0 0 0.75"/> <geometry> <box size="0.1 0.1 0.5"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0.75"/> <geometry> <box size="0.1 0.1 0.5"/> </geometry> <material name="carbon_fiber"/> </visual> <intertial> <origin rpy="0 0 0" xyz="0 0 0.75"/> <mass value="0.5"/> <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/> </intertial> </link> <joint name="6dof_joint_4" type="continuous"> <parent link="6dof_link_3"/> <child link="6dof_link_4"/> <origin rpy="0 0 0" xyz="0 0 1"/> <axis xyz="0 0 1"/> <dynamics damping="0.7"/> </joint> <link name="6dof_link_4"> <collision> <origin rpy="0 0 0" xyz="0 0 1.05"/> <geometry> <sphere radius="0.05"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 1.05"/> <geometry> <sphere radius="0.05"/> </geometry> <material name="carbon_fiber"/> </visual> <intertial> <origin rpy="0 0 0" xyz="0 0 1.05"/> <mass value="0.1"/> <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/> </intertial> </link> <joint name="6dof_joint_5" type="continuous"> <parent link="6dof_link_4"/> <child link="6dof_link_5"/> <origin rpy="0 0 0" xyz="0 0.05 1.05"/> <axis xyz="0 1 0"/> <dynamics damping="0.7"/> </joint> <link name="6dof_link_5"> <collision> <origin rpy="0 0 0" xyz="0 0.1 1.05"/> <geometry> <box size="0.1 0.1 0.1"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0.1 1.05"/> <geometry> <box size="0.1 0.1 0.1"/> </geometry> <material name="carbon_fiber"/> </visual> <intertial> <origin rpy="0 0 0" xyz="0 0.1 1.05"/> <mass value="0.1"/> <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/> </intertial> </link> <joint name="6dof_joint_6" type="continuous"> <parent link="6dof_link_5"/> <child link="6dof_link_hand"/> <origin rpy="0 0 0" xyz="0 0.15 1.05"/> <axis xyz="0 1 0"/> <dynamics damping="0.7"/> </joint> <link name="6dof_link_hand"> <collision> <origin rpy="0 0 0" xyz="0 0.2 1.05"/> <geometry> <box size="0.1 0.1 0.3"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0.2 1.05"/> <geometry> <box size="0.1 0.1 0.3"/> </geometry> <material name="carbon_fiber"/> </visual> <intertial> <origin rpy="0 0 0" xyz="0 0.2 1.05"/> <mass value="0.1"/> <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/> </intertial> </link> <joint name="6dof_joint_finger_1" type="revolute"> <parent link="6dof_link_hand"/> <child link="6dof_link_finger_1"/> <origin rpy="0 0 0" xyz="0 0.25 1.2"/> <axis xyz="0 0 1"/> <limit effort="30" lower="0" upper="0.698131700798" velocity="5"/> </joint> <link name="6dof_link_finger_1"> <collision> <origin rpy="0 0 0" xyz="0 0.3 1.225"/> <geometry> <box size="0.05 0.3 0.05"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0.3 1.225"/> <geometry> <box size="0.05 0.3 0.05"/> </geometry> <material name="carbon_fiber"/> </visual> <intertial> <origin rpy="0 0 0" xyz="0 0.3 1.225"/> <mass value="0.01"/> <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/> </intertial> </link> <joint name="6dof_joint_finger_2" type="revolute"> <parent link="6dof_link_hand"/> <child link="6dof_link_finger_2"/> <origin rpy="0 0 0" xyz="0 0.25 0.9"/> <axis xyz="0 0 1"/> <limit effort="30" lower="0" upper="0.698131700798" velocity="5"/> </joint> <link name="6dof_link_finger_2"> <collision> <origin rpy="0 0 0" xyz="0 0.3 0.875"/> <geometry> <box size="0.05 0.3 0.05"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0.3 0.875"/> <geometry> <box size="0.05 0.3 0.05"/> </geometry> <material name="carbon_fiber"/> </visual> <intertial> <origin rpy="0 0 0" xyz="0 0.3 0.875"/> <mass value="0.01"/> <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/> </intertial> </link> <transmission name="tran1"> <type>transmission_interface/SimpleTransmission</type> <joint name="6dof_joint_1"/> <actuator name="motor1"> <hardwareinterface>EffortJointInterface</hardwareinterface> <mechanicalreduction>1</mechanicalreduction> </actuator> </transmission> <transmission name="tran2"> <type>transmission_interface/SimpleTransmission</type> <joint name="6dof_joint_2"/> <actuator name="motor2"> <hardwareinterface>EffortJointInterface</hardwareinterface> <mechanicalreduction>1</mechanicalreduction> </actuator> </transmission> <transmission name="tran3"> <type>transmission_interface/SimpleTransmission</type> <joint name="6dof_joint_3"/> <actuator name="motor3"> <hardwareinterface>EffortJointInterface</hardwareinterface> <mechanicalreduction>1</mechanicalreduction> </actuator> </transmission> <transmission name="tran4"> <type>transmission_interface/SimpleTransmission</type> <joint name="6dof_joint_4"/> <actuator name="motor4"> <hardwareinterface>EffortJointInterface</hardwareinterface> <mechanicalreduction>1</mechanicalreduction> </actuator> </transmission> <transmission name="tran5"> <type>transmission_interface/SimpleTransmission</type> <joint name="6dof_joint_5"/> <actuator name="motor5"> <hardwareinterface>EffortJointInterface</hardwareinterface> <mechanicalreduction>1</mechanicalreduction> </actuator> </transmission> <transmission name="tran6"> <type>transmission_interface/SimpleTransmission</type> <joint name="6dof_joint_6"/> <actuator name="motor6"> <hardwareinterface>EffortJointInterface</hardwareinterface> <mechanicalreduction>1</mechanicalreduction> </actuator> </transmission> <transmission name="tran7"> <type>transmission_interface/SimpleTransmission</type> <joint name="6dof_joint_finger_1"/> <actuator name="motor7"> <hardwareinterface>EffortJointInterface</hardwareinterface> <mechanicalreduction>1</mechanicalreduction> </actuator> </transmission> <transmission name="tran8"> <type>transmission_interface/SimpleTransmission</type> <joint name="6dof_joint_finger_2"/> <actuator name="motor8"> <hardwareinterface>EffortJointInterface</hardwareinterface> <mechanicalreduction>1</mechanicalreduction> </actuator> </transmission> </robot>

Problem with conversion from URDF to SDF

Hello. Ubuntu 12.04, ROS Hydro, Gazebo 1.9.3

I have successfully ran the rrbot demo in Gazebo; the 3 linkages load, and I can control them from the command line. All very good. Based on that success, I want to extend that to a larger model: 1 World link, 9 joints, 9 links. So, I just add some more links, joints, and transmission elements in hopes that would all work. However, it all goes wrong. If anyone has any insight to this, that would be greatly appreciated -- I've been banging my head against the wall for a couple days on this one.

Issue#1: Gazebo doesn't seem to load to the model. Issue#2: That problem seems to come from the conversion from URDF to SDF, as seen from gzsdf print:

<sdf version="1.4">
version='1.4'>
  <model name="6dof">
name='6dof'>
    <static>0</static>
    <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
      <robotnamespace>/6dof</robotnamespace>
name='gazebo_ros_control' filename='libgazebo_ros_control.so'>
      <robotNamespace>/6dof</robotNamespace>
    </plugin>
    <link name="__default__">
name='__default__'>
      <velocity_decay>
        <linear>0</linear>
        <angular>0</angular>
      </velocity_decay>
    </link>
  </model>
</sdf>

</sdf>

Whereas my URDF model is much larger:

 <?xml version="1.0" ?>

<!-- =================================================================================== --> <!-- | This document was autogenerated by xacro from 6dof_arm.xacro | --> <!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | --> <!-- =================================================================================== --> <robot name="6dof" xmlns:xacro="http://ros.org/wiki/xacro"> <gazebo> <plugin filename="libgazebo_ros_control.so" name="gazebo_ros_control"> <robotnamespace>/6dof</robotnamespace> <robotNamespace>/6dof</robotNamespace> </plugin> </gazebo> <gazebo reference="6dof_link_base"> <material>Gazebo/FlatBlack</material> </gazebo> <gazebo reference="6dof_link_1"> <material>Gazebo/FlatBlack</material> <mu1>0.2</mu1> <mu2>0.2</mu2> </gazebo> <gazebo reference="6dof_link_2"> <material>Gazebo/FlatBlack</material> <mu1>0.2</mu1> <mu2>0.2</mu2> </gazebo> <gazebo reference="6dof_link_3"> <material>Gazebo/FlatBlack</material> <mu1>0.2</mu1> <mu2>0.2</mu2> </gazebo> <gazebo reference="6dof_link_4"> <material>Gazebo/FlatBlack</material> <mu1>0.2</mu1> <mu2>0.2</mu2> </gazebo> <gazebo reference="6dof_link_5"> <material>Gazebo/FlatBlack</material> <mu1>0.2</mu1> <mu2>0.2</mu2> </gazebo> <gazebo reference="6dof_link_hand"> <material>Gazebo/FlatBlack</material> <mu1>0.2</mu1> <mu2>0.2</mu2> </gazebo> <gazebo reference="6dof_link_finger_1"> <material>Gazebo/FlatBlack</material> <mu1>0.2</mu1> <mu2>0.2</mu2> </gazebo> <gazebo reference="6dof_link_finger_2"> <material>Gazebo/FlatBlack</material> <mu1>0.2</mu1> <mu2>0.2</mu2> </gazebo> <material name="carbon_fiber"> <color rgba="0.792156862745098 0.819607843137255 0.933333333333333 1"/> </material> <material name="black"> <color rgba="0.0 0.0 0.0 1.0"/> </material> <material name="blue"> <color rgba="0.0 0.0 0.8 1.0"/> </material> <material name="green"> <color rgba="0.0 0.8 0.0 1.0"/> </material> <material name="grey"> <color rgba="0.2 0.2 0.2 1.0"/> </material> <material name="orange"> <color rgba="1.0 0.423529411765 0.0392156862745 1.0"/> </material> <material name="brown"> <color rgba="0.870588235294 0.811764705882 0.764705882353 1.0"/> </material> <material name="red"> <color rgba="0.8 0.0 0.0 1.0"/> </material> <material name="white"> <color rgba="1.0 1.0 1.0 1.0"/> </material> <!-- World & Baselink + Joint --> <link name="world"/> <joint name="fixed" type="fixed"> <parent link="world"/> <child link="6dof_link_base"/> </joint> <link name="6dof_link_base"> <collision> <origin rpy="0 0 0" xyz="0 0 0.05"/> <geometry> <cylinder length="0.1" radius="0.05"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0.05"/> <geometry> <cylinder length="0.1" radius="0.05"/> </geometry> <material name="carbon_fiber"/> </visual> <intertial> <origin rpy="0 0 0" xyz="0 0 0.05"/> <mass value="0.1"/> <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/> </intertial> </link> <!-- Joint 1 & Link 1 --> <joint name="6dof_joint_1" type="continuous"> <parent link="6dof_link_base"/> <child link="6dof_link_1"/> <origin rpy="0 0 0" xyz="0 0 0.1"/> <dynamics damping="0.7"/> <axis xyz="0 0 1"/> </joint> <link name="6dof_link_1"> <collision> <origin rpy="0 0 0" xyz="0 0 0.15"/> <geometry> <box size="0.1 0.1 0.1"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0.15"/> <geometry> <box size="0.1 0.1 0.1"/> </geometry> <material name="carbon_fiber"/> </visual> <intertial> <origin rpy="0 0 0" xyz="0 0 0.15"/> <mass value="0.1"/> <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/> </intertial> </link> <!-- Joint 2 & Link 2 --> <joint name="6dof_joint_2" type="continuous"> <parent link="6dof_link_1"/> <child link="6dof_link_2"/> <origin rpy="0 0 0" xyz="0 -0.05 0.15"/> <dynamics damping="0.7"/> <axis xyz="0 1 0"/> </joint> <link name="6dof_link_2"> <collision> <origin rpy="0 0 0" xyz="0 -0.1 0.35"/> <geometry> <box size="0.1 0.1 0.5"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 -0.1 0.35"/> <geometry> <box size="0.1 0.1 0.5"/> </geometry> <material name="carbon_fiber"/> </visual> <intertial> <origin rpy="0 0 0" xyz="0 -0.1 0.35"/> <mass value="0.5"/> <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/> </intertial> </link> <!-- Joint 3 & Link 3 --> <joint name="6dof_joint_3" type="continuous"> <parent link="6dof_link_2"/> <child link="6dof_link_3"/> <origin rpy="0 0 0" xyz="0 -0.05 0.55"/> <axis xyz="0 1 0"/> <dynamics damping="0.7"/> </joint> <link name="6dof_link_3"> <collision> <origin rpy="0 0 0" xyz="0 0 0.75"/> <geometry> <box size="0.1 0.1 0.5"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 0.75"/> <geometry> <box size="0.1 0.1 0.5"/> </geometry> <material name="carbon_fiber"/> </visual> <intertial> <origin rpy="0 0 0" xyz="0 0 0.75"/> <mass value="0.5"/> <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/> </intertial> </link> <!-- Joint 4 & Link 4 --> <joint name="6dof_joint_4" type="continuous"> <parent link="6dof_link_3"/> <child link="6dof_link_4"/> <origin rpy="0 0 0" xyz="0 0 1"/> <axis xyz="0 0 1"/> <dynamics damping="0.7"/> </joint> <link name="6dof_link_4"> <collision> <origin rpy="0 0 0" xyz="0 0 1.05"/> <geometry> <sphere radius="0.05"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0 1.05"/> <geometry> <sphere radius="0.05"/> </geometry> <material name="carbon_fiber"/> </visual> <intertial> <origin rpy="0 0 0" xyz="0 0 1.05"/> <mass value="0.1"/> <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/> </intertial> </link> <!-- Joint 5 & Link 5 --> <joint name="6dof_joint_5" type="continuous"> <parent link="6dof_link_4"/> <child link="6dof_link_5"/> <origin rpy="0 0 0" xyz="0 0.05 1.05"/> <axis xyz="0 1 0"/> <dynamics damping="0.7"/> </joint> <link name="6dof_link_5"> <collision> <origin rpy="0 0 0" xyz="0 0.1 1.05"/> <geometry> <box size="0.1 0.1 0.1"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0.1 1.05"/> <geometry> <box size="0.1 0.1 0.1"/> </geometry> <material name="carbon_fiber"/> </visual> <intertial> <origin rpy="0 0 0" xyz="0 0.1 1.05"/> <mass value="0.1"/> <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/> </intertial> </link> <!-- Joint 6 & Link Hand --> <joint name="6dof_joint_6" type="continuous"> <parent link="6dof_link_5"/> <child link="6dof_link_hand"/> <origin rpy="0 0 0" xyz="0 0.15 1.05"/> <axis xyz="0 1 0"/> <dynamics damping="0.7"/> </joint> <link name="6dof_link_hand"> <collision> <origin rpy="0 0 0" xyz="0 0.2 1.05"/> <geometry> <box size="0.1 0.1 0.3"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0.2 1.05"/> <geometry> <box size="0.1 0.1 0.3"/> </geometry> <material name="carbon_fiber"/> </visual> <intertial> <origin rpy="0 0 0" xyz="0 0.2 1.05"/> <mass value="0.1"/> <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/> </intertial> </link> <!-- Finger Joint 1 & Finger Link1 --> <joint name="6dof_joint_finger_1" type="revolute"> <parent link="6dof_link_hand"/> <child link="6dof_link_finger_1"/> <origin rpy="0 0 0" xyz="0 0.25 1.2"/> <axis xyz="0 0 1"/> <limit effort="30" lower="0" upper="0.698131700798" velocity="5"/> </joint> <link name="6dof_link_finger_1"> <collision> <origin rpy="0 0 0" xyz="0 0.3 1.225"/> <geometry> <box size="0.05 0.3 0.05"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0.3 1.225"/> <geometry> <box size="0.05 0.3 0.05"/> </geometry> <material name="carbon_fiber"/> </visual> <intertial> <origin rpy="0 0 0" xyz="0 0.3 1.225"/> <mass value="0.01"/> <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/> </intertial> </link> <!-- Finger Joint 2 & Finger Link 2 --> <joint name="6dof_joint_finger_2" type="revolute"> <parent link="6dof_link_hand"/> <child link="6dof_link_finger_2"/> <origin rpy="0 0 0" xyz="0 0.25 0.9"/> <axis xyz="0 0 1"/> <limit effort="30" lower="0" upper="0.698131700798" velocity="5"/> </joint> <link name="6dof_link_finger_2"> <collision> <origin rpy="0 0 0" xyz="0 0.3 0.875"/> <geometry> <box size="0.05 0.3 0.05"/> </geometry> </collision> <visual> <origin rpy="0 0 0" xyz="0 0.3 0.875"/> <geometry> <box size="0.05 0.3 0.05"/> </geometry> <material name="carbon_fiber"/> </visual> <intertial> <origin rpy="0 0 0" xyz="0 0.3 0.875"/> <mass value="0.01"/> <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/> </intertial> </link> <!-- Finger Joint 3 & Finger Link 3 --> <transmission name="tran1"> <type>transmission_interface/SimpleTransmission</type> <joint name="6dof_joint_1"/> <actuator name="motor1"> <hardwareinterface>EffortJointInterface</hardwareinterface> <mechanicalreduction>1</mechanicalreduction> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="tran2"> <type>transmission_interface/SimpleTransmission</type> <joint name="6dof_joint_2"/> <actuator name="motor2"> <hardwareinterface>EffortJointInterface</hardwareinterface> <mechanicalreduction>1</mechanicalreduction> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="tran3"> <type>transmission_interface/SimpleTransmission</type> <joint name="6dof_joint_3"/> <actuator name="motor3"> <hardwareinterface>EffortJointInterface</hardwareinterface> <mechanicalreduction>1</mechanicalreduction> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="tran4"> <type>transmission_interface/SimpleTransmission</type> <joint name="6dof_joint_4"/> <actuator name="motor4"> <hardwareinterface>EffortJointInterface</hardwareinterface> <mechanicalreduction>1</mechanicalreduction> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="tran5"> <type>transmission_interface/SimpleTransmission</type> <joint name="6dof_joint_5"/> <actuator name="motor5"> <hardwareinterface>EffortJointInterface</hardwareinterface> <mechanicalreduction>1</mechanicalreduction> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="tran6"> <type>transmission_interface/SimpleTransmission</type> <joint name="6dof_joint_6"/> <actuator name="motor6"> <hardwareinterface>EffortJointInterface</hardwareinterface> <mechanicalreduction>1</mechanicalreduction> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="tran7"> <type>transmission_interface/SimpleTransmission</type> <joint name="6dof_joint_finger_1"/> <actuator name="motor7"> <hardwareinterface>EffortJointInterface</hardwareinterface> <mechanicalreduction>1</mechanicalreduction> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <transmission name="tran8"> <type>transmission_interface/SimpleTransmission</type> <joint name="6dof_joint_finger_2"/> <actuator name="motor8"> <hardwareinterface>EffortJointInterface</hardwareinterface> <mechanicalreduction>1</mechanicalreduction> <hardwareInterface>EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> </robot>

<!-- End of mcross's redefined 6dof model. --> </robot>

Problem with conversion from URDF to SDF

Hello. Ubuntu 12.04, ROS Hydro, Gazebo 1.9.3

I have successfully ran the rrbot demo in Gazebo; the 3 linkages load, and I can control them from the command line. All very good. Based on that success, I want to extend that to a larger model: 1 World link, 9 joints, 9 links. So, I just add some more links, joints, and transmission elements in hopes that would all work. However, it all goes wrong. If anyone has any insight to this, that would be greatly appreciated -- I've been banging my head against the wall for a couple days on this one.

Issue#1: Gazebo doesn't seem to load to the model.

[ERROR] [1391379571.300875726, 0.023000000]: This robot has a joint named "6dof_joint_1" which is not in the gazebo model.
[FATAL] [1391379571.301168221, 0.023000000]: Could not initialize robot simulation interface

Issue#2: That problem seems to come from the conversion from URDF to SDF, as seen from gzsdf print:

<sdf version='1.4'>
  <model name='6dof'>
    <static>0</static>
    <plugin name='gazebo_ros_control' filename='libgazebo_ros_control.so'>
      <robotNamespace>/6dof</robotNamespace>
    </plugin>
    <link name='__default__'>
      <velocity_decay>
        <linear>0</linear>
        <angular>0</angular>
      </velocity_decay>
    </link>
  </model>
</sdf>

Whereas my URDF model is much larger:

    <?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- |    This document was autogenerated by xacro from 6dof_arm.xacro                 | -->
<!-- |    EDITING THIS FILE BY HAND IS NOT RECOMMENDED                                 | -->
<!-- =================================================================================== -->
<robot name="6dof" xmlns:xacro="http://ros.org/wiki/xacro">
  <gazebo>
    <plugin filename="libgazebo_ros_control.so" name="gazebo_ros_control">
      <robotNamespace>/6dof</robotNamespace>
    </plugin>
  </gazebo>
  <gazebo reference="6dof_link_base">
    <material>Gazebo/FlatBlack</material>
  </gazebo>
  <gazebo reference="6dof_link_1">
    <material>Gazebo/FlatBlack</material>
    <mu1>0.2</mu1>
    <mu2>0.2</mu2>
  </gazebo>
  <gazebo reference="6dof_link_2">
    <material>Gazebo/FlatBlack</material>
    <mu1>0.2</mu1>
    <mu2>0.2</mu2>
  </gazebo>
  <gazebo reference="6dof_link_3">
    <material>Gazebo/FlatBlack</material>
    <mu1>0.2</mu1>
    <mu2>0.2</mu2>
  </gazebo>
  <gazebo reference="6dof_link_4">
    <material>Gazebo/FlatBlack</material>
    <mu1>0.2</mu1>
    <mu2>0.2</mu2>
  </gazebo>
  <gazebo reference="6dof_link_5">
    <material>Gazebo/FlatBlack</material>
    <mu1>0.2</mu1>
    <mu2>0.2</mu2>
  </gazebo>
  <gazebo reference="6dof_link_hand">
    <material>Gazebo/FlatBlack</material>
    <mu1>0.2</mu1>
    <mu2>0.2</mu2>
  </gazebo>
  <gazebo reference="6dof_link_finger_1">
    <material>Gazebo/FlatBlack</material>
    <mu1>0.2</mu1>
    <mu2>0.2</mu2>
  </gazebo>
  <gazebo reference="6dof_link_finger_2">
    <material>Gazebo/FlatBlack</material>
    <mu1>0.2</mu1>
    <mu2>0.2</mu2>
  </gazebo>
  <material name="carbon_fiber">
    <color rgba="0.792156862745098 0.819607843137255 0.933333333333333 1"/>
  </material>
  <material name="black">
    <color rgba="0.0 0.0 0.0 1.0"/>
  </material>
  <material name="blue">
    <color rgba="0.0 0.0 0.8 1.0"/>
  </material>
  <material name="green">
    <color rgba="0.0 0.8 0.0 1.0"/>
  </material>
  <material name="grey">
    <color rgba="0.2 0.2 0.2 1.0"/>
  </material>
  <material name="orange">
    <color rgba="1.0 0.423529411765 0.0392156862745 1.0"/>
  </material>
  <material name="brown">
    <color rgba="0.870588235294 0.811764705882 0.764705882353 1.0"/>
  </material>
  <material name="red">
    <color rgba="0.8 0.0 0.0 1.0"/>
  </material>
  <material name="white">
    <color rgba="1.0 1.0 1.0 1.0"/>
  </material>
  <!-- World & Baselink + Joint -->
  <link name="world"/>
  <joint name="fixed" type="fixed">
    <parent link="world"/>
    <child link="6dof_link_base"/>
  </joint>
  <link name="6dof_link_base">
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0.05"/>
      <geometry>
        <cylinder length="0.1" radius="0.05"/>
      </geometry>
    </collision>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0.05"/>
      <geometry>
        <cylinder length="0.1" radius="0.05"/>
      </geometry>
      <material name="carbon_fiber"/>
    </visual>
    <intertial>
      <origin rpy="0 0 0" xyz="0 0 0.05"/>
      <mass value="0.1"/>
      <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
    </intertial>
  </link>
  <!-- Joint 1 & Link 1 -->
  <joint name="6dof_joint_1" type="continuous">
    <parent link="6dof_link_base"/>
    <child link="6dof_link_1"/>
    <origin rpy="0 0 0" xyz="0 0 0.1"/>
    <dynamics damping="0.7"/>
    <axis xyz="0 0 1"/>
  </joint>
  <link name="6dof_link_1">
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0.15"/>
      <geometry>
        <box size="0.1 0.1 0.1"/>
      </geometry>
    </collision>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0.15"/>
      <geometry>
        <box size="0.1 0.1 0.1"/>
      </geometry>
      <material name="carbon_fiber"/>
    </visual>
    <intertial>
      <origin rpy="0 0 0" xyz="0 0 0.15"/>
      <mass value="0.1"/>
      <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
    </intertial>
  </link>
  <!-- Joint 2 & Link 2 -->
  <joint name="6dof_joint_2" type="continuous">
    <parent link="6dof_link_1"/>
    <child link="6dof_link_2"/>
    <origin rpy="0 0 0" xyz="0 -0.05 0.15"/>
    <dynamics damping="0.7"/>
    <axis xyz="0 1 0"/>
  </joint>
  <link name="6dof_link_2">
    <collision>
      <origin rpy="0 0 0" xyz="0 -0.1 0.35"/>
      <geometry>
        <box size="0.1 0.1 0.5"/>
      </geometry>
    </collision>
    <visual>
      <origin rpy="0 0 0" xyz="0 -0.1 0.35"/>
      <geometry>
        <box size="0.1 0.1 0.5"/>
      </geometry>
      <material name="carbon_fiber"/>
    </visual>
    <intertial>
      <origin rpy="0 0 0" xyz="0 -0.1 0.35"/>
      <mass value="0.5"/>
      <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
    </intertial>
  </link>
  <!-- Joint 3 & Link 3 -->
  <joint name="6dof_joint_3" type="continuous">
    <parent link="6dof_link_2"/>
    <child link="6dof_link_3"/>
    <origin rpy="0 0 0" xyz="0 -0.05 0.55"/>
    <axis xyz="0 1 0"/>
    <dynamics damping="0.7"/>
  </joint>
  <link name="6dof_link_3">
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0.75"/>
      <geometry>
        <box size="0.1 0.1 0.5"/>
      </geometry>
    </collision>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0.75"/>
      <geometry>
        <box size="0.1 0.1 0.5"/>
      </geometry>
      <material name="carbon_fiber"/>
    </visual>
    <intertial>
      <origin rpy="0 0 0" xyz="0 0 0.75"/>
      <mass value="0.5"/>
      <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
    </intertial>
  </link>
  <!-- Joint 4 & Link 4 -->
  <joint name="6dof_joint_4" type="continuous">
    <parent link="6dof_link_3"/>
    <child link="6dof_link_4"/>
    <origin rpy="0 0 0" xyz="0 0 1"/>
    <axis xyz="0 0 1"/>
    <dynamics damping="0.7"/>
  </joint>
  <link name="6dof_link_4">
    <collision>
      <origin rpy="0 0 0" xyz="0 0 1.05"/>
      <geometry>
        <sphere radius="0.05"/>
      </geometry>
    </collision>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 1.05"/>
      <geometry>
        <sphere radius="0.05"/>
      </geometry>
      <material name="carbon_fiber"/>
    </visual>
    <intertial>
      <origin rpy="0 0 0" xyz="0 0 1.05"/>
      <mass value="0.1"/>
      <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
    </intertial>
  </link>
  <!-- Joint 5 & Link 5 -->
  <joint name="6dof_joint_5" type="continuous">
    <parent link="6dof_link_4"/>
    <child link="6dof_link_5"/>
    <origin rpy="0 0 0" xyz="0 0.05 1.05"/>
    <axis xyz="0 1 0"/>
    <dynamics damping="0.7"/>
  </joint>
  <link name="6dof_link_5">
    <collision>
      <origin rpy="0 0 0" xyz="0 0.1 1.05"/>
      <geometry>
        <box size="0.1 0.1 0.1"/>
      </geometry>
    </collision>
    <visual>
      <origin rpy="0 0 0" xyz="0 0.1 1.05"/>
      <geometry>
        <box size="0.1 0.1 0.1"/>
      </geometry>
      <material name="carbon_fiber"/>
    </visual>
    <intertial>
      <origin rpy="0 0 0" xyz="0 0.1 1.05"/>
      <mass value="0.1"/>
      <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
    </intertial>
  </link>
  <!-- Joint 6 & Link Hand -->
  <joint name="6dof_joint_6" type="continuous">
    <parent link="6dof_link_5"/>
    <child link="6dof_link_hand"/>
    <origin rpy="0 0 0" xyz="0 0.15 1.05"/>
    <axis xyz="0 1 0"/>
    <dynamics damping="0.7"/>
  </joint>
  <link name="6dof_link_hand">
    <collision>
      <origin rpy="0 0 0" xyz="0 0.2 1.05"/>
      <geometry>
        <box size="0.1 0.1 0.3"/>
      </geometry>
    </collision>
    <visual>
      <origin rpy="0 0 0" xyz="0 0.2 1.05"/>
      <geometry>
        <box size="0.1 0.1 0.3"/>
      </geometry>
      <material name="carbon_fiber"/>
    </visual>
    <intertial>
      <origin rpy="0 0 0" xyz="0 0.2 1.05"/>
      <mass value="0.1"/>
      <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
    </intertial>
  </link>
  <!-- Finger Joint 1 & Finger Link1 -->
  <joint name="6dof_joint_finger_1" type="revolute">
    <parent link="6dof_link_hand"/>
    <child link="6dof_link_finger_1"/>
    <origin rpy="0 0 0" xyz="0 0.25 1.2"/>
    <axis xyz="0 0 1"/>
    <limit effort="30" lower="0" upper="0.698131700798" velocity="5"/>
  </joint>
  <link name="6dof_link_finger_1">
    <collision>
      <origin rpy="0 0 0" xyz="0 0.3 1.225"/>
      <geometry>
        <box size="0.05 0.3 0.05"/>
      </geometry>
    </collision>
    <visual>
      <origin rpy="0 0 0" xyz="0 0.3 1.225"/>
      <geometry>
        <box size="0.05 0.3 0.05"/>
      </geometry>
      <material name="carbon_fiber"/>
    </visual>
    <intertial>
      <origin rpy="0 0 0" xyz="0 0.3 1.225"/>
      <mass value="0.01"/>
      <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
    </intertial>
  </link>
  <!-- Finger Joint 2 & Finger Link 2 -->
  <joint name="6dof_joint_finger_2" type="revolute">
    <parent link="6dof_link_hand"/>
    <child link="6dof_link_finger_2"/>
    <origin rpy="0 0 0" xyz="0 0.25 0.9"/>
    <axis xyz="0 0 1"/>
    <limit effort="30" lower="0" upper="0.698131700798" velocity="5"/>
  </joint>
  <link name="6dof_link_finger_2">
    <collision>
      <origin rpy="0 0 0" xyz="0 0.3 0.875"/>
      <geometry>
        <box size="0.05 0.3 0.05"/>
      </geometry>
    </collision>
    <visual>
      <origin rpy="0 0 0" xyz="0 0.3 0.875"/>
      <geometry>
        <box size="0.05 0.3 0.05"/>
      </geometry>
      <material name="carbon_fiber"/>
    </visual>
    <intertial>
      <origin rpy="0 0 0" xyz="0 0.3 0.875"/>
      <mass value="0.01"/>
      <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
    </intertial>
  </link>
  <!-- Finger Joint 3 & Finger Link 3 -->
  <transmission name="tran1">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="6dof_joint_1"/>
    <actuator name="motor1">
      <hardwareInterface>EffortJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>
  <transmission name="tran2">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="6dof_joint_2"/>
    <actuator name="motor2">
      <hardwareInterface>EffortJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>
  <transmission name="tran3">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="6dof_joint_3"/>
    <actuator name="motor3">
      <hardwareInterface>EffortJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>
  <transmission name="tran4">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="6dof_joint_4"/>
    <actuator name="motor4">
      <hardwareInterface>EffortJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>
  <transmission name="tran5">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="6dof_joint_5"/>
    <actuator name="motor5">
      <hardwareInterface>EffortJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>
  <transmission name="tran6">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="6dof_joint_6"/>
    <actuator name="motor6">
      <hardwareInterface>EffortJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>
  <transmission name="tran7">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="6dof_joint_finger_1"/>
    <actuator name="motor7">
      <hardwareInterface>EffortJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>
  <transmission name="tran8">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="6dof_joint_finger_2"/>
    <actuator name="motor8">
      <hardwareInterface>EffortJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>
  <!-- End of mcross's redefined 6dof model. -->
</robot>