Git Product home page Git Product logo

xiaoye-a / drone-load-transportation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pedrorangell/drone-load-transportation

1.0 2.0 0.0 868 KB

"drone-load-transportaion" is a series of modified ROS packages to implement autonomous control functionality on an AR.Drone 2.0 with a suspended load in order to stabilize it during the flight.

Home Page: https://github.com/pedrorangell/drone-load-transportation

C++ 97.60% Python 2.40%

drone-load-transportation's Introduction

drone-load-transportation

"drone-load-transportaion" is a series of modified ROS packages to implement autonomous control functionality on an AR.Drone 2.0 with a suspended load in order to stabilize it during the flight. It uses the "ardrone_autonomy" driver (from AutonomyLab) and "tum_ardrone" (from tum-vision) for implementing autonomous flight with PTAM-based visual navigation. For estimating the load's position, the package "ar_pose" (from LucidOne) is used. It contains AR Marker tools for ROS based on ARToolKit for publishing pose data (tf) from a camera and a marker. The idea is to integrate all trhee packages in order to obtain a platform capable of load transportation using the AR.Drone bottom camera to estimate its position.

camera_carga

###Installation (with catkin)

Download the original packages from:

In case the following packages are not included in your ROS installation, get them from:

After download, unzip the files into the source folder of your workspace and execute:

cd catkin_ws/src/<package name>
rosdep install <package name>

Build your workspace.

catkin_make

Download all the files in this repository drone-load-transportation, look into the original packages and replace the existing files with these ones (look for the same file name). Make sure to have a backup of the original files, in case something goes wrong.

Then build your workspace again.

cd catkin_ws
catkin_make

###Quick Start

Connect your AR.Drone battery and, in separate terminals, launch the nodes:

  • ardrone_driver: this may take a few seconds to build. Check the prompt messages for connection failures. The AR.Drone will best perform with full charge.
cd catkin_ws/src
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:`pwd`/ardrone_autonomy
rosmake ardrone_autonomy
roslaunch ardrone_autonomy ardrone_driver.launch
  • ar_pose: this node will perform the marker pose estimation (assuming you already attached the marker to the suspended load)
cd catkin_ws/src
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:`pwd`/ar_pose
rosmake ar_pose
rosmake rviz rosbag
roslaunch ar_pose ar_pose_single.launch

The rviz window should pop on the screen, but you will not see the image until the Drone's bottom camera streaming is enabled (later).

  • tum_ardrone: this will launch three nodes. Do not proceed without checking tum_ardrone for information about the nodes functionalities.
cd catkin_ws/src
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:`pwd`/tum_ardrone
rosmake tum_ardrone
roslaunch tum_ardrone tum_ardrone.launch

Your system is ready. Run the rqt_graph tool to make sure you have all nodes running:

rosrun rqt_graph rqt_graph

envio_tf

###Flying

AR.Drone 2.0 does not allow streaming of both camera images simultaneously, which means that for the load transportation porpuse it is necessary to give up the PTAM functionality. The Drone will still be able to fly autonomously, but its pose estimation will be worse. Let's hope that Parrot changes that in the future.

In order to disable PTAM:

rosrun rqt_reconfigure rqt_reconfigure

This will open the rqt_reconfigure screen, which allows the user to dynamically configure node parameters without having to access the source code or stop running it.

IMPORTANT: requires the node drone_stateestimation to be running.

Select the node drone_stateestimation and uncheck "Use PTAM". For further experiments, you can also uncheck "Use navdata", which will make the EKF use only the control gains to update.

In order to enable the load stabilization controller, select the node drone_autopilot and check "Use Load Control". The controller parameters are set for a suspended load with approximately 10% of the Drone's weight, but feel free to experiment.

UseLoadConfig

Open the drone_gui interface, click on "Toggle Cam". Now you should see the bottom image on the rviz screen.

rviz_screen

On the top left box of drone_gui you can either select one of the flight plans included in the package or write your own. Here is a simple flight plan using only control gains:

takeoff

goto 0 0 0.7 0

goto 0.8 0.8 0.7 0
goto 0 1.6 0.7 0
goto -0.8 0.8 0.7 0
goto 0 0 0.7 0

land

####Procedure

  1. Position the Drone on the ground with a lot of free space around it. If you are using PTAM (which means you are not monitoring the load's position), you should have enough key points in front of the Drone. Give preference to furnitured indoor environmnents.
  2. Load the flight plan or write one.
  3. Click on "Reset" then "Clear and Send"
  4. Always be ready to press "Land" in case of imminent crash.

####Recording Flight Data

Create a folder to store data

mkdir ~/bagfiles
cd ~/bagfiles

Recording messages from all running topics

rosbag record -a

...or from a specific topic (e.g.: navdata)

rosbag record -O subset /ardrone/navdata

Verifying content

rosbag info subset.bag

In order to take the recorded date to other softwares, it is useful to convert the bag file to txt:

rostopic echo -b subset.bag -p /ardrone/navdata > output.txt

drone-load-transportation's People

Contributors

pedrorangell avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.