Beispiel #1
0
 def on_enter(self):
     current_pose = self.robot.pose
     dx = self.pose.x - current_pose.x
     dy = self.pose.y - current_pose.y
     angle = math.atan2(dy, dx) + math.pi
     self.packet = packets.Rotate(direction=self.direction, angle=angle)
     return AbstractMove.on_enter(self)
 def __init__(self,
              angle,
              direction=DIRECTION_AUTO,
              virtual=True,
              opponent_handling_config=OPPONENT_HANDLING_NONE):
     super().__init__(opponent_handling_config)
     pose = position.Pose(0.0, 0.0, angle, virtual)
     self.packet = packets.Rotate(direction=direction, angle=pose.angle)
Beispiel #3
0
 def __init__(self,
              angle,
              direction=DIRECTION_FORWARD,
              chained=None,
              virtual=True):
     super().__init__(chained, NO_OPPONENT_HANDLING)
     pose = position.Pose(0.0, 0.0, angle, virtual)
     self.packet = packets.Rotate(direction=direction, angle=pose.angle)
Beispiel #4
0
 def create_packet(self):
     return packets.Rotate()