ardrone_follow_tag
Differences
This shows you the differences between two versions of the page.
ardrone_follow_tag [2016/11/01 11:02] – created dwallace | ardrone_follow_tag [2016/11/06 02:21] (current) – dwallace | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Make the AR.Drone Follow the Image Tag ====== | ====== Make the AR.Drone Follow the Image Tag ====== | ||
- | =Introduction= | + | ===== Introduction ====== |
- | This tutorial you will learn how to do tag following using the ardrone. Before you continue this tutorial make sure you have gone through this tutorial | + | |
+ | This tutorial you will learn how to do tag following using the ardrone. Before you continue this tutorial make sure you have gone through | ||
+ | |||
+ | ==== Create the tag following file ==== | ||
- | ==Create the tag following file== | ||
We already have the tag recognition code working and its all meant to identify image tags. This tutorial helps you to have tag recognition and also make the ardrone follow the tag. | We already have the tag recognition code working and its all meant to identify image tags. This tutorial helps you to have tag recognition and also make the ardrone follow the tag. | ||
- | Step 1:Open up a terminal and enter: | + | |
- | <pre>roscd nolan3d | + | Step 1:Open up a terminal and enter: |
+ | |||
+ | | ||
Step 2: | Step 2: | ||
Go to the bin and open up the file nolan3d.py and replace the code with the following code: | Go to the bin and open up the file nolan3d.py and replace the code with the following code: | ||
- | <source lang="python"> | + | <code python |
# | # | ||
import roslib; roslib.load_manifest(' | import roslib; roslib.load_manifest(' | ||
Line 131: | Line 135: | ||
rospy.spin() | rospy.spin() | ||
- | </source> | + | </code> |
+ | **Save and close the file.** | ||
- | Save and close the file. | + | ==== Set the drone to see the image tag ==== |
- | ==Set the drone to see the image tag == | ||
Make sure the ardrone is on and connected with your computer. | Make sure the ardrone is on and connected with your computer. | ||
Enter the following lines each in a new terminal: | Enter the following lines each in a new terminal: | ||
- | <pre> | + | |
- | roscore | + | roscore |
- | rosrun ardrone_brown ardrone_driver | + | rosrun ardrone_brown ardrone_driver |
- | </ | + | |
Enter the commands in the same terminal: | Enter the commands in the same terminal: | ||
- | <pre> | + | roscd ar_recog |
+ | cd bin | ||
+ | rosparam set aov .67 | ||
+ | rosrun ar_recog ar_recog image: | ||
- | roscd ar_recog | + | Enter the commands ,each in a new terminal |
- | cd bin | + | |
- | rosparam set aov .67 | + | |
- | rosrun ar_recog ar_recog image:=/ | + | |
- | </ | + | rosrun drone_teleop drone_teleop.py |
- | Enter the commands ,each in a new terminal : | ||
- | <pre> | ||
- | rosrun drone_teleop drone_teleop.py | ||
- | </ | ||
Hit the button " | Hit the button " | ||
Open up a new terminal and enter: | Open up a new terminal and enter: | ||
- | < | + | |
- | rosrun nolan3d nolan3d.py | + | |
- | </ | + | ==== Following the tag ==== |
- | ==Following the tag== | ||
Now the drone would be in air. Make sure you hold the image tag at a optimal distance(not too close). Please have a look at this video. | Now the drone would be in air. Make sure you hold the image tag at a optimal distance(not too close). Please have a look at this video. | ||
- | ==Video== | + | ===== Video ===== |
- | < | + | |
- | <iframe width=" | + | {{youtube>hh_w5F_MH8o? |
- | </ | + |
ardrone_follow_tag.txt · Last modified: 2016/11/06 02:21 by dwallace