Difference between revisions of "AngelR-PFC-Drone01"

From robotica.unileon.es
Jump to: navigation, search
Line 13: Line 13:
 
* '''Tags:'''  
 
* '''Tags:'''  
  
* '''Technology:''' c, opencv
+
* '''Technology:''' c, opencv, ARDrone API: sdk 1.5
  
 
* '''State:''' Developing
 
* '''State:''' Developing

Revision as of 22:40, 25 November 2010

  • Project Name: PFC-Drone01
  • Authors: Ángel Rojo Román and Álvaro Botas
  • Email Addres: infarr00@estudiantes.unileon.es
  • Academic Year: 2010-2011
  • Degree: undergraduate
  • SVN Repository:
  • Tags:
  • Technology: c, opencv, ARDrone API: sdk 1.5
  • State: Developing
  • Source License:
  • Document License:



Configuring ARDrone API: sdk 1.5 with Ps3pad in Linux

Downloading sdk 1.5


Configure example files

  • sdk_demo: It's the most simple example, you should change two files, so:
      cd (SKD)/Examples/Linux/sdk_demo/Sources

The first file is ardrone_testing_tool.c, it contains the main function in the project. You need to edit the input device, so copy this line into your file:

      ardrone_tool_input_remove( &gamepad );

The other file is /UI/gamepad.h and serves to configure Ps3pad buttons, you can copy the next values:

    #define GAMEPAD_PLAYSTATION3_ID 0x054C0268
    typedef enum
    {
         PS3BTN_SELECT=0,
         PS3BTN_L3=1,
         PS3BTN_R3=2,
         PS3BTN_START=3,
         PS3BTN_UPARROW=4,
         PS3BTN_RIGHTARROW=5,
         PS3BTN_DOWNARROW=6,
         PS3BTN_LEFTARROW=7,
         PS3BTN_L2=8,
         PS3BTN_R2=9,
         PS3BTN_L1=10,
         PS3BTN_R1=11,
         PS3BTN_TRIANGLE=12,
         PS3BTN_CIRCLE=13,
         PS3BTN_CROSS=14,
         PS3BTN_SQUARE=15,
         PS3BTN_PS3=16,
    }PS3PAD_BUTTONS;
  • Navigation: This is a more complete example, the change is exactly the same as the second step in the sdk_demo example.


Compile and Running the examples

  • The first step is get some libraries that let us compile ARDONE skd:
      $sudo apt-get install libsdl-dev libgtk2.0-dev libiw-dev
  • Next you must build the ARDroneLIB library
      $cd SDK /ARDroneLib/Soft/Build
      $make
  • Compile the sdk_demo example:
      $cd SDK /Examples/Linux/sdk_demo/Build
      $make
  • Compile the Navigation example:
      $cd SDK /Examples/Linux/Navigation/Build
      $make

Now, you should have two executable files in (SDK)/Examples/Linux/Build/Release. Plug your ps3pad and prepare yourself to fly the PARROT ARDrone.

  • Execute the sdk_demo example:
      ./linux_sdk_demo
  • Execute the Navigation example:
      ./ardrone_navigation