Hello, my name is Dakota and I am a senior in high school working on a research project required for graduation. I am attempting to make a robot follow a wall until it finds an objective. I'm trying to use a laser to determine when the robot should continue moving forward and when it should start turning. I've been trying to figure this out for a few weeks, but every time I resolve one error another occurs.
The code for the robot in the world file is:
pioneer2dx
(         
  name "r0"
  pose [ -6.946 -6.947 0 45.000 ]
  sicklaser( pose [ 0 0 0 0 ] ) \
  localization "gps"
  localization_origin [ 0 0 0 0 ]
)

In the cfg file:
driver
(
  name "stage"
  provides [ "position2d:0" "laser:0" ]
  model "r0"
)
And finally when it is called in the controller (I'm using a python wrapper to code the controller)
l = playerc_laser(c,0)
if l.subscribe(PLAYERC_OPEN_MODE) != 0:
 raise playerc_error_str()

if l.get_geom() != 0:
 raise playerc_error_str()
print 'Laser pose: (%.3f,%.3f,%.3f)' % (l.pose[0],l.pose[1],l.pose[2])

while not objectivefound:
 if c.read() == None:
  raise playerc_error_str()
 if l.scan_count == 0:
  p.set_cmd_vel(2.0,0.0,0.0,1)
 else:
  p.set_cmd_vel(0.0,0.0,20*math.pi/180,1)

Any help would be greatly appreciated, I'm very new and very inexperienced with player/stage, and to graduate from my school I have to do well on this project. Thanks to anyone who can help, and thanks to everyone for your time and consideration.

Description: Description: ASFADakota Ginn
Alabama School of Fine Arts
1800 Reverend Abraham Woods Jr. Boulevard
Birmingham, AL 35203
T: 205.276.1387
E: dginn@asfa.k12.al.us