0
$\begingroup$

Rosanswers logo

Hi

I have some problems switching to gazebo 1.0. My old .model file seem to be invalid (although there are others in the gazebo_worlds package that still seem to work and are parsed in "deprecated file mode"). So I copied over the wg_walls.model which is in version 1.0 format, but I'm not able to use this model the way I used the old one. My launchfile looks like this:

<param name="wg_walls" textfile="$(find gazebo_worlds)/objects/wg_walls.model" />
<node name="xml2factor_wg_walls" pkg="gazebo" type="spawn_model" args="-gazebo -param wg_walls -x -5.65 -y -5.65 -model wg_walls" respawn="false" output="screen" />

Unfortunately gazebo crashes when spawning the model.

Segmentation fault (core dumped)

No further output.

How can I load the walls model in gazebo? Do I need a different spawn command, is it a problem with the model? How would I include the walls in my world file? I remember I used the spawn_model node because the old gazebo crashed when using the walls within the .world file.

I can't find any up to date documentation about the world and model files for gazebo. Everything I can find seems to be pre 1.0.

UPDATE: after updating gazebo and with some help of hsu I can get the map to load now when I use the simple_office.jpg that is now inverted in the textures directory. But it still looks strange, textures aren't applied correctly and some walls are just missing. I wouldn't mind about the textures, but I need the walls. The walls are not at the position I like them to be. Where should I adjust the position? there is an origin tag within the link tag, an origin attribute within the heightmap tag and I can specify a position when spawning the walls model (using -x -y parameters). The spawn_model parameters seem to be ignored for static models, right? what about the origin tag? It doesn't seem to do anything either. So I have to use the origin attribute of heightmap, but I would prefer using the origin tag of the link and omitting the heightmap origin attribute, so I only have to change one value instead of two. And what about the size attribute? I use size="25.7 25.7 2", but if the grid has a resolution of 1m, the actual size of the map is something like 16x15m. Why are there multiple textures and blend tags within the (visual) hightmap? How do I know which texture is applied or which blend, what does blend do?

One more important question I have: Is it somehow possible to use images within my own stack folder to generate a map? I can't edit the files that are in the gazebo stack, but I would like to be able to make my own map. the heightmap filename doesn't accept full file names, setting the GAZEBO_RESOURCE_PATH environment variable to the folder where my files are doesn't help either. I always get the message "Error [Image.cc:141] Unable to open image file[simple_office.png], check your GAZEBO_RESOURCE_PATH settings." and gazebo dies.

Is there something I can do about the collision issues? As soon as a spawn my robot model it seems to be in collision with the walls and flies away.

Thanks again for any help.


Originally posted by Kai Bublitz on ROS Answers with karma: 357 on 2012-08-27

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The new release 1.6.14 fixes the segfault for wg_walls.model, but not tests yet to make sure the model collision behaves correctly.


Originally posted by hsu with karma: 5780 on 2012-08-28

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Kai Bublitz on 2012-08-29:
Well, it doesn't crash anymore, but it looks a little weird. It's like the geometry is inverted, the "walls" are carved into solid blocks. The robot is flying somewhere in the air, far far away from the walls, the front wheels have a wrong orientation (at least in gazebo gui)

Comment by Kai Bublitz on 2012-08-29:
By the way, where has the old willow map gone? The one with one big and 4 smaller rooms? I used this smaller map for my tests and now it's gone.

Comment by hsu on 2012-08-29:
@Kai Bublitz: do you mean this map: https://code.ros.org/svn/ros-pkg/stacks/simulator_gazebo/trunk/gazebo_worlds/Media/materials/textures/simple_office.jpg ?

Comment by hsu on 2012-08-29:
And yes, the mapping between pixel value and terrain height has been inverted, i.e. now a black pixel with value 0 is mapped to zero height. While this is being fixed, can you do a black/white flip on your map image?

Comment by Kai Bublitz on 2012-08-29:
thanks for your help, I can load the map now, but I still have some problems. I will update my question above. If you don't mind you could help me a little more.

$\endgroup$

Your Answer

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