cz.cuni.amis.pogamut.usar2004.samples
Class P2DXLogicController

Package class diagram package P2DXLogicController
java.lang.Object
  extended by cz.cuni.amis.pogamut.usar2004.agent.USAR2004BotController<BOT>
      extended by cz.cuni.amis.pogamut.usar2004.agent.module.logic.USAR2004BotLogicController
          extended by cz.cuni.amis.pogamut.usar2004.samples.P2DXLogicController
All Implemented Interfaces:
cz.cuni.amis.pogamut.base.agent.module.IAgentLogic, IUSAR2004BotController, IUSAR2004BotLogicController

public class P2DXLogicController
extends USAR2004BotLogicController

P2DX robot utilizing logic controller. It drives to the most open direction and reverses if an obstacle is too close.

Author:
vejmanm

Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.usar2004.agent.module.logic.USAR2004BotLogicController
logicModule
 
Fields inherited from class cz.cuni.amis.pogamut.usar2004.agent.USAR2004BotController
bot, user, USER_LOG_CATEGORY_ID
 
Constructor Summary
P2DXLogicController()
           
 
Method Summary
 void initializeController(USAR2004Bot bot)
          Called during the construction of the UT2004Bot before the GameBots2004 greets the bot even before IUT2004BotController#prepareBot(UT2004Bot) method.
 void logic()
          this method is triggered by receipt of STA message.
static void main(String[] args)
           
 void prepareBot(USAR2004Bot bot)
          Initialization of modules used within this robot.
 void RangesReady(ArrayList<Double> Ranges)
          Devides ranges into thirds and decides which way to set motor speeds.
 void robotInitialized(NfoMessage nfom)
          Method triggered after Game is initialized and STARTPOSES obtained.
 
Methods inherited from class cz.cuni.amis.pogamut.usar2004.agent.module.logic.USAR2004BotLogicController
beforeFirstLogic, getLogicInitializeTime, getLogicShutdownTime, logicInitialize, logicShutdown
 
Methods inherited from class cz.cuni.amis.pogamut.usar2004.agent.USAR2004BotController
getAct, getLog, getWorldView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

P2DXLogicController

public P2DXLogicController()
Method Detail

robotInitialized

public void robotInitialized(NfoMessage nfom)
Method triggered after Game is initialized and STARTPOSES obtained. Tt will spawn the robot into the environment.

Specified by:
robotInitialized in interface IUSAR2004BotController
Overrides:
robotInitialized in class USAR2004BotController
Parameters:
nfom - NfoMessge containing STARTPOSES

initializeController

public void initializeController(USAR2004Bot bot)
Description copied from interface: IUSAR2004BotController
Called during the construction of the UT2004Bot before the GameBots2004 greets the bot even before IUT2004BotController#prepareBot(UT2004Bot) method.

NOTE: This is Pogamut's developers reserved method - do not override it and if you do, always use 'super' to call parent's initializeController.

Specified by:
initializeController in interface IUSAR2004BotController
Overrides:
initializeController in class USAR2004BotLogicController

prepareBot

public void prepareBot(USAR2004Bot bot)
Initialization of modules used within this robot.

Specified by:
prepareBot in interface IUSAR2004BotController
Overrides:
prepareBot in class USAR2004BotController
Parameters:
bot - Necessary parameter for hooking listeners and for sending commands

logic

public void logic()
this method is triggered by receipt of STA message. This is where all behaviour is controlled

Specified by:
logic in interface cz.cuni.amis.pogamut.base.agent.module.IAgentLogic
Overrides:
logic in class USAR2004BotLogicController

RangesReady

public void RangesReady(ArrayList<Double> Ranges)
Devides ranges into thirds and decides which way to set motor speeds.

Parameters:
Ranges - list of ranges from Range scanner.

main

public static void main(String[] args)


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.