All Projects → Jaeyoung-Lim → Mavros_controllers

Jaeyoung-Lim / Mavros_controllers

Licence: bsd-3-clause
Aggressive trajectory tracking using mavros for PX4 enabled vehicles

Labels

Projects that are alternatives of or similar to Mavros controllers

Se2clam
SE(2)-Constrained Localization and Mapping by Fusing Odometry and Vision (IEEE Transactions on Cybernetics 2019)
Stars: ✭ 116 (-16.55%)
Mutual labels:  ros
Adaptive clustering
Lightweight and Accurate Point Cloud Clustering
Stars: ✭ 125 (-10.07%)
Mutual labels:  ros
Smacc
An Event-Driven, Asynchronous, Behavioral State Machine Library for real-time ROS (Robotic Operating System) applications written in C++
Stars: ✭ 129 (-7.19%)
Mutual labels:  ros
Fast 3d Pointcloud Segmentation
Fast 3D point cloud segmentation using supervoxels with geometry and color for 3D scene understanding
Stars: ✭ 122 (-12.23%)
Mutual labels:  ros
Rl Quadcopter
Teach a Quadcopter How to Fly!
Stars: ✭ 124 (-10.79%)
Mutual labels:  ros
Rl Collision Avoidance
Implementation of the paper "Towards Optimally Decentralized Multi-Robot Collision Avoidance via Deep Reinforcement Learning"
Stars: ✭ 125 (-10.07%)
Mutual labels:  ros
Arm Vo
Efficient monocular visual odometry for ground vehicles on ARM processors
Stars: ✭ 115 (-17.27%)
Mutual labels:  ros
Aikido
Artificial Intelligence for Kinematics, Dynamics, and Optimization
Stars: ✭ 133 (-4.32%)
Mutual labels:  ros
Cleanit
Open-source Autonomy Software in Rust-lang with gRPC for the Roomba series robot vacuum cleaners. Under development.
Stars: ✭ 125 (-10.07%)
Mutual labels:  ros
Rosbag to csv
Converter from ros bag to csv
Stars: ✭ 128 (-7.91%)
Mutual labels:  ros
Rosbag.js
ROS bag file reader for JavaScript 👜
Stars: ✭ 122 (-12.23%)
Mutual labels:  ros
Pcl Ros Cluster Segmentation
Cluster based segmentation of Point Cloud with PCL lib in ROS
Stars: ✭ 123 (-11.51%)
Mutual labels:  ros
Rclnodejs
Node.js version of ROS 2.0 client
Stars: ✭ 126 (-9.35%)
Mutual labels:  ros
Ros2learn
ROS 2 enabled Machine Learning algorithms
Stars: ✭ 119 (-14.39%)
Mutual labels:  ros
Urdf Loaders
URDF Loaders for Unity and THREE.js with example ATHLETE URDF Files
Stars: ✭ 129 (-7.19%)
Mutual labels:  ros
Robot blockly
A simple way to program ROS robots using blockly.
Stars: ✭ 115 (-17.27%)
Mutual labels:  ros
Ros Travis Integration
ROS package continuous integration using travis-CI
Stars: ✭ 125 (-10.07%)
Mutual labels:  ros
Create robot
ROS driver for iRobot Create 1 and 2.
Stars: ✭ 137 (-1.44%)
Mutual labels:  ros
Lidar camera calibration
Light-weight camera LiDAR calibration package for ROS using OpenCV and PCL (PnP + LM optimization)
Stars: ✭ 133 (-4.32%)
Mutual labels:  ros
Pick Place Robot
Object picking and stowing with a 6-DOF KUKA Robot using ROS
Stars: ✭ 126 (-9.35%)
Mutual labels:  ros

mavros_controllers

Build Test DOI

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.

Multiple drone

Hovering drone

Circular trajectory tracking

Getting Started

Install PX4 SITL(Only to Simulate)

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

cd <Firmware_directory>
DONT_RUN=1 make px4_sitl_default gazebo

To source the PX4 environment, run the following commands

cd <Firmware_directory>
source ~/catkin_ws/devel/setup.bash    # (optional)
source Tools/setup_gazebo.bash $(pwd) $(pwd)/build/px4_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

 roslaunch px4 posix_sitl.launch

You will need to source the PX4 environment in every new terminal you open to launch mavros_controllers.

Installing mavros_controllers

Create a catkin workspace:

This folder will probably be already created since the previous process would have created it. If it is not present, do:

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin init
catkin config --merge-devel
wstool init
Clone this repository
cd ~/catkin_ws/src
git clone https://github.com/Jaeyoung-Lim/mavros_controllers

Now continue either with wstool to automatically download dependencies or download them manually.

With wstool

wstool automates the installation of dependencies and updates all packages. If you have no problem updating the packages required by mavros_controllers and/or any other packages, follow this procedure. If not, follow the next 'Manually Download dependencies and build' section.

cd ~/catkin_ws
wstool merge -t src src/mavros_controllers/dependencies.rosinstall
wstool update -t src -j4
rosdep install --from-paths src --ignore-src -y --rosdistro $ROS_DISTRO
catkin build
source ~/catkin_ws/devel/setup.bash
Manually Download dependencies and build

If you did not install with wstool, you need to manually download the dependencies:

Do:

cd ~/catkin_ws/src
git clone https://github.com/catkin/catkin_simple
git clone https://github.com/ethz-asl/eigen_catkin
git clone https://github.com/ethz-asl/mav_comm

Build all the packages:

cd ~/catkin_ws
catkin build
source ~/catkin_ws/devel/setup.bash

Running the code

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

roslaunch geometric_controller sitl_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

Citation

In case you use this work as an academic context, please cite as the following.

@misc{jaeyoung_lim_2019_2619313,
  author       = {Jaeyoung Lim},
  title        = {{mavros_controllers - Aggressive trajectory 
                   tracking using mavros for PX4 enabled vehicles}},
  month        = mar,
  year         = 2019,
  doi          = {10.5281/zenodo.2652888},
  url          = {https://doi.org/10.5281/zenodo.2652888}
}

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]

Build issues:

catkin_simple() or eigen_catkin() not found

This should not have happened if you clone the catkin_simple and eigen_catkin repositories. Try again:

cd ~/catkin_ws/src
git clone https://github.com/catkin/catkin_simple
git clone https://github.com/ethz-asl/eigen_catkin
cd ~/catkin_ws
catkin build mavros_controllers
source ~/catkin_ws/devel/setup.bash
iris.sdf model not found:

Try:

cd <Firmware_directory>
make px4_sitl_default sitl_gazebo

or refer to this issue the ROS with Gazebo Simulation PX4 Documentation.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].