Gazebo | Ignition | Community
Ask Your Question
0

Mesh Scale Huge for .stl file

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

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

Comments

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

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

1 Answer

Sort by ยป oldest newest most voted
1

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

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:

<mesh>
  <uri>model://model_name/meshes/your_mesh.stl</uri>
  <scale>0.001 0.001 0.001</scale>
</mesh>

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

edit flag offensive delete link more

Comments

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

Question Tools

Stats

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

Seen: 7,011 times

Last updated: Mar 23 '15