Attention: Answers.ros.org is deprecated as of August the 11th, 2023. Please visit robotics.stackexchange.com to ask a new question. This site will remain online in read-only mode during the transition and into the foreseeable future. Selected questions and answers have been migrated, and redirects have been put in place to direct users to the corresponding questions on Robotics Stack Exchange. Additional details are available here.
i'm not familiar with a way to change world files using ROS tools...
A few workarounds -
If your "worlds" are composed of a small number of models it could be easy enough to use gazebo_ros's tools to spawn and delete models, and to reposition your robot as needed.
alternately, if you don't mind killing and restarting all your nodes, this should easy enough to manage with a bash or python script