Ejemplo n.º 1
0
 def default_action(self):
     LaserScanner.default_action(self)
     self.local_data['range']=mean(self.local_data['range_list'])
     self.local_data['incidence']=self._rot+90-self.scan_coverage/2
     self.bge_object.applyRotation([0,radians(self.angle_per_ping),0],True)
     self._rot+=self.angle_per_ping
     if self._rot > self.scan_coverage :
         self.bge_object.applyRotation([0,-radians(self._rot),0],True)
         self._rot = 0
Ejemplo n.º 2
0
 def default_action(self):
     LaserScanner.default_action(self)
     self.local_data['range'] = mean(self.local_data['range_list'])
     self.local_data['incidence'] = self._rot + 90 - self.scan_coverage / 2
     self.bge_object.applyRotation([0, radians(self.angle_per_ping), 0],
                                   True)
     self._rot += self.angle_per_ping
     if self._rot > self.scan_coverage:
         self.bge_object.applyRotation([0, -radians(self._rot), 0], True)
         self._rot = 0