Difference between revisions of "AngelR-PFC-Drone01"
From robotica.unileon.es
Line 25: | Line 25: | ||
---- | ---- | ||
− | =Configuring ARDrone API: sdk 1.5 with Ps3pad= | + | |
+ | |||
+ | =Configuring ARDrone API: sdk 1.5 with Ps3pad in Linux= | ||
+ | |||
+ | |||
+ | '''Downloading sdk 1.5''' | ||
+ | |||
+ | *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]. | ||
+ | *UnpackageARDrone_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'''. |
Revision as of 22:01, 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.
- UnpackageARDrone_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.