public abstract class Tactical extends Object implements Runnable
Modifier and Type | Field and Description |
---|---|
protected WorldModel |
worldModel
Reference to the world model and map
|
Constructor and Description |
---|
Tactical(Execution execution,
Strategic strategic,
int vehicleType)
Creates a new instance of Tactical where-in the execution level is
assumed to be a thread running in the same JVM
|
Tactical(Strategic strategic,
int vehicleType)
Creates a new instance of Tactical that assumes the controller
is being used to control an execution level accessible via
the network as opposed to a thread in the same JVM
|
Modifier and Type | Method and Description |
---|---|
void |
enablePotentialField(boolean enable)
Turns potential field obstacle avoidance on or off
|
CommunicationsHandler |
getCommsHandler() |
Execution |
getExecution() |
TacticalConnection |
getExecutionComms() |
double |
getMissionTime() |
boolean |
getPotentialFieldEnabled() |
double[] |
getPotentialVector(double goalX,
double goalY)
Computes a unit potential vector that will steer the vehicle away from known
obstacles.
|
Strategic |
getStrategic() |
TacticalConnection |
getStrategicComms() |
WorldModel |
getWorldModel() |
boolean |
isRunning() |
List<JAXBElement<?>> |
readCommandElementListFromStrategic() |
String |
readMessageFromExecution()
Receives a message (if one is available) from the execution level
|
String |
readMessageFromStrategic()
Receives a message (if one is available) from the strategic level
|
void |
resetToFallbackScript()
Reverts to the previously executing script (fallback)
|
void |
run()
Implements the Runnable interface
|
void |
sendCommandToExecution()
Submits a String query to the execution level
|
void |
sendIVMessage(AvclMessage msg)
Transmits a message from this vehicle to other vehicles
|
void |
sendMessageToExecution(String msg)
Submits a String message to the execution level
|
void |
sendMessageToStrategic(String msg)
Submits a String message to the strategic level
|
void |
setScript(List<JAXBElement<?>> newScriptElementList)
Sets the currently executing script
|
protected WorldModel worldModel
public Tactical(Execution execution, Strategic strategic, int vehicleType)
public Tactical(Strategic strategic, int vehicleType)
public Execution getExecution()
public WorldModel getWorldModel()
public Strategic getStrategic()
public CommunicationsHandler getCommsHandler()
public double getMissionTime()
public TacticalConnection getExecutionComms()
public TacticalConnection getStrategicComms()
public boolean isRunning()
public void setScript(List<JAXBElement<?>> newScriptElementList)
newScriptElementList
- List containing a sequence of AVCL task-level command objects (JAXB)public void resetToFallbackScript()
public double[] getPotentialVector(double goalX, double goalY)
goalX
- north/south Cartesian coordinate of the goal pointgoalY
- east/west Cartesian coordinate of the goal pointpublic void enablePotentialField(boolean enable)
enable
- public boolean getPotentialFieldEnabled()
public void sendIVMessage(AvclMessage msg)
msg
- message to be sentpublic void sendCommandToExecution()
public void sendMessageToExecution(String msg)
public void sendMessageToStrategic(String msg)
public String readMessageFromExecution()
public String readMessageFromStrategic()
public List<JAXBElement<?>> readCommandElementListFromStrategic()