0
$\begingroup$

Rosanswers logo

I ran into some trouble when trying to import a Collada mesh file as static world into Gazebo (similar to a previous question).

  1. How can gazebo worlds be distributed into ROS packages? The actual .world file can be put into a package, but in there the mesh is loaded with

    <body:trimesh name="willow_map_body"> <geom:trimesh name="willow_map_geom"> meshfile.dae (...) </geom:trimesh> </body:trimesh>

It seems like the actual file (meshfile.dae) needs to be copied manually into simulator_gazebo/gazebo/gazebo/share/gazebo/Media/models/willowgarage.dae or is there a better way?

  1. I ended up with wrongly scaled worlds after exporting a .dae from SketchUp. Could it be that Gazebo requires inches as units for meshes? For example, wg_collada.world in gazebo_worlds has a <scale>0.02 0.02 0.02</scale> tag. But shouldn't that instead be <scale>0.0254 0.0254 0.0254</scale>? Otherwise the whole world is slightly too small.

Originally posted by AHornung on ROS Answers with karma: 5904 on 2011-08-24

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

For 1), please see this page for resource paths.

For 2), gazebo is unit-less, as long as you pick a consistent set of units for all your models. That said, the PR2 is in meters.

The 0.02 scale for the wg model was arbitrarily chosen, the model was constructed in sketchup and things appeared to be scaled incorrectly without a scale.

Thanks for the update, I've changed wg_collada.world scale to 0.0254.


Originally posted by hsu with karma: 5780 on 2011-08-24

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by AHornung on 2011-08-25:
... but noticed that it's slightly too small when using 0.2 scale. It should really be 0.0254 (which is also in the collada XML header from Sketchup) so that a length of 39.37 "units" (here inch) is 1 meter.

Comment by AHornung on 2011-08-25:
Regarding 2): Looks like I've been bitten once more by the Sketchup export bug. I knew the units were wrong (i.e. default to inches with no possibility to change) for VRML, this is apparently also the case for Collada exports. I've also used Sketchup to build a small portion of the Willow map...

Comment by AHornung on 2011-08-25:
Thanks, 1) works great!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.