Gazebo | Ignition | Community
Ask Your Question

Mesh Scale Huge for .stl file

asked 2015-03-19 15:10:07 -0600

adam896 gravatar image

Hello, having a problem where the meshes which i'm importing to my URDF file are absolutely huge. The dimensions are correct in solidworks (around 400mm cube). I tried changing the units of the part back to meters as i was working in mm and this had no effect. Any idea what i'm doing wrong?

edit retag flag offensive close merge delete


It would help if you're able to share your STL and URDF files. You can just update the question.

chapulina gravatar imagechapulina ( 2015-03-19 15:26:27 -0600 )edit

I dont really know what was causing this, maybe the fact that the solidworks model was developed in mm rather than m, i ended up just using a scaling tag and setting the three parameters to 0.001 and it imported fine

adam896 gravatar imageadam896 ( 2015-03-23 11:55:09 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-03-23 12:16:42 -0600

chapulina gravatar image

It seems that there isn't a way to specify units in STL files. So whatever unit you use will be treated as meters by Gazebo. That's why your 400 mm cube came out as a 400 m cube.

Your solution seems to be the easiest one, to specify a scaling factor for the mesh on SDF, from mm to m for example:

  <scale>0.001 0.001 0.001</scale>

An alternative would be to rescale the mesh with an external editor.

edit flag offensive delete link more


That worked for me. just remember to write it down under every <mesh> part of the world code. Thank you!

javi.galarza.s gravatar imagejavi.galarza.s ( 2020-02-17 04:23:50 -0600 )edit
Login/Signup to Answer

Question Tools


Asked: 2015-03-19 15:10:07 -0600

Seen: 5,240 times

Last updated: Mar 23 '15