code: def update(self):
          '''
          Updates LaserData.
          '''
          if self.hasproxy():
              sonarD = SonarData()
              range = 0
              data = self.proxy.getSonarData()
  
              sonarD.range = data.range
              sonarD.maxAngle = data.maxAngle
              sonarD.minAngle = data.minAngle
              sonarD.maxRange = data.maxRange
              sonarD.minRange = data.minRange
  
  
              self.lock.acquire()
              self.sonar = sonarD
              self.lock.release(f update(self):
          '''
          Updates LaserData.
          '''
          if self.hasproxy():
              sonarD = SonarData()
              range = 0
              data = self.proxy.getSonarData()
  
              sonarD.range = data.range
              sonarD.maxAngle = data.maxAngle
              sonarD.minAngle = data.minAngle
              sonarD.maxRange = data.maxRange
              sonarD.minRange = data.minRange
  
  
              self.lock.acquire()
              self.sonar = sonarD
              self.lock.release()
docs: Updates LaserData.