ardrone_gamepad
Differences
This shows you the differences between two versions of the page.
ardrone_gamepad [2016/11/01 10:57] – created dwallace | ardrone_gamepad [2016/11/06 02:15] (current) – dwallace | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Controlling the Ar.Drone with a Gamepad Controller ====== | ====== Controlling the Ar.Drone with a Gamepad Controller ====== | ||
- | =Introduction= | + | ===== Introduction ===== |
- | In this tutorial we will learn how to control the ardrone with a game pad controller(''' | + | |
- | < | + | In this tutorial we will learn how to control the ardrone with a game pad controller (**Logitech dual action**). |
+ | |||
+ | {{dylanw: | ||
+ | |||
+ | ===== Package needed ===== | ||
- | =Package needed= | ||
Open up a terminal and enter: | Open up a terminal and enter: | ||
- | <pre> | + | |
- | roscd joy | + | roscd joy |
- | </ | + | |
if it does not take you to the folder named " | if it does not take you to the folder named " | ||
- | =Create the necessary file= | + | ===== Create the necessary file ===== |
Step 1:Open up a terminal and enter : | Step 1:Open up a terminal and enter : | ||
- | < | + | |
- | roscd drone_teleop | + | |
- | </ | + | |
Step 2: | Step 2: | ||
Line 26: | Line 27: | ||
Paste the following code in the file and save the file. | Paste the following code in the file and save the file. | ||
- | <source lang ="python"> | + | <code python |
# | # | ||
import roslib; roslib.load_manifest(' | import roslib; roslib.load_manifest(' | ||
Line 194: | Line 194: | ||
- | </source> | + | </code> |
Step 3: | Step 3: | ||
Line 200: | Line 201: | ||
and in the permissions tab click the check box "Allow executing file as a program" | and in the permissions tab click the check box "Allow executing file as a program" | ||
+ | ===== Mapping of the buttons ===== | ||
- | =Mapping of the buttons= | + | {{dylanw:game.jpg}} |
- | + | ||
- | [[image:game.jpg|500px|gamepad layout]] | + | |
Control information: | Control information: | ||
- | |||
gamepad control manual: | gamepad control manual: | ||
- | <pre> | ||
- | B1 / B2: takeoff / land | ||
- | B4: reset (toggle emergency state) | ||
- | B3: | ||
- | B6: Hover the drone | ||
- | B8: | ||
- | Axis 5: Move forward and pitch (pitch) | ||
- | Axis 4: | ||
- | Axis 3: Move up and down(altitude control) | ||
- | Axis 2: Move towards left and right(roll) | ||
- | </ | ||
+ | B1/B2: takeoff / land\\ | ||
+ | B4: reset (toggle emergency state)\\ | ||
+ | B3: toggle_cam_view\\ | ||
+ | B6: Hover the drone\\ | ||
+ | B8: Toggle to autonomous mode\\ | ||
+ | Axis 5: Move forward and pitch (pitch)\\ | ||
+ | Axis 4: Rotate left and right (yaw)\\ | ||
+ | Axis 3: Move up and down(altitude control)\\ | ||
+ | Axis 2: Move towards left and right(roll)\\ | ||
- | =Testing with gamepad= | + | ===== Testing with gamepad |
Now enter the following commands in a separate terminal : | Now enter the following commands in a separate terminal : | ||
- | <pre> | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | </ | ||
- | |||
+ | roscore | ||
+ | rosrun ardrone_brown ardrone_driver | ||
+ | rosrun joy joy_node | ||
+ | rosrun drone_teleop gamepad.py | ||
+ | rosrun image_view image_view image: | ||
If everything goes well,you should be able to control the ardrone with joystick. | If everything goes well,you should be able to control the ardrone with joystick. | ||
- | =Use of button 8= | + | ===== Use of button 8 ===== |
The button 8 of the joystick is used for setting ardrone to autonomous mode. To come back out of the autonomous mode hit button 8 again. I will talk more about this in the tutorial " | The button 8 of the joystick is used for setting ardrone to autonomous mode. To come back out of the autonomous mode hit button 8 again. I will talk more about this in the tutorial " | ||
- | =ARDRONE controlled through the gamepad controller= | + | ===== ARDRONE controlled through the gamepad controller |
This program was used in Indoor Aerial Robotics Competition 2012 conducted by Drexel University ,USA. | This program was used in Indoor Aerial Robotics Competition 2012 conducted by Drexel University ,USA. | ||
Here is a video of that. | Here is a video of that. | ||
- | < | + | **VIDEO NOT FOUND** |
- | <iframe width=" | + | |
- | </ | + |
ardrone_gamepad.txt · Last modified: 2016/11/06 02:15 by dwallace