Home | Tutorials | Wiki | Issues
Ask Your Question
0

Problem with conversion from URDF to SDF

asked 2014-02-02 17:28:17 -0500

mcross gravatar image

updated 2014-02-02 17:32:45 -0500

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 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-02-03 19:44:34 -0500

mcross gravatar image

Ok, so I (finally) solved my own problem.

I'm not entirely sure of all that I had done wrong, but the most obvious problem I found was my ill-defined model origins. I cleaned up the origins of all the links and joints, (and cleaned up a far amount more. Basically I restarted from scratch) and all turned out ok.

Still not doing what I want it to be doing, but I got past this problem.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2014-02-02 17:28:17 -0500

Seen: 1,586 times

Last updated: Feb 03 '14