Difference between revisions of "AngelR-PFC-Drone01"
From robotica.unileon.es
Line 27: | Line 27: | ||
− | =Configuring ARDrone API: sdk 1.5 with Ps3pad in Linux= | + | =Configuring ARDrone API: sdk 1.5 with Ps3pad in Linux (25 nov 2010)= |
Revision as of 11:58, 1 December 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 (25 nov 2010)
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_add( &ps3pad );
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