public class AvclPlannerFlowController extends Object
Modifier and Type | Field and Description |
---|---|
double[] |
recoveryPositionArray
Designated position for vehicle recovery
|
Constructor and Description |
---|
AvclPlannerFlowController(int passedVehicleID,
VehicleCharacteristics passedVehicleCharacteristics,
File missionFile,
int passedSearchPlannerType)
Creates a new instance of AvclPlannerFlowController
|
AvclPlannerFlowController(int passedVehicleID,
VehicleCharacteristics passedVehicleCharacteristics,
InputStream missionFile,
int passedSearchPlannerType)
Creates a new instance of AvclPlannerFlowController
|
AvclPlannerFlowController(int passedVehicleID,
VehicleCharacteristics passedVehicleCharacteristics,
String missionFile,
int passedSearchPlannerType)
Creates a new instance of AvclPlannerFlowController
|
AvclPlannerFlowController(VehicleCharacteristics passedVehicleCharacteristics,
AvclMission passedMission,
int passedSearchPlannerType)
Creates a new instance of AvclPlannerFlowController
|
Modifier and Type | Method and Description |
---|---|
void |
failCurrentGoal()
Iterates the controller in the instance that the current goal fails
|
List<JAXBElement<?>> |
generateAvclScriptElementList()
Generates a set of AVCL task-level commands corresponding to the computed plan for the current goal
|
List<JAXBElement<?>> |
generateAvclScriptElementList(String goalID)
Generates a set of AVCL task-level commands corresponding to the computed plan
for an arbitrary goal in the FSM
|
List<JAXBElement<?>> |
generateAvclScriptElementList(String goalID,
VehicleCharacteristics vehicleCharacteristics)
Generates a set of AVCL task-level commands corresponding to the computed plan
for an arbitrary goal in the FSM with updated vehicle characteristics
|
List<JAXBElement<?>> |
generateAvclScriptElementList(VehicleCharacteristics vehicleCharacteristics)
Generates a set of AVCL task-level commands corresponding to the computed plan for
the current goal using updated vehicle characteristics
|
List<JAXBElement<?>> |
generateReturnRoutingElementList()
Generates a set of AVCL task-level commands corresponding to the computed plan for the current goal
|
AvclMission |
generateScriptMission() |
AvclMission |
generateScriptMission(List<JAXBElement<?>> scriptCmds) |
AvclMission |
generateWholeMissionScript() |
GeoAreaSet |
getAvoidAreaSet() |
double[] |
getBestPosition() |
Object |
getCurrentGoal() |
int |
getCurrentGoalStatus() |
int |
getCurrentGoalType() |
boolean |
hasStateChanged() |
void |
initialize()
Sets vehicle-specific parameters that impact how the planners run
This method is used when the controller is attached to a Strategic level
that communicates with the execution level via network (no execution object)
|
void |
initialize(double[] position)
Sets vehicle-specific parameters that impact how the planners run
|
void |
initialize(double x,
double y)
Sets vehicle-specific parameters that impact how the planners run
|
void |
initialize(Execution vehicle)
Sets vehicle-specific parameters that impact how the planners run
|
void |
initialize(Execution vehicle,
double[] position)
Sets vehicle-specific parameters that impact how the planners run
|
void |
initialize(Execution vehicle,
double x,
double y)
Sets vehicle-specific parameters that impact how the planners run
|
boolean |
inOperatingArea(double[] pt) |
static void |
main(String[] args)
main method for testing and debugging use only
|
boolean |
missionComplete() |
void |
planScript()
Initiates planning for the current goal using the most recent vehicle position for the starting point
|
void |
planScript(double startX,
double startY)
Initiates planning for the current goal using an arbitrary starting point
|
void |
planScript(String goalID)
Initiates planning for an arbitrary goal using the most recent vehicle position for the starting point
|
void |
planScript(String goalID,
double startX,
double startY)
Initiates planning for an arbitrary goal using an arbitrary starting point
|
void |
processInternalMessage(String message)
Takes a String parameter (message from running vehicle) and processes the effect
effect on the current planner if required (depends on the message and type of planner)
|
void |
processIVMessage(AvclMessage msg)
Processes a message received from another vehicle
|
void |
resetPlannerSet()
Generates a logical finite state machine (FSM) with planners in
each state that correspond to the AVCL declarative mission FSM goals
|
void |
resetStateChanged()
Resets the "state changed" flag to false
|
void |
sendRequiredComms()
Directs the current planner to send any required inter-vehicle
communications based on the current goal status
|
void |
setCommunicator(CommunicationsHandler ivCommunicator)
Used to set the inter-vehicle communicator
|
void |
setPlannerState()
Resets the state of the current goal planner based on its internal variables
|
void |
setVehicle(Execution vehicle)
Sets the vehicle to be controlled by this controller
|
void |
setWorldModel(WorldModel world)
Sets the world model that the planners are to utilize
|
void |
succeedCurrentGoal()
Iterates the controller whenever the current goal succeeds
|
public double[] recoveryPositionArray
public AvclPlannerFlowController(int passedVehicleID, VehicleCharacteristics passedVehicleCharacteristics, String missionFile, int passedSearchPlannerType)
passedVehicleID
- passedVehicleCharacteristics
- characteristics that define what goals the vehicle is capable of accomplishingmissionFile
- path to the AVCL file containing the declarative missionpassedSearchPlannerType
- enumeration for the type of search pattern that is to be generated
if required (normally SearchPatternPlanner.DEFAULT except for testing)public AvclPlannerFlowController(int passedVehicleID, VehicleCharacteristics passedVehicleCharacteristics, File missionFile, int passedSearchPlannerType)
passedVehicleID
- passedVehicleCharacteristics
- characteristics that define what goals the vehicle is capable of accomplishingmissionFile
- File object reference to the AVCL file containing the declarative missionpassedSearchPlannerType
- enumeration for the type of search pattern that is to be generated
if required (normally SearchPatternPlanner.DEFAULT except for testing)public AvclPlannerFlowController(int passedVehicleID, VehicleCharacteristics passedVehicleCharacteristics, InputStream missionFile, int passedSearchPlannerType)
passedVehicleID
- passedVehicleCharacteristics
- characteristics that define what goals the vehicle is capable of accomplishingmissionFile
- Stream from which the AVCL file containing the declarative mission is to be readpassedSearchPlannerType
- enumeration for the type of search pattern that is to be generated
if required (normally SearchPatternPlanner.DEFAULT except for testing)public AvclPlannerFlowController(VehicleCharacteristics passedVehicleCharacteristics, AvclMission passedMission, int passedSearchPlannerType)
passedVehicleCharacteristics
- characteristics that define what goals the vehicle is capable of accomplishingpassedMission
- AvclMission object containing the declarative AVCL missionpassedSearchPlannerType
- enumeration for the type of search pattern that is to be generated
if required (normally SearchPatternPlanner.DEFAULT except for testing)public void resetPlannerSet()
public void initialize(double[] position)
position
- double[2] containing the vehicle's current positionpublic void initialize()
public void initialize(double x, double y)
x
- x coordinate of the vehicle starting position to use during planningy
- y coordinate of the vehicle starting position to use during planningpublic void initialize(Execution vehicle, double[] position)
vehicle
- vehicleposition
- double[2] containing the vehicle's current positionpublic void initialize(Execution vehicle, double x, double y)
vehicle
- execution object of the vehicle that is being controlledx
- x coordinate of the vehicle starting position to use during planningy
- y coordinate of the vehicle starting position to use during planningpublic void initialize(Execution vehicle)
vehicle
- execution object of the vehicle that is being controlledpublic void setWorldModel(WorldModel world)
world
- public GeoAreaSet getAvoidAreaSet()
public void setCommunicator(CommunicationsHandler ivCommunicator)
ivCommunicator
- public boolean missionComplete()
public void succeedCurrentGoal()
public void failCurrentGoal()
public void setVehicle(Execution vehicle)
vehicle
- execution level object of the vehicle to be controlledpublic Object getCurrentGoal()
public int getCurrentGoalType()
public boolean hasStateChanged()
public void resetStateChanged()
public boolean inOperatingArea(double[] pt)
pt
- double[2] containing the (x, y) position of the point being testedpublic void processIVMessage(AvclMessage msg)
msg
- public void processInternalMessage(String message)
message
- String containing the relevant state informationpublic void setPlannerState()
public double[] getBestPosition()
public void planScript()
public void planScript(double startX, double startY)
startX
- x coordinate of the vehicle's assumed position when goal attempt beginsstartY
- y coordinate of the vehicle's assumed position when goal attempt beginspublic void planScript(String goalID)
goalID
- unique String identifier for the goal that identifies it in the AVCL filepublic void planScript(String goalID, double startX, double startY)
goalID
- unique String identifier for the goal that identifies it in the AVCL filestartX
- x coordinate of the vehicle's assumed position when goal attempt beginsstartY
- y coordinate of the vehicle's assumed position when goal attempt beginspublic List<JAXBElement<?>> generateAvclScriptElementList()
public List<JAXBElement<?>> generateAvclScriptElementList(VehicleCharacteristics vehicleCharacteristics)
vehicleCharacteristics
- charspublic List<JAXBElement<?>> generateAvclScriptElementList(String goalID)
goalID
- goal idpublic List<JAXBElement<?>> generateAvclScriptElementList(String goalID, VehicleCharacteristics vehicleCharacteristics)
goalID
- goal idvehicleCharacteristics
- updated vehicle characteristics to utilize during planningpublic AvclMission generateScriptMission()
public AvclMission generateScriptMission(List<JAXBElement<?>> scriptCmds)
scriptCmds
- contains the sequence of script commands that form the missionpublic AvclMission generateWholeMissionScript()
public List<JAXBElement<?>> generateReturnRoutingElementList()
public int getCurrentGoalStatus()
public void sendRequiredComms()
public static void main(String[] args)
args
- command line arguments