Popular Classes
S
ources
-
E
xamples
-
D
iscussions
Project: BioMAV
Explorer
Outline
Vision
standin-module
Vision.java
PoleDetector.java
PoleDetectorOud.java
vision_testing
Java
nl
ru
ai
projects
parrot
poledetection
SimplePoleDetectionModule.java
test
Test01.java
CPPPoleDetector.java
base
src
Java
nl
ru
ai
projects
parrot
dronecontrol
ParrotDroneInterface.java
VideoPollInterface.java
SensorDataObserver.java
ControlInterface.java
SensoryDataInterface.java
PolePositionPollInterface.java
ParrotControl
JavaDroneControl
src
com
codeminders
ardrone
VideoReader.java
VideoReceivedInterface.java
video
uint.java
ImageSlice.java
BufferedVideoImage.java
MacroBlock.java
nl
ru
ai
projects
parrot
dronecontrol
javadronecontrol
ATControlCommandInterface.java
DroneConfigurationChannel.java
VisionStandin.java
test
Test01.java
NavdataPacket.java
NavdataChannelObserver.java
NavdataChannel.java
DroneGroundStation.java
GroundStation
Java
src
nl
ru
ai
projects
parrot
dronecontrol
groundstation
SDLDroneJoystick.java
DroneInputDevice.java
GroundStation.java
ExtDroneInputDevice.java
DroneInputDeviceExtension.java
ParrotSim
Java
src
nl
ru
ai
projects
parrot
dronecontrol
simulator
ExternalTimerSynchronizer.java
Simulator.java
test
Test02.java
Test01.java
SimulatedDrone.java
manualcontrol
Model.java
Main.java
View.java
Control.java
Behavior
src
nl
ru
ai
projects
parrot
biomav
editor
ParameterControlInterface.java
BehaviorEditor.java
FSMEditorSuite.java
EditorFSMFactory.java
FSMExecutor.java
BehaviorVertex.java
transitions
PoleFound.java
OutOfSight.java
Delay.java
CloseToPole.java
states
PassRightState.java
FlyRightState.java
FlyLeftState.java
TurnLeftState.java
BehaviorArray.java
StartState.java
PassLeftState.java
TurnRightState.java
SearchPoleState.java
BehaviorVertexListener.java
TransitionEdge.java
Drone.java
Main.java
BioMAVConfig.java
fsm
StateListener.java
Behavior.java
Transition.java
FSMController.java
State.java
tools
PositionLogger.java
BehaviorModule.java
Sleeper.java
Writer.java
TwitterTweets.java
BehaviorModuleSL.java
TerminatorHasCrashed.java
TwitterAccessBak.java
TerminalCondition.java
BehaviorModuleLB.java
BehaviorModule1.java
TwitterAccess.java
TerminatorNumberOfIterations.java
TerminatorTimer.java
behaviors
InitializeDrone.java
FlyTowardsPole.java
PassLeft.java
TurnRight.java
PassRight.java
TwitterBehavior.java
TurnLeft.java
SearchPole.java
Hover.java
transitions
PoleFound.java
TurnComplete.java
OutOfSight.java
CloseToPole.java
ea2
Test.java
evaluator
EvaluatorMain.java
Sjoerd2EA.java
server
TaskServer.java
ParallelBreeder.java
GenomeFactory.java
TaskParameters.java
GeneticAlgorithm.java
GAServerMain.java
Task.java
DroneGAFactory.java
SjoerdEA.java
LaurieEA.java
client
FSMFactory.java
TaskClient.java
TaskClientMain.java
EvaluationStarter.java
ea
evolve
EASetup.java
EAConfiguration.java
Chromosomes.java
fitness
EAFitness.java
FitnessDrone.java
getFlyingState()
takeoff()
land()
setEmergencyFlag()
clearEmergencyFlag()
flyForward(double speed)
flySideways(double speed)
setHeight(double height)
spin(double speed)
hover()
/*
This file is part of the BioMAV project.
The BioMAV project is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The BioMAV project is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with The BioMAV project. If not, see <http://www.gnu.org/licenses/>.
*/
package
nl.ru.ai.projects.parrot.dronecontrol;
/**
* <p>
* The ControlInterface defines the functions the Parrot AR.Drone can be controlled
* with. It contains the basic movement commands like {@link #flyForward(double)},
* {@link #flyForward(double)}, {@link #flySideways(double)}, {@link #spin(double)},
* and {@link #setHeight(double)}, but also important state-switching functions like
* takeoff/land, emergency mode control functions and a function to switch the drone
* into hover mode.
* </p>
*
* <p>
* To complement the basic set of control functions, one function for retrieving the
* current mode the drone is in is also included in with this interface, to allow
* checking if commands could be executed successfully, or if some kind of error
* occurred.
* </p>
*
* @author Paul Konstantin Gerke
*
*/
public
interface
ControlInterface
{
public
enum
FlyingState {LANDED, FLYING, EMERGENCY, DISCONNECTED, BATTERY_LOW};
/**
* Retrieves the current status of the drone. The flying state indicates the current
* state of the drone, if it is flying, landed or in a certain error state.
*
* @return
* The flying state of the drone
*/
public
FlyingState
getFlyingState
();
/**
* Lets the drone take off if the flying state is not EMERGENCY or DISCONNECTED
*/
public
void
takeoff
();
/**
* Lets the drone land if the flying state is flying
*/
public
void
land
();
/**
* Sets the emergency flag of the drone leading to an immediate stop of all motors.
*/
public
void
setEmergencyFlag
();
/**
* Clears the emergency flag of the drone if the flying state is EMERGENCY
*/
public
void
clearEmergencyFlag
();
/**
* Lets the drone fly forward or backward if the drone flying state if FLYING
*
* @param speed
* This parameter indicates how fast the drone steers forward or backward. The
* parameter is clamped to the interval [-1, 1] where negative values lead
* to the drone moving backward with the given speed, and positive values lead
* to the drone moving forward.
*/
public
void
flyForward
(
double
speed);
/**
* Lets the drone fly left or right if the drone flying state if FLYING
*
* @param speed
* Gives the speed with that the drone moves left or right. Negative values let the
* drone move left and positive values let the drone move right. The value is clamped
* to the interval [-1, 1];
*/
public
void
flySideways
(
double
speed);
/**
* Lets the drone fly up or down if the drone flying state if FLYING
*
* @param height
* Gives the that the drone wants to maintain during its flight (in meters)
*/
public
void
setHeight
(
double
height);
/**
* Lets the drone spin left or right if the drone flying state if FLYING
*
* @param speed
* Gives the speed with that the drone turns left or right. Negative values let the
* drone turn left and positive values let the drone turn right. The value is clamped
* to the interval [-1, 1];
*/
public
void
spin
(
double
speed);
/**
* Resets all previous movement commands and lets the drone hover using the
* bottom image to stabilize itself.
*/
public
void
hover
();
}