GithubHelp home page GithubHelp logo

amirmaditorabian / idas-quadrotor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from siavash1999/idas_quadrotor

1.0 0.0 0.0 17 KB

This Repository contains a model of a simple quadrotor and controllers made by ROS and simulated using Gazebo.

License: BSD 3-Clause "New" or "Revised" License

CMake 56.04% C++ 13.86% Python 30.09%

idas-quadrotor's Introduction

IDAS-quadrotor

Description

This Repository contains a model of a simple quadrotor and controllers made by ROS and simulated using Gazebo. This project is not intended to be applicable in general (since it's a final project for a bachelor degree only) but the goal is to improve it as much as possible and make a decent metapackage for beginners and for people searching for simple ROS or quadrotor simulation projects on internet.

Installation

1.Initializing Workspace

To use packages, first you need to make a catkin workspace, then clone the repository in src subdirectory in your workspace. afterwards its proper to source your workspace in .bashrc file so whenever you open a new terminal you don't have to source it manually:

cd ~
echo 'source ~/[workspace_name]/devel/setup.bash' >> .bashrc

Put the name of your workspace insted of [workspace_name] in the command above. More About Catkin Workspace

2.Building PropPlugin

In this project a Model plugin is written for gazebo that needs to be built using CMake. In order to build the shared library for plugin, following procedure must be done:

cd ~/[workspace_name]/src/PropPlugin
mkdir build
cd ./build
cmake ..
make

And then we should add the shared library directory to .bashrc file:

cd ~
echo 'export GAZEBO_PLUGIN_PATH=${GAZEBO_PLUGIN_PATH}:~/[workspace_name]/src/PropPlugin/build' >> .bashrc

3.Making ROS python Packages

As strange as it may seem, catkin python packages have a build stage in which the modules used in scripts are added to PYTHONPATH. The whole explaination is available in wiki page (soon, hopefully!). For building all that needs to be done is to follow below procedure:

cd ~/[workspacename]
catkin_make

This command will invoke CMakeLists.txt files in all packages and makes /build and /devel subdirectories in workspace. More About ROS Python Makefile

How To Use

First the core node of ROS must be launched using command roscore in one terminal. Then in another Terminal, robot_description can be uploaded into ROS parameter server and spawned in gazebo using 'roslaunch' :

roslaunch quadrotor quadrotor.launch

Now using hover_control.py node, the quadrotor model will rise up from ground and hover in an approximate altitude of 5m above ground. make sure that simulation is not paused when running the node.

rosrun flight_mdoes hover_control.py

To Do

  1. Making other flight modes (Cruise and Spin) Nodes for package flight_modes .
  2. Using a seperate package for subscribing setpoint from client and deciding what flight mode or sequence of flight modes are needed to achieve the goal.
  3. Replacing VelocityBasedControllers with EffortBasedControllers.
  4. Tuning EffortBasedController gains (PID gains) to achieve best behavior.
  5. Making a better model of quadrotor (for now it's just a red box with 4 black boxes.)
  6. For now, hover_control node is written based on a x configuration of propellers in drones. Adding a parameter to define if the drone is + or x configured and changing the FtoS matrix in hover_control (and other flight mode nodes in future) to more general form, including + configuration too.
  7. Making packages more general and applicable for other drones.
  8. Making Path Planning packages!

Contribution

Feel free to contact package maintainer, all questions, critisim and bug/issue reports are welcome and you can find maintainer Email address in Package.xml manifest files of all packages.

License

BSD

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

idas-quadrotor's People

Contributors

siavash1999 avatar

Stargazers

Amirmahdi Torabian 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.