Giter Site home page Giter Site logo

ych188 / mavros_controllers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fabono/mavros_controllers

0.0 0.0 0.0 150 KB

Aggressive trajectory tracking using mavros for PX4 enabled vehicles

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

CMake 3.62% C++ 96.38%

mavros_controllers's Introduction

mavros_controllers

Controllers for controlling MAVs using the mavros package in OFFBOARD mode.

Overview

The repository contains controllers for controlling MAVs using the mavros package. The following packages are included in the repo

  • geometric_controller: Trajectory tracking controller based on geometric control
  • controller_msgs: custom message definitions
  • trajectory_publisher: Node publishing setpoints as states from motion primitives / trajectories for the controller to follow.

Hovering done

Circular trajectory tracking

Getting Started

Install PX4 SITL(Only to Simulate)

Follow the instructions as shown in the PX4 Documentation To check if the necessary environment is setup correctly, you can run the gazebo SITL using the following command

cd <Firmware_directory>
make posix_sitl_default gazebo

To source the PX4 environment, run the following commands

source ~/catkin_ws/devel/setup.bash    // (optional)
source Tools/setup_gazebo.bash $(pwd) $(pwd)/build/posix_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)/Tools/sitl_gazebo

You can run the rest of the roslaunch files in the same terminal

Building mavros_controllers

mavros_controllers can be built using catkin build

cd <path_to_catkin_ws>
catkin build mavros_controllers

Running the code

The following launch file enables the geometric controller to follow a circular trajectory

roslaunch geometric_controller trajectory_track_circle.launch

Nodes

mavros_controllers include the following packages.

geometric_controller

The geometric controller publishes and subscribes the following topics.

  • Parameters

    • /geometric_controller/mavname (default: "iris")
    • /geometric_controller/ctrl_mode (default: MODE_BODYRATE)
    • /geometric_controller/enable_sim (default: true)
    • /geometric_controller/enable_gazebo_state (default: false)
    • /geometric_controller/max_acc (default: 7.0)
    • /geometric_controller/yaw_heading (default: 0.0)
    • /geometric_controller/drag_dx (default: 0.0)
    • /geometric_controller/drag_dy (default: 0.0)
    • /geometric_controller/drag_dz (default: 0.0)
    • /geometric_controller/attctrl_constant (default: 0.2)
    • /geometric_controller/normalizedthrust_constant (default: 0.1)
  • Published Topics

  • Subscribed Topics

trajectory_publisher

Trajectory publisher publishes continous trajectories to the trajectory_controller.

  • Parameters

    • /trajectory_publisher/initpos_x (default: 0.0)
    • /trajectory_publisher/initpos_y (default: 0.0)
    • /trajectory_publisher/initpos_z (default: 1.0)
    • /trajectory_publisher/updaterate (default: 0.01)
    • /trajectory_publisher/horizon (default: 1.0)
    • /trajectory_publisher/maxjerk (default: 10.0)
    • /trajectory_publisher/trajectory_type (default: 0)
    • /trajectory_publisher/number_of_primitives (default: 7)
    • /trajectory_publisher/shape_radius (default: 1.0)
  • Published Topics

  • Subscribed Topics

References

[1] Lee, Taeyoung, Melvin Leoky, and N. Harris McClamroch. "Geometric tracking control of a quadrotor UAV on SE (3)." Decision and Control (CDC), 2010 49th IEEE Conference on. IEEE, 2010.

[2] Faessler, Matthias, Antonio Franchi, and Davide Scaramuzza. "Differential flatness of quadrotor dynamics subject to rotor drag for accurate tracking of high-speed trajectories." IEEE Robot. Autom. Lett 3.2 (2018): 620-626.

Contact

Jaeyoung Lim [email protected]

mavros_controllers's People

Contributors

jaeyoung-lim 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.