.world file

From Murray Wiki
Jump to navigationJump to search

A .world file is a file used by Stage to specify the properties of a simulation environment to be later used by Player. The environment characteristics specified using a world file include:

  • size of the environment
  • locations of obstacles in the environment
  • number of robots in the world
  • size and shape of each robot
  • characteristics of each robot (e.g., what sensors does it have, how does it move, etc.)

The .world file is specified in the .cfg file being run by Player. For more information, visit [1]

Sample .world file

Created during MVWTfest_January_2007 by Kevin Oishi

# steelebot-simple world file, based on simple.world

# defines steelebot robots
include "steelebot.inc"

# defines 'map' object used for floorplans
include "map.inc"

# size of the world in meters	(note: world size != environment size)
size [2.8956 6.4008]

# set the resolution of the underlying raytrace model in meters
resolution 0.02

# update the screen every 10ms (we need fast update for the stest demo)
gui_interval 20

# configure the GUI window
window
( 
  size [ 591.000 638.000 ] 
  center [-0.010 -0.040] 
  scale 0.028 
)

# load an environment bitmap
map
( 
#  bitmap "bitmap/cave.png"
  bitmap "mvwt.png"
  size [2.8956 6.4008]			# (world size)
  name "mvwt"
)

# create a robot
steelebot_circle
(
  name "robot1"
  color "red"
  pose [0 0 45]
)

# create robot #2
steelebot_square ( name "robot2" color "green" pose [1 1 45] )