Skip to content

Aligning with aruco marker

Balaji-Gorantla edited this page Jul 5, 2017 · 4 revisions

We are assuming that you have already installed the necessary packages for this, like- ardrone_autonomy and tum_simulator and have the aruco models and implemented the PID code.

Steps Involved:

Open the simulator, go to insert and place the marker(front or bottom) for the drone to detect the marker.
roslaunch drone_application simulator.launch

Run the keyboard_teleop_key.py to control the drone and to get into PID mode.

rosrun drone_application ardrone_teleop_key.py _aruco_front:=true _aruco_mapping:=false

Run image_view to get the drone camera image and to detect the marker.

If you are using the front camera and marker is positioned in front use-

rosrun image_view image_view image:=/ardrone/front/image_raw

If you are using the bottom camera and marker is positioned at bottom use-

rosrun image_view image_view image:=/ardrone/bottom/image_raw

To place the marker at bottom follow the below steps:

  • Open 'home' and press Ctrl+H to view the hidden files(dot files).

  • go-to .gazebo/models/marker_

  • open .sdf file and change the values of pose. Like-

  • make all the values 0 except the fifth(give some value, e.g. 1.5)

  • Now open the simulator and insert the marker, the marker position will be changed to bottom.

Align the drone in front of the marker manually and start the PID mode. Once you start the PID mode, the drone starts to align itself with the marker(Tune the fine PID values to get the stable mode).
Refer to PID Tuning for more information.

Video Tutorial:

Go through the video tutorial for Alignment of ar drone with aruco marker using PID in simulation and Alignment of ar drone with aruco marker using PID in real (demo)