ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

household_objects_database with gazebo (or blender)

asked 2011-06-07 23:49:31 -0600

Philipp gravatar image

updated 2011-06-07 23:52:40 -0600


I'm trying to use the objects from the household_objects_database in gazebo. At the moment I am trying to export the data from the objects_database_node/get_model_mesh-call to a format, which can be imported into blender to export it as .dae-file.

My way at the moment is:

  • first to call objects_database_node/get_model_mesh and save it to a file
  • afterwards to read in the data and trying to write an .obj-file.

The second point is the problem. I don't know how to interpret the data. They have the form:

  code: -1
  type: 0
  dimensions: []
  triangles: [74, 390, ... , 452]
      x: 0.00321499991417
      y: -0.0341199989319
      z: 0.101269996643

So clearly the second part is a list of 3D-Points. And the first part must be some sort of indices to build triangles. But the problem is, without the knowledge if it is a list of triangles, a triangle-strip, or so on it is not very useful. I tried most of the possibilities I can think of and they don't give sufficient results.

So I need some help for interpreting the data, or by figuring out a way to get this models into gazebo.

Thanks a lot for helping


edit retag flag offensive close merge delete


For guessing, you could check if triangles length is divisible by 3.
dornhege gravatar image dornhege  ( 2011-06-08 00:37:52 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2011-06-08 01:59:51 -0600

Guido gravatar image

updated 2011-06-08 02:02:14 -0600

Hi Philipp,

Type 0, means you are manipulating a sphere. The triangle array are triangles indices and the 3D points are the vertices of the mesh.

You should take a look at the mesh part here. And maybe the message description will help you too.


edit flag offensive delete link more


Just a quick note: there has been a bug which caused the type to always be 0. I think this has been fixed already, but I'm not sure if the database services running at Willow are using the fixed version.
Lorenz gravatar image Lorenz  ( 2011-06-08 03:32:10 -0600 )edit
I think the bug causing all meshes to have type 0 might still be around in the released version... Please ignore the type field for now. Other than that, Guido is correct, it is a list of triangle indices (a triangle soup if you wish)
Matei Ciocarlie gravatar image Matei Ciocarlie  ( 2011-06-08 12:16:22 -0600 )edit

answered 2011-06-08 18:41:09 -0600

We solved it. We were a little confused by the unused type of the mesh and had a bug in the code. It is working now. Thanks. Juergen + Phillip

edit flag offensive delete link more

Question Tools


Asked: 2011-06-07 23:49:31 -0600

Seen: 400 times

Last updated: Jun 08 '11