hi, i am new to linux and also to stage;

i want to creat a diffferential robot with a basic sonar sensor.
how can i do that, i have written a basic code can any onw pls tell me whr im goin wrong;
and how can i change it...

this code is for the .cfg file....
driver

  name "stage"
  provides ["simulation:0"]
  plugin "libstage"
)
driver
(  
name "stage"
  provides ["position:0" "sonar:0"]
  model "robot"
)

this is the code for .world file

# defines Pioneer-like robots
include "pioneer.inc"
# defines 'map' object used for floorplans
include "map.inc"
# set the size of a pixel in meters
resolution 0.02

# configure the GUI window
window
(
  size [ 662.000 654.000 ]
  center [0.660 -1.170]
  scale 0.027
)

# load an environment bitmap
map
(
  bitmap "bitmaps/cave.png"
  size [15 15]
  boundary 1
)


position
(
 pose [1 1 0]
 color "red"
 name "robot"
 sonar()
)
# create a robot
pioneer2dx
(
  name "robot"
  pose [-6.291 -5.941 -199.600]
  define p2dx_sonar ranger
(

  scount 16

# define the pose of each transducer [xpos ypos heading]
  spose[0] [ 0.075 0.130 90 ]
  spose[1] [ 0.115 0.115 50 ]
  spose[2] [ 0.150 0.080 30 ]
  spose[3] [ 0.170 0.025 10 ]
  spose[4] [ 0.170 -0.025 -10 ]
  spose[5] [ 0.150 -0.080 -30 ]
  spose[6] [ 0.115 -0.115 -50 ]
  spose[7] [ 0.075 -0.130 -90 ]
  spose[8] [ -0.155 -0.130 -90 ]
  spose[9] [ -0.195 -0.115 -130 ]
  spose[10] [ -0.230 -0.080 -150 ]
  spose[11] [ -0.250 -0.025 -170 ]
  spose[12] [ -0.250 0.025 170 ]
  spose[13] [ -0.230 0.080 150 ]
  spose[14] [ -0.195 0.115 130 ]
  spose[15] [ -0.155 0.130 90 ]
 

  # define the field of view of each transducer [range_min range_max view_angle]
  sview[0] [0 5.0 15]
  sview[1] [0 5.0 15]
  sview[2] [0 5.0 15]
  sview[3] [0 5.0 15]
  sview[4] [0 5.0 15]
  sview[5] [0 5.0 15]
  sview[6] [0 5.0 15]
  sview[7] [0 5.0 15]
  sview[8] [0 5.0 15]
  sview[9] [0 5.0 15]
  sview[10] [0 5.0 15]
  sview[11] [0 5.0 15]
  sview[12] [0 5.0 15]
  sview[13] [0 5.0 15]
  sview[14] [0 5.0 15]
  sview[15] [0 5.0 15]

  # define the size of each transducer [xsize ysize] in meters
  ssize[0] [0.01 0.05]
  ssize[1] [0.01 0.05]
  ssize[2] [0.01 0.05]
  ssize[3] [0.01 0.05]
  ssize[4] [0.01 0.05]
  ssize[5] [0.01 0.05 ]
  ssize[6] [0.01 0.05]
  ssize[7] [0.01 0.05]
  ssize[8] [0.01 0.05]
  ssize[9] [0.01 0.05]
  ssize[10] [0.01 0.05]
  ssize[11] [0.01 0.05]
  ssize[12] [0.01 0.05]
  ssize[13] [0.01 0.05]
  ssize[14] [ 0.01 0.05]
  ssize[15] [0.01 0.05]

)
)