#4 Robot not destroyed on world reset

open
nobody
None
5
2012-10-24
2009-01-26
Matthew Bell
No

If you reset the world before stopping your robot the robot becomes invisible but still carries out your commands.

Load harvest3.wld in "Robot: Code and Learn"
Load en_harvest3a.rur

start program
reset world before all beepers are picked up
You'll see the beepers continue to disappear though the robot is nowhere to be seen.

(Occured on Windows XP, 100% reprorate, reproduced 10 times)

Discussion

  • Matthew Bell
    Matthew Bell
    2009-01-26

    Changing

    def ResetWorld(self, dummy):
        if self.isRunning:
            return
        self.UpdateWorld()
    

    to

    def ResetWorld(self, dummy):
        if self.user_program.isRunning:
            return
        self.UpdateWorld()
    

    fixes problem.

     
  • Matthew Bell
    Matthew Bell
    2009-01-26

    That is to say
    def ResetWorld(self, dummy):
    (indented)if self.user_program.isRunning:
    (indented twice)return
    (indented)self.UpdateWorld()