Home | Tutorials | Wiki | Issues
Ask Your Question
0

Spawning 3D model mesh to proper scale with SDF

asked 2018-06-22 13:37:42 -0500

anna.sarp gravatar image

updated 2018-06-22 13:39:40 -0500

Hi,

I am trying to build a parking lot scene in Gazebo and spawn static models of different cars in different parking spots like below.

image description

From, Google 3D Warehouse, I have downloaded a bunch of collada (.dae) models of different cars. However, I am having some trouble spawning them in the world to proper scale and pose using an SDF file (my sample SDF file). The scale and center of mass seems to be different for different models and that makes it diificult for me to automate model spawning with a simple plugin. In the above image, models 1, 2 and 3 are spawned in gui with the same sdf file with scale <1 1 1> and link pose <0 0 0 0 0 0>

I have the following questions:

  1. If I know the corresponding L X W X H of the car bounding box in 'm', is itpossible to spawn the .dae mesh in the gazebo world to that size ?

  2. If not, is there a way, I can get the size of the bounding box of the .dae mesh in units specified inside the .dae file ? I can scale it myself then.

  3. Is there a way to know the center of mass of the model inside that bounding box from the file ?

I am looking for solutions that does not require my opening every model in a 3D model editor and exporting it to another format. Ideally, I want to figure this out from the .dae file itself.

Thanks,

Prasanna

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-06-25 06:19:52 -0500

wentz gravatar image
  1. As far as i know it is not possible to scale collada files when spawning them

  2. You can use Blender to scale your collada models to the proper size: https://www.youtube.com/watch?v=AIQl5...

  3. You can visualize the center of mass of each model in the gazebo gui, also this is defined indirectly by the inertia element inside the sdf file.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-06-22 13:37:42 -0500

Seen: 132 times

Last updated: Jun 25