cz.cuni.amis.pogamut.emohawk.agent.module.sensomotoric
Class EmohawkNavigation

Package class diagram package EmohawkNavigation
java.lang.Object
  extended by cz.cuni.amis.pogamut.emohawk.agent.module.sensomotoric.EmohawkNavigation

public class EmohawkNavigation
extends Object

Facade for navigation in UT2004. Method navigate() can be called both synchronously and asynchronously. Uses IUT2004PathExecutor, FloydWarshallMap, IUT2004RunStraight and IUT2004GetBackToNavGraph to handle all possible navigation cases.

Author:
knight, jimmy

Field Summary
protected static int ARRIVED_AT_LOCATION_XY_THRESHOLD
          Location threshold for checking whether we have arrived on target.
protected static int ARRIVED_AT_LOCATION_Z_THRESHOLD
          Location threshold for checking whether we have arrived on target.
static double AT_LOCATION
          We're managed to get to location
static double AT_PLAYER
          We're managed to get to player
protected  cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot bot
          UT2004Bot reference.
protected  cz.cuni.amis.pogamut.base.agent.navigation.IPathFuture currentFuturePath
          Current path stored in IPathFuture object.
protected  cz.cuni.amis.pogamut.base3d.worldview.object.ILocated currentTarget
          Current location target.
protected  cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player currentTargetPlayer
          Current target is player (if not null)
protected  cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEventListener<cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.EndMessage> endMessageListener
           
protected  cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint fromNavPoint
          Navpoint we're running from (initial position when path executor has been triggered)
protected  cz.cuni.amis.pogamut.ut2004.agent.navigation.floydwarshall.FloydWarshallMap fwMap
          FloydWarshallMap that is used for path planning.
protected  cz.cuni.amis.pogamut.base3d.worldview.object.ILocated lastTarget
          Last location target.
protected  cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player lastTargetPlayer
          Last location target.
protected  cz.cuni.amis.pogamut.base.utils.logging.LogCategory log
          Log used by this class.
protected  boolean navigating
          Whether navigation is running.
protected static int NEW_PATH_DISTANCE_THRESHOLD
          Location threshold for requesting of a new path or switching a path.
protected static double PLAYER_DISTANCE_TRASHOLD
          When PLAYER is further from currentTarget than this location, recompute the path
protected  boolean runningStraightToPlayer
          We're running straight to the player.
protected  cz.cuni.amis.pogamut.base3d.worldview.object.Location runningStraightToPlayerFailedAt
          Where run-straight failed.
protected  cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint toNavPoint
          Navpoint we're running to, nearest navpoint to currentTarget
 
Constructor Summary
EmohawkNavigation(cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot bot, Steering steering, cz.cuni.amis.pogamut.ut2004.agent.navigation.floydwarshall.FloydWarshallMap fwMap)
          Here you may specify any custom UT2004Navigation parts.
 
Method Summary
 List<cz.cuni.amis.pogamut.base3d.worldview.object.ILocated> getCurrentPathCopy()
           
 List<cz.cuni.amis.pogamut.base3d.worldview.object.ILocated> getCurrentPathDirect()
           
 cz.cuni.amis.pogamut.base3d.worldview.object.ILocated getCurrentTarget()
           
 cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint getCurrentTargetNavPoint()
           
 cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player getCurrentTargetPlayer()
           
 cz.cuni.amis.pogamut.base3d.worldview.object.ILocated getLastTarget()
           
 cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint getLastTargetNavPoint()
           
 cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint getLastTargetPlayer()
           
 cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint getNearestNavPoint(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated location)
           
 boolean isNavigating()
           
protected  void navigate()
           
 void navigate(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated target)
           
 void navigate(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player player)
           
protected  void processPathFuture(cz.cuni.amis.pogamut.base.agent.navigation.IPathFuture futurePath)
          Checks if last path element is in close distance from our desired target and if not, we will add our desired target as the last path element.
protected  void reset(boolean stopGetBackToNavGraph)
           
 void setFocus(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated located)
           
protected  void startNavigate()
           
 void stopNavigation()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEW_PATH_DISTANCE_THRESHOLD

protected static final int NEW_PATH_DISTANCE_THRESHOLD
Location threshold for requesting of a new path or switching a path.

See Also:
Constant Field Values

ARRIVED_AT_LOCATION_XY_THRESHOLD

protected static final int ARRIVED_AT_LOCATION_XY_THRESHOLD
Location threshold for checking whether we have arrived on target. For XY - 2D plane distance

See Also:
Constant Field Values

ARRIVED_AT_LOCATION_Z_THRESHOLD

protected static final int ARRIVED_AT_LOCATION_Z_THRESHOLD
Location threshold for checking whether we have arrived on target. For Z distance.

See Also:
Constant Field Values

PLAYER_DISTANCE_TRASHOLD

protected static final double PLAYER_DISTANCE_TRASHOLD
When PLAYER is further from currentTarget than this location, recompute the path

See Also:
Constant Field Values

AT_PLAYER

public static final double AT_PLAYER
We're managed to get to player

See Also:
Constant Field Values

AT_LOCATION

public static final double AT_LOCATION
We're managed to get to location

See Also:
Constant Field Values

log

protected cz.cuni.amis.pogamut.base.utils.logging.LogCategory log
Log used by this class.


fwMap

protected cz.cuni.amis.pogamut.ut2004.agent.navigation.floydwarshall.FloydWarshallMap fwMap
FloydWarshallMap that is used for path planning.


bot

protected cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot bot
UT2004Bot reference.


endMessageListener

protected cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEventListener<cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.EndMessage> endMessageListener

lastTarget

protected cz.cuni.amis.pogamut.base3d.worldview.object.ILocated lastTarget
Last location target.


lastTargetPlayer

protected cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player lastTargetPlayer
Last location target.


currentTarget

protected cz.cuni.amis.pogamut.base3d.worldview.object.ILocated currentTarget
Current location target.


currentTargetPlayer

protected cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player currentTargetPlayer
Current target is player (if not null)


fromNavPoint

protected cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint fromNavPoint
Navpoint we're running from (initial position when path executor has been triggered)


toNavPoint

protected cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint toNavPoint
Navpoint we're running to, nearest navpoint to currentTarget


currentFuturePath

protected cz.cuni.amis.pogamut.base.agent.navigation.IPathFuture currentFuturePath
Current path stored in IPathFuture object.


navigating

protected boolean navigating
Whether navigation is running.


runningStraightToPlayer

protected boolean runningStraightToPlayer
We're running straight to the player.


runningStraightToPlayerFailedAt

protected cz.cuni.amis.pogamut.base3d.worldview.object.Location runningStraightToPlayerFailedAt
Where run-straight failed.

Constructor Detail

EmohawkNavigation

public EmohawkNavigation(cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot bot,
                         Steering steering,
                         cz.cuni.amis.pogamut.ut2004.agent.navigation.floydwarshall.FloydWarshallMap fwMap)
Here you may specify any custom UT2004Navigation parts.

Parameters:
bot -
ut2004PathExecutor -
fwMap -
getBackOnPath -
runStraight -
Method Detail

isNavigating

public boolean isNavigating()

setFocus

public void setFocus(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated located)

stopNavigation

public void stopNavigation()

navigate

public void navigate(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated target)

navigate

public void navigate(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player player)

getNearestNavPoint

public cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint getNearestNavPoint(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated location)

getCurrentPathCopy

public List<cz.cuni.amis.pogamut.base3d.worldview.object.ILocated> getCurrentPathCopy()

getCurrentPathDirect

public List<cz.cuni.amis.pogamut.base3d.worldview.object.ILocated> getCurrentPathDirect()

getCurrentTarget

public cz.cuni.amis.pogamut.base3d.worldview.object.ILocated getCurrentTarget()

getCurrentTargetPlayer

public cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player getCurrentTargetPlayer()

getCurrentTargetNavPoint

public cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint getCurrentTargetNavPoint()

getLastTarget

public cz.cuni.amis.pogamut.base3d.worldview.object.ILocated getLastTarget()

getLastTargetPlayer

public cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint getLastTargetPlayer()

getLastTargetNavPoint

public cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint getLastTargetNavPoint()

startNavigate

protected void startNavigate()

navigate

protected void navigate()

processPathFuture

protected void processPathFuture(cz.cuni.amis.pogamut.base.agent.navigation.IPathFuture futurePath)
Checks if last path element is in close distance from our desired target and if not, we will add our desired target as the last path element.

Parameters:
futurePath -

reset

protected void reset(boolean stopGetBackToNavGraph)


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