class PlanSch

plan.rb         ########

@author: Team17 #

Public Class Methods

new() click to toggle source
Calls superclass method Plan.new
# File plan/PlanSch.rb, line 7
def initialize
  super
end

Public Instance Methods

replan() click to toggle source
# File plan/PlanSch.rb, line 11
  def replan
    
    @plan.clear
#    if !(EnvironmentModel.beamablePlayMode)
      @agentInfo.whereIsBall();
      @agentInfo.isBallMine();
      @agentInfo.nearBall();
      @agentInfo.ballControlPosition();
        
      @target_position = @agentInfo.ballControlPosition()
      @target_position_phi = @target_position.getPhi()
      @kick_target = @agentInfo.kickTarget()
      @kick_target_phi =  @kick_target.getPhi()
      
      if (me.on_ground? or me.is_lying_on_back? or me.is_lying_on_belly?)
        @agentInfo.loguj('GetUp');
        @plan << GetUp.new(Proc.new{me.on_ground?})
      elsif (not see_ball?) 
        puts "Searching ball"
        @agentInfo.loguj('Localize');
        @plan << Localize.new(Proc.new{(not see_ball?)})
      else
        @targetPosition = Java::sk.fiit.robocup.library.geometry.Vector3D.cartesian(5, 5, 0)
        @agentInfo.loguj('GoToBall');
        @plan << GotoBall.new(@targetPosition)
      end
#       end
  end