Drivers

Artoo has a extensible system for connecting to hardware devices.

Crazyflie Flight


Allows user to send flight control commands to a Crazyflie micro-quadcopter. Flight control commands are those used to tell the Crazyflie to take off, land, and or any number of other autonomous flight manuvers.

How To Connect

Communication with the Crazyflie's flight control interface takes place using a 2.4GHz radio connection. The Crazyflie is controlled from your computer using a Crazyradio, which is a custom USB 2.4GHz radio device.

require 'artoo'
connection :crazyflie, :adaptor => :crazyflie
device :drone, :driver => :crazyflie, :connection => :crazyflie, :interval => 0.1

How To Use

Example of controlling a Crazyflie.

require 'artoo'

connection :crazyflie, :adaptor => :crazyflie
device :drone, :driver => :crazyflie, :connection => :crazyflie, :interval => 0.1

work do
  drone.forward(0)
  drone.set_thrust_on
  after(1.seconds) {drone.stop}
end

Commands

start

Starts the crazyfly's motors and controls.

Returns

nil

stop

Stops the crazyfly's motors.

Returns

nil

hover

Makes the crazyflie hover in a position.

Returns

nil

land

Initiates a landing sequence.

Returns

nil

take_off

Initiates take off sequence.

Returns

nil

up

Orders crazy flie to go up.

Returns

nil

down

Orders crazy flie to go down.

Returns

nil

left(deg)

Orders crazyflie to go left the amount specified by deg (roll left).

Params
  • deg - params
Returns

nil

right(deg)

Orders crazyflie to go right the amount specified by deg (roll right).

Params
  • deg - params
Returns

nil

forward(deg)

Orders crazyflie to go forward the amount specified by deg (pitch forward).

Params
  • deg - params
Returns

nil

backward(deg)

Orders crazyflie to go backward the amount specified by deg (pitch backward).

Params
  • deg - params
Returns

nil

turn_left(deg)

Orders crazyflie to turn left the amount specified by deg (yaw left).

Params
  • deg - params
Returns

nil

turn_right(deg)

Orders crazyflie to turn right the amount specified by deg (yaw right).

Params
  • deg - params
Returns

nil

power(deg)

Sets thrust power to deg.

Params
  • deg - params
Returns

nil

Events

start_driver

Starts the driver

Compatibility