Giter Club home page Giter Club logo

rotortm's Introduction

RotorTM

An Aerial Transportation and Manipulation Simulator for Research and Education

paper: https://arxiv.org/abs/2205.05140

video: https://www.youtube.com/watch?v=jzfEVQ3qlPc

License

Please be aware that this code was originally implemented for research purposes and may be subject to changes and any fitness for a particular purpose is disclaimed. To inquire about commercial licenses, please contact Guanrui Li ([email protected]), Xinyang Liu ([email protected]) and Prof. Giuseppe Loianno ([email protected]).

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
    

Citation

If you publish a paper with our simulator, please cite our paper published in IEEE Transactions on Robotics:

@ARTICLE{rotortm2023,
  author={Li, Guanrui and Liu, Xinyang and Loianno, Giuseppe},
  journal={IEEE Transactions on Robotics}, 
  title={RotorTM: A Flexible Simulator for Aerial Transportation and Manipulation}, 
  year={2023},
  volume={},
  number={},
  pages={1-20},
  doi={10.1109/TRO.2023.3336320}}

Overview

Description

RotorTM is an aerial transportation and manipulation simulator of MAVs with different payloads and passive connection mechanisms. It incorporates full system dynamics as well as planning, and control algorithms for aerial transportation and manipulation. Furthermore, it includes a hybrid model accounting for the transient hybrid dynamics for aerial systems with cable suspended load to mimic real-world systems. It also provides flexible interfaces to planning and control software modules for the users.

If you have any questions regarding the repo or how to use the simulator please feel free to post questions in the Issues.

Screenshot

Developer: Guanrui Li, Xinyang Liu
Affiliation: NYU ARPL
Maintainer: Guanrui Li ([email protected]), Xinyang Liu ([email protected])

ROS Organization

The ROS Organization is shown in the figure below. Screenshot The table below also summarized the publication and subscription scheme. # is used to denote MAV number.

Name Description Publications Subscriptions Services
/controller_# Control MAV(s) to follow desired trajectory /controller_#/dragonfly#/fm_cmd /dragonfly#/odom
/payload/des_traj
/payload/odom
/sim Simulate full system dynamics and publish all relevant Odometries for payload and MAV(s) /dragonfly#/odom /controller_#/dragonfly#/fm_cmd
/payload/odom
/traj Compute and publish the payload desired trajectory /payload/des_traj /traj_generator/Circle
/traj_generator/Line
/traj_generator/Min_Derivative_Line

Parameters Files

These files are used to set properties of the MAV(s).

Name Description
UAV Params Basic UAV parameters like
Payload Params Basic payload parameters like mass, moment of inertia etc.
UAV Controller Params UAV controller parameters
Payload Controller Params Payload controller parameters
Attach Mechanism Params Attach mechanism parameters

Dependencies and Installation

The RotorTM package is dependent on Python 3.8 and ROS Noetic/Melodic. Please ensure Python 3.8 as other python versions may lead to build and import errors. Python packages including numpy, scipy, and cvxopt should be installed with pip install.

$ pip install numpy==1.22.1
$ pip install scipy==1.8.0
$ pip install cvxopt==1.2.7

After installation of necessary packages, clone the repo and catkin_make the ROS workspace. Source the setup.bash file inside the devel folder.

$ cd /path/to/your/workspace/src
$ git clone --branch Python/ROS https://github.com/arplaboratory/RotorTM.git
$ catkin_make
$ source ~/path/to/your/workspace/devel/setup.bash

Running

Switching Off Hybrid Dynamics

Before initialization, check PC's system info. If the processor is weaker than Intel® Core™ i7 (or equivalent), it is recommended to initialize the simulation with hybrid dynamics turned off. To turn it off, use command window to set /hybrid_switch rosparam to False after start roscore:

$ rosparam set /hybrid_switch False

Now proceed with 'Initialize Simulation' secition below. The hybrid dynamics will be turned off and a lighter integrator will be used. To turn on hybrid dynamics, set /hybrid_switch rosparam to True and relaunch the simulator.

By default, hybrid dynamics will be included in the simulator and a heavier integrator will be used to have better accuracy. If user wishes to include hybrid dynamics, this section can be ignored.

Initialize Simulation

Directly call the .launch file using roslaunch command after roscore is started:

$ source ~/path/to/your/workspace/devel/setup.bash
$ roslaunch rotor_tm editable_launch.launch

By default, the editable_launch.launch is set to initialize the 3 MAVs cable suspended triangular payload. Directly editing the editable_launch.launch allows various scenarios to be initialized. A Comprehensive list of all possible scenarios is provided as comments inside editable_launch.launch. Please refer to that in the editable_launch.launch.

Start simulation

After calling the launch file, the MAV(s) and payload is hovering at a predetermined initial location. To start simulation, desired trajectory needs to be generated by /traj node. /traj node has been set up with three ROS services corresponding to three possible trajectory generators.

Service Description
/traj_generator/Line line trajectory generator
/traj_generator/Circle circular trajectory generator
/traj_generator/Min_Derivative_Line minimum derivative trajectory generator

The location of service call definition is RotorTM/rotor_tm_traj/srv. Directly calling the services would start the simulation by activating the publication of payload/des_traj.

Here is an example of generating a circular trajectory with radius = 1.0 meter , period = 10 seconds, and duration = 10 seconds:

$ rosservice call /traj_generator/Circle 1.0 10.0 10.0

Another example of generating a line trajectory with from point [0,0,0] to [1,1,1]:

$ rosservice call /traj_generator/Line "path:
  - x: 1.0
    y: 1.0
    z: 1.0"

Trajectory Generator

Line Trajectory Generator

The line trajectory generator will generate a sequence of points connecting the given waypoint. The path simply connects all the points with straight lines.

Circular Trajectory Generator

The circular trajectory generator will generate a circular trajectory such that it will

  1. ramp up to a constant speed
  2. run several cycles of circles ( depending on the period and duration)
  3. ramp down to zero speed.

Here are the parameters to set for generating the circular trajectory:

Name Chosen Files
Radius The radius of the circular trajectory
Period The period time of finishing one circle
Duration The total time of the circular trajectory

Minimum Derivative Trajectory Generator

The minimum_derivative trajectory generator will generate a trajectory that goes through a given path. The path will avoid sharp turning and sudden change of directions.

A corridor constraint is also provided for the minimum derivative trajectory generator. The create_option.py in rotor_tm_traj.traj.Optimization can be modified to activate/deactivate this constraint. The width of the corridor can also be changed.

To activate corridor constraint, set self.cor_constraint to True.

To deactivate corridor constraint, set self.cor_constraint to True.

To set width of the corridor, set self.cor_wid to a float.

Currently, the corridor constraint is deactivated.

rotortm's People

Contributors

lguanrui avatar xl2623 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.