Difference between revisions of "AngelR-PFC-Drone01"
From robotica.unileon.es
Line 34: | Line 34: | ||
*You should register in [https://projects.ardrone.org ARDRONE open API platform]. | *You should register in [https://projects.ardrone.org ARDRONE open API platform]. | ||
*Download [https://projects.ardrone.org/attachments/download/221/ARDrone_SDK_1_5_Version_20101004.tar.gz sdk 1.5]. | *Download [https://projects.ardrone.org/attachments/download/221/ARDrone_SDK_1_5_Version_20101004.tar.gz sdk 1.5]. | ||
− | * | + | *Unpack the archive ARDrone_SDK_1_5_Version_20101004.tar.gz |
Line 72: | Line 72: | ||
*'''Navigation: '''This is a more complete example, the change is exactly the same as the second step in the '''sdk_demo example'''. | *'''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. |
Revision as of 22:33, 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
- State: Developing
- Source License:
- Document License:
Configuring ARDrone API: sdk 1.5 with Ps3pad in Linux
Downloading sdk 1.5
- You should register in ARDRONE open API platform.
- Download sdk 1.5.
- Unpack the archive ARDrone_SDK_1_5_Version_20101004.tar.gz
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.