Module navigationTactics :: Class AgentPIDTacticImpl
[hide private]
[frames] | no frames]

Class AgentPIDTacticImpl

source code

Implements a tactic in which an agent uses a PID controler to reach its goal position.

Instance Methods [hide private]
 
__init__(self, agentIndex, goalPos, rulesOfTheSea) source code
 
composeAction(self, agentWorldModel)
Implements the abstract method.
source code
 
composePIDAction(self, agentWorldModel)
Composes a PID-controller-based action in order to reach the goal.
source code
 
getAngleFixToGoal(self, estimatedState, goal)
According to the estimation, how much should we turn to point at the goal
source code
a list of ShipExternalState
getShipsOnACollisionPath(self, agentWorldModel)
Compute a list of ships that are on path to potential collision with the agent's ship.
source code
CompositeAction
composeAvoidingAction(self, shipsToAvoid, agentWorldModel)
Compute an action to take when there is a collision danger.
source code
Method Details [hide private]

composePIDAction(self, agentWorldModel)

source code 

Composes a PID-controller-based action in order to reach the goal. This function is by default used in unless there is a collision danger.

getAngleFixToGoal(self, estimatedState, goal)

source code 

According to the estimation, how much should we turn to point at the goal

Keyword arguments: estimatedState -- estimated ShipExternalState

returns: The angle we should turn

getShipsOnACollisionPath(self, agentWorldModel)

source code 

Compute a list of ships that are on path to potential collision with the agent's ship.

Parameters:
  • agentWorldModel (AgentWorldModel) - The belief state of the agent
Returns: a list of ShipExternalState
External states (position, orientation...) of ships that are on a path to potential collision with the agent's ship.

composeAvoidingAction(self, shipsToAvoid, agentWorldModel)

source code 

Compute an action to take when there is a collision danger.

Parameters:
  • shipsToAvoid (a list of ShipExternalState) - External states (position, orientation...) of ships that are on a path to potential collision with the agent's ship.
  • agentWorldModel (AgentWorldModel) - The belief state of the agent
Returns: CompositeAction
Action to take in order to avoid collision