0
$\begingroup$

Gazebo Answers logo

For a few (not all) of my world files, the world (as in, the walls and static objects) suddenly move (as in rotate and translate, all together) after calling the '/gazebo/reset_world' service. All the walls and static objects maintain the same position relative to each other. This would not be a problem, except my robot does not move with everything else, and in some worlds, this puts my robot inside a wall. I should add that for the problem worlds, the issue occurs whether or not I load the robot.

Here's a gist of one of the problem worlds: https://gist.github.com/lobachevzky/9ab925fcf50997ae4e50d427e51017d4

Thanks.


Originally posted by ethanabrooks on Gazebo Answers with karma: 3 on 2017-05-11

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

I think this happens because of the tag in your world file.

Basically, when Gazebo loads the world, it first loads the <world> tag and then applies the state changes described in <state>. When you reset the world, it goes back to before the states, so the world looks different from when you first loaded it.

The solution is to remove the state tags and apply those changes directly in the first world description.

(You might have generated this world by saving it through the Gazebo UI, correct? I just ticketed an issue about this)


Originally posted by chapulina with karma: 7504 on 2017-05-12

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by ethanabrooks on 2017-05-12:
Thank you so much for the answer. That is really strange! I did create some of those worlds using the GUI. What is the <state> field for, and what behavior in the GUI generates it?

Comment by chapulina on 2017-05-13:
The <state> field is most useful for logging and playback. What it means is that the state of the world has changed since it was first generated. So most probably your models were moved before saving the file, which explains the offset...

Comment by ethanabrooks on 2017-05-14:
I see. Thanks!

$\endgroup$

Your Answer

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