Timm Murray > UAV-Pilot-0.2-TRIAL > UAV::Pilot::Control::ARDrone

Download:
UAV-Pilot-0.2-TRIAL.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  2
View/Report Bugs
Source   Latest Release: UAV-Pilot-0.5

NAME ^

  UAV::Pilot::Control::ARDrone

SYNOPSIS ^

    my $sender = UAV::Pilot::Driver::ARDrone->new( ... );
    $sender->connect;
    my $dev = UAV::Pilot::Control::ARDrone->new({
        sender => $sender,
    });
    
    $dev->takeoff;
    $dev->pitch( 0.5 );
    $dev->wave;
    $dev->flip_left;
    $dev->land;

DESCRIPTION ^

UAV::Pilot::Control implementation for the Parrot AR.Drone.

METHODS ^

takeoff

Takeoff.

land

Land.

pitch

    pitch( 0.5 )

Pitch (front-to-back movement). Takes a floating point number between -1.0 and 1.0. On the AR.Drone, negative numbers pitch the nose down and fly forward.

roll

    roll( -1.0 )

Roll (left-to-right movement). Takes a floating point number between -1.0 and 1.0. On the AR.Drone, negative numbers go left.

yaw

    yaw( -0.25 )

Yaw (spin). Takes a floating point number between -1.0 and 1.0. On the AR.Drone, negative numbers spin left.

vert_speed

    vert_speed( 0.7 )

Change the vertical speed. Takes a floating point number between -1.0 and 1.0. On the AR.Drone, negative numbers make it go down.

calibrate

Calibrates the magnetometer. This must be done while in flight. The drone will spin around (yaw movement) while it does this.

emergency

Toggles the emergency state. If your UAV goes out of control, call this to immediately shut it off. When in the emergency state, it will not be responsive to further commands. Call this again to bring it out of this state.

FLIGHT ANIMATION METHODS ^

The Parrot AR.Drone comes preprogrammed with a bunch of "flight animations" (complicated achrebatic manuevers). You can call the methods below to run them. Note that some of these need a generous amount of horizontal and vertical space, so be sure to be in a wide open area for testing.

I find "wave" and "flip_behind" are particularly good ways to impress house guests :)

    phi_m30_deg
    phi_30_deg
    theta_m30_deg
    theta_30_deg
    theta_20deg_yaw_200deg
    theta_20deg_yaw_m200deg
    turnaround
    turnaround_godown
    yaw_shake
    yaw_dance
    phi_dance
    theta_dance
    vz_dance
    wave
    phi_theta_mixed
    double_phi_theta_mixed
    flip_ahead
    flip_behind
    flip_left
    flip_right

LED ANIMATION METHODS ^

The LEDs on the Parrot AR.Drone can be directly controlled using these animation methods. They all take two parameters: the frequency (in Hz) as a floating point number, and the duration.

    led_blink_green_red
    led_blink_green
    led_blink_red
    led_blink_orange
    led_snake_green_red
    led_fire
    led_standard
    led_red
    led_green
    led_red_snake
    led_blank
    led_right_missile
    led_left_missile
    led_double_missile
    led_front_left_green_others_red
    led_front_right_green_others_red
    led_rear_right_green_others_red
    led_rear_left_green_others_red
    led_left_green_right_red
    led_left_red_right_green
    led_blink_standard
syntax highlighting: