Home | Tutorials | Wiki | Issues
Ask Your Question
0

ROS Fuerte, Gazebo, DAE file

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

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"/>
 <export>
   <gazebo gazebo_media_path="${prefix}" />
 </export>

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>
  <static>false</static>
  <body:trimesh name="something_body">
    <massMatrix>true</massMatrix> 
    <mass>1</mass>
    <ixx>0.00</ixx>
    <ixy>0.0</ixy>
    <ixz>0.0</ixz>
    <iyy>0.001</iyy>
    <iyz>0.0</iyz>
    <izz>0.00</izz>
    <cx>0.0</cx>
    <cy>0.0</cy>
    <cz>0.1</cz>
    <geom:trimesh name="something_geom">
      <xyz>0 0 0</xyz>
      <laserRetro>2000.0</laserRetro>
      <kp>1000000.0</kp>
      <kd>1.0</kd>
      <scale>1 1 1</scale>
      <mesh>something.dae</mesh>
      <centerMesh>aabb_bottom</centerMesh>
      <genTexCoord>true</genTexCoord>
      <visual>
        <xyz>0 0 0.0</xyz>
        <scale>1 1 1</scale>
        <material>GazeboWorlds/RGBNoise</material>
        <mesh>something.dae</mesh>
      </visual>
    </geom:trimesh>
  </body:trimesh>
</model:physical>

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

I'm also using a launch file.

<launch>
  <!-- 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" />
</launch>

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.

ROS_MASTER_URI=http://localhost:11311

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
done

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
0

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

AndreiHaidu gravatar image

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

Hi,

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.

UPDATE:
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

Comments

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 -0600 )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 -0600 )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 -0600 )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 -0600 )edit
Login/Signup to Answer

Question Tools

Stats

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

Seen: 634 times

Last updated: Mar 13 '13