Skip to content

This repository contains ROS packages and nodes to send basic control commands to the ar drone (actual and simulation) and perform basic manoeuvres

Notifications You must be signed in to change notification settings

kaustubhsridhar/AR.Drone-basic-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 

Repository files navigation

AR.Drone basic control

This repository contains 3 ROS packages.

Two have been downloaded - ardrone_autonomy and tum_simulator.

One was created by me - ardrone_test.

Description of contents of the 3 packages

1. ardrone_autonomy (downloaded)

this package connects the entire AR Drone system to the ROS environment giving you the control of the motion of the drone (by sunscribing to topics like /ardrone/takeoff, /ardrone/land, /cmd_vel to which you can publish takeoff, land and control commands resp.)

It also publishes the IMU, magnetometer and navigation (attitudes, velocities, processed accelerations, altitude, battery percent, etc.) data (through the /imu, /mag, /navdata and /navdata_gps topics) and camera images (through the /front/image_raw and /bottom/image_raw topics), etc. (http://ardrone-autonomy.readthedocs.io/en/latest/)

2. ardrone_test (created by me)

This package contains

  1. src folder and CMakeLists.txt file
  2. src/waypoint_nav.cpp file

Basically, this package contains a node (ardrone_test_node - with code in src/waypoint_nav.cpp file) that contains subscribers that subscribe to all the above topics published by the ardrone_autonomy node. This data (accelerometer, magnetometer, gyroscope, camera, gps, etc) can then be processed in this node.

This node also contains publishers that publish takeoff, land and drone control commands to /ardrone/takeoff, /ardrone/land and /cmd_vel topics. These publishers can be utilised through takeoff(), land() and move(lx,ly,lz,rx,ry,rz) functions. For simplicity and ease of use, running this node will open up a menu allowing you to press keyboard buttons to takeoff, land and perform basic movements (left, right, up, down, yaw).

Alt text

All further code (to manipulate drone some way by sending control commands) shall be written here in ardrone_test_node (i.e. inside waypoint_nav.cpp file)

3. tum_simulator (downloaded)

This package contains the implementation of a gazebo simulator for the Ardrone 2.0 . (http://wiki.ros.org/tum_simulator)

Downloading/Installing the code

Run the following code lines in a terminal

mkdir catkin_ws/
cd catkin_ws/
git clone https://github.com/kaustubhsridhar/AR.Drone-basic-control.git

(note that the src folder should be directly in the catkin_ws folder. delete any unnecessary folder created by git cloning)

Builidng the code

Run the following code lines in a terminal

cd catkin_ws/
catkin_make

Run the below line only once (after the first compilation). It adds the workspace to the search path.

echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc 

Running the code on the actual AR.Drone 2.0

Run the following code lines in different terminals

roscore
rosrun ardrone_autonomy ardrone_driver _navdata_demo:=0
rosrun ardrone_test ardrone_test_node

Running a simulation of AR.Drone 2.0 on Gazebo

Run the following code lines in different terminals

roscore
roslaunch cvg_sim_gazebo ardrone_testworld.launch
rosrun ardrone_test ardrone_test_node

About

This repository contains ROS packages and nodes to send basic control commands to the ar drone (actual and simulation) and perform basic manoeuvres

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published