public class ARDroneTagTracker
- extends FiniteStateController
The ARDrone can be controlled by holding April Tags in front of its camera.
When this controller is run it will respond to April Tags in the Tag36h11
family as follows:
- Tag 0: Causes the drone to land.
- Tag 1: If the drone is landed it will take off. If the drone is flying it
will track Tag 1, attempting to keep it in the center of its image (both
up/down and left/right). It will also attempt to maintain a steady distance
from the tag (the larger the tag the larger the distance will be).
- Tag 2: If the drone will rotate toward the tag.
As you control the robot, its led's will turn green when it sees a tag and
red when it does not. The drone will hover when it does not see a tag. A useful
technique is to hide the tag from the drone if its behavior becomes erratic.
To run this example:
- Complete the Basic dLife Installation.
- Complete the ARDrone
- Launch the
dlife.robot.ardrone.ARDrone in the "Robot:" drop down
- Click the button next to the "Controller:" label.
- Navigate to the
- Choose the
- Connect the computer to the ARDrone's wifi network.
- Click the "Start Up" button. The ARDrone will take-off.
- Click "Run". Show the AprilTags to the robot as described above.
The source code for this class is contained in the file:
- Feb 15, 2012
- Grant Braught, Dickinson College
This method is invoked automatically when the Start Up button in the
ContolCenter is clicked.
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void startUp(Robot robot)
- Description copied from class:
- This method is invoked automatically when the Start Up button in the
ContolCenter is clicked. This is typically where Sensors and Effectors
are created and added to the Robot.
- Specified by:
startUp in class
robot - the Robot that this Controller will be controlling.