Gazebo | Ignition | Community
Ask Your Question

ROS Fuerte, Gazebo, DAE file

asked 2013-03-12 09:35:54 -0500

silgon gravatar image

I was using my dae files to import into my gazebo. In ROS electric it was working wonderful, but now that I'm working in Fuerte, it's not working anymore.

My configuration is as follows. I added to my manifest.xml file the following lines.

 <depend package="gazebo"/>
   <gazebo gazebo_media_path="${prefix}" />

Then I'm using the following file for my model.

File: pkg/objects/something.model

<?xml version="1.0" ?>
<model:physical name="something">
  <xyz>   0      0      0</xyz>
  <rpy>   0.0    0.0    0.0</rpy>
  <body:trimesh name="something_body">
    <geom:trimesh name="something_geom">
      <xyz>0 0 0</xyz>
      <scale>1 1 1</scale>
        <xyz>0 0 0.0</xyz>
        <scale>1 1 1</scale>

My dae file is in this path pkg/Media/models/something.dae.

I'm also using a launch file.

  <!-- send urdf to param server -->
  <param name="something" textfile="$(find environments)/objects/something.model" />
  <!-- push urdf to factory and spawn robot in gazebo -->
  <node name="spawn_cube" pkg="gazebo" type="spawn_model" args="-gazebo -param something  -R 0 -P 0 -Y 0 -x -2 -model something" respawn="false" output="screen" />

And when I don't, I just load it like this:

rosrun gazebo spawn_model -file objects/something.model -gazebo -model test -z 2

Whenever I run the launch file, this is happens.


core service [/rosout] found
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[spawn_cube-1]: started with pid [17302]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[spawn_cube2-2]: started with pid [17303]
loading model xml from ros parameter
[INFO] [WallTime: 1363095682.076636] [0.000000] waiting for service /gazebo/spawn_gazebo_model
spawn status:  SpawnModel: successfully spawned model
loading model xml from ros parameter
[INFO] [WallTime: 1363095682.142966] [0.000000] waiting for service /gazebo/spawn_gazebo_model
spawn status:  SpawnModel: successfully spawned model
[spawn_cube-1] process has finished cleanly
log file: /home/user/.ros/log/8d573604-8b17-11e2-9cb0-0025904ea321/spawn_cube-1*.log
[spawn_cube2-2] process has finished cleanly
log file: /home/user/.ros/log/8d573604-8b17-11e2-9cb0-0025904ea321/spawn_cube2-2*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete

And that's it, it was working perfectly well under ROS electric and it's not working with ROS fuerte. I was trying different approaches, but what it's actually happening, is that it's not taking into account the file. I even deleted ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-03-12 10:05:11 -0500

AndreiHaidu gravatar image

updated 2013-03-13 06:28:41 -0500


If I am not mistaking ROS Fuerte comes with Gazebo version 1.0. Try using this tutorial for importing meshes.

If the model is not found, try copying it to ~/.gazebo/models folder, or fix the paths.

Spawning from the launch file could also be problematic in that version, try spawning from the .world file. Take a look at this answer.

how to set the paths (from the install tutorial)

echo "export LD_LIBRARY_PATH=<install_path>/local/lib:$LD_LIBRARY_PATH" >> ~/.bashrc
echo "export PATH=<install_path>/local/bin:$PATH" >> ~/.bashrc
echo "export PKG_CONFIG_PATH=<install_path>/local/lib/pkgconfig:$PKG_CONFIG_PATH" >> ~/.bashrc
echo "export OGRE_RESOURCE_PATH=/usr/lib/<see above for notes on Ogre>/OGRE-1.7.4" >> ~/.bashrc
echo "source <install_path>/share/gazebo-1.0.0/setup.bash" >> ~/.bashrc
source ~/.bashrc

Cheers, Andrei

edit flag offensive delete link more


The first for the first advice the environment variable GAZEBORESOURCEPATH didn't exist, so I set it to ~/.gazebo (export GAZEBORESOURCEPATH=~/.gazebo, it's not working, for the second advice, I put my model in ~/.gazebo/models, and it didn't work either, I set the GAZEBORESOURCEPATH variable too. I haven't try the world file as your 3th advice, I think I will be trying it tomorrow, but shouldn't the other files also be working? I mean, since it was working in ROS electric with gazebo.

silgon gravatar imagesilgon ( 2013-03-13 04:29:59 -0500 )edit

I also tried this in my launch file:
<node name="spawncube" pkg="gazebo" type="spawnmodel" args="-gazebo -param something -R 0 -P 0 -Y 0 -x 2 -model something2" respawn="false" output="screen"> <env name="GAZEBORESOURCEPATH" value="$(find environments)" /> </node>

And it's not working either

silgon gravatar imagesilgon ( 2013-03-13 04:34:02 -0500 )edit

yeah those are all buggy in Gazebo 1.0, either update to a newer version, or spawn them from the .world file, plus don't forget to source the setup.bash file from gazebo folder.

AndreiHaidu gravatar imageAndreiHaidu ( 2013-03-13 06:25:55 -0500 )edit

I updated the answer, could you confirm what Gazebo version you have, because I am not sure that you have 1.0.

AndreiHaidu gravatar imageAndreiHaidu ( 2013-03-13 06:29:35 -0500 )edit

Question Tools


Asked: 2013-03-12 09:35:54 -0500

Seen: 939 times

Last updated: Mar 13 '13