cz.cuni.amis.pogamut.ut2004.bot.command
Class SimpleLocomotion

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT>
      extended by cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule<UT2004Bot>
          extended by cz.cuni.amis.pogamut.ut2004.bot.command.BotCommands
              extended by cz.cuni.amis.pogamut.ut2004.bot.command.SimpleLocomotion
All Implemented Interfaces:
IComponent
Direct Known Subclasses:
AdvancedLocomotion

public class SimpleLocomotion
extends BotCommands

Class providing Pogamut2 UT2004 simple locomotion commands for the bot - basic movement and turning.


Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule
act, worldView
 
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule
agent, controller, eventBus, log
 
Constructor Summary
SimpleLocomotion(UT2004Bot agent, java.util.logging.Logger log)
          Constructor.
 
Method Summary
 void jump()
          Bot will make simple jump (Issues GB JUMP command)
 void moveTo(ILocated location)
          Bot will move to supplied location.
 void setRun()
          Sets the running speed for the bot movement commands.
 void setWalk()
          Sets the walking speed for the bot movement commands.
 void stopMovement()
          Makes the bot to stop all movement or turning.
 void turnHorizontal(int amount)
          Rotates the bot by the supported amount (in degrees) in left/right direction (issues GB ROTATE command)
 void turnTo(ILocated location)
          Bot will turn to face supported location (issues GB TURNTO command)
 void turnTo(Item item)
          Bot will turn to face 'item' (isseus GB TURNTO command), the bot will face the item even if it or the item moves.
 void turnTo(Player player)
          Bot will turn to face 'player' (isseus GB TURNTO command), the bot will face the player even if it or the player moves.
 void turnVertical(int amount)
          Rotates the bot by the supported amount (in degrees) in up/down direction (issues GB ROTATE command)
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule
cleanUp, getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleLocomotion

public SimpleLocomotion(UT2004Bot agent,
                        java.util.logging.Logger log)
Constructor. Setups the command module based on given agent and logger.

Parameters:
agent - AbstractUT2004Bot we will send commands for
log - Logger to be used for logging runtime/debug info.
Method Detail

moveTo

public void moveTo(ILocated location)
Bot will move to supplied location. (issues GB MOVE command)

Parameters:
locatedTarget - Object with location. We will move to this location.
See Also:
stopMovement()

stopMovement

public void stopMovement()
Makes the bot to stop all movement or turning. (Does not stop shooting.) (issues GB STOP command)

See Also:
moveTo(ILocated)

turnTo

public void turnTo(ILocated location)
Bot will turn to face supported location (issues GB TURNTO command)

Parameters:
location - Location we will face.
See Also:
turnHorizontal(int), turnVertical(int)

turnTo

public void turnTo(Player player)
Bot will turn to face 'player' (isseus GB TURNTO command), the bot will face the player even if it or the player moves.

Parameters:
player - Player we will face.

turnTo

public void turnTo(Item item)
Bot will turn to face 'item' (isseus GB TURNTO command), the bot will face the item even if it or the item moves.

Parameters:
item - Item we will face.

turnHorizontal

public void turnHorizontal(int amount)
Rotates the bot by the supported amount (in degrees) in left/right direction (issues GB ROTATE command)

Parameters:
amount - Amount of rotation in degrees.
See Also:
turnVertical(int), turnTo(ILocated)

turnVertical

public void turnVertical(int amount)
Rotates the bot by the supported amount (in degrees) in up/down direction (issues GB ROTATE command)

Parameters:
amount - Amount of rotation in degrees.
See Also:
turnHorizontal(int), turnTo(ILocated)

jump

public void jump()
Bot will make simple jump (Issues GB JUMP command)


setWalk

public void setWalk()
Sets the walking speed for the bot movement commands. (issues GB SETWALK command)

See Also:
setRun()

setRun

public void setRun()
Sets the running speed for the bot movement commands. (issues GB SETWALK command)

See Also:
setWalk()