Robotics StackExchange | Archived questions

Error Gazebo URDF Opening

Hi guys, I'm working with an hexapod in a project, so i need to import it from solid works to gazebo. I tried to use an URDF exporter, and it generated an folder with 2 launchs (gazebo.launch & display.launch). I tried to execute the gazebo.launch with roslaunch. It bring me an error https://gist.github.com/anonymous/5e56cbfb2f6b3f24de0d

So I openned my .launch file: https://gist.github.com/anonymous/244301079d768c7aaf75

And change some lines, getting this: https://gist.github.com/anonymous/57f95f42fb4b5cfc4ebc

And now it is returning the following error: https://gist.github.com/anonymous/6f603553edcc25128ae5

Someone know waht should i do?

Asked by Marcio Montenegro on 2015-02-03 10:22:39 UTC

Comments

What version of Gazebo are you using?

Asked by nkoenig on 2015-02-03 10:49:31 UTC

4.0 sir '-'

Asked by Marcio Montenegro on 2015-02-03 20:47:49 UTC

Answers

gazebo_worlds was last used in groovy. It looks like you're using hydro, so you should use some example launch files from hydro.

Asked by scpeters on 2015-02-04 19:39:44 UTC

Comments

You can try loading your model without ROS by doing:

  1. Locate your URDF file.
  2. Run: gz sdf -p REPLACE_WITH_URDF_FILE > model.sdf
  3. Create a world file with:

    <?xml version="1.0" ?>
    <sdf version="1.5">
      <world name="default">
        <include><uri>model://sun</uri></include>
        <include><uri>model://ground_plane</uri></include>
        COPY THE CONTENTS OF model.sdf HERE
      </world>
    </sdf>
    
  4. Run gazebo: gazebo THE_WORLD_FILE_CREATED_IN_STEP3

Asked by nkoenig on 2015-02-05 10:24:23 UTC

Comments

both the launch file (empty_world.launch) and model spawning script (spawn_model) are now in a package called gazebo_ros, so try replacing

<launch>
  <include
    file="$(find gazebo_worlds)/launch/empty_world.world" />
  <node
    name="tf_footprint_base"
    pkg="tf"
    type="static_transform_publisher"
    args="0 0 0 0 0 0 base_link base_footprint 40" />
  <node
    name="spawn_model"
    pkg="gazebo"
    type="spawn_model"
    args="-file $(find hexapod_launch)/robots/hexapod_launch.URDF-urdf -model hexapod_launch"
    output="screen" />
  <node
    name="fake_joint_calibration"
    pkg="rostopic"
    type="rostopic"
    args="pub /calibrated std_msgs/Bool true" />
</launch>

with

<launch>
  <include
    file="$(find gazebo_ros)/launch/empty_world.launch" />
  <node
    name="tf_footprint_base"
    pkg="tf"
    type="static_transform_publisher"
    args="0 0 0 0 0 0 base_link base_footprint 40" />
  <node
    name="spawn_model"
    pkg="gazebo_ros"
    type="spawn_model"
    args="-file $(find hexapod_launch)/robots/hexapod_launch.URDF-urdf -model hexapod_launch"
    output="screen" />
  <node
    name="fake_joint_calibration"
    pkg="rostopic"
    type="rostopic"
    args="pub /calibrated std_msgs/Bool true" />
</launch>

that should get you past the errors you posted

ResourceNotFound: gazebo_worlds

and

ERROR: cannot launch node of type [gazebo/spawn_model]: gazebo

Asked by hsu on 2015-02-05 19:08:29 UTC

Comments