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

household_objects_database with gazebo (or blender)

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

Philipp gravatar image

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

Hello,

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:

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

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

Philipp

edit retag flag offensive close merge delete

Comments

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

2 Answers

Sort by ยป oldest newest most voted
3

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

Guido gravatar image

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

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.

Guido

edit flag offensive delete link more

Comments

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 -0500 )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 -0500 )edit
0

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

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

Stats

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

Seen: 431 times

Last updated: Jun 08 '11