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
Setup.
- Launch the
dlife.robot.gui.controlcenter
- Select
dlife.robot.ardrone.ARDrone in the "Robot:" drop down
list.
- Click the button next to the "Controller:" label.
- Navigate to the
dLifeDist/examples/dlife/robot/ardrone/
directory.
- Choose the
ARDroneTagTracker.class file.
- 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:
- Version:
- Feb 15, 2012
- Author:
- Grant Braught, Dickinson College
|
Method Summary |
void |
startUp(Robot robot)
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 |
ARDroneTagTracker
public ARDroneTagTracker()
startUp
public void startUp(Robot robot)
- Description copied from class:
dlife.robot.Controller
- 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 Controller
- Parameters:
robot - the Robot that this Controller will be controlling.