BebopS
BebopS aims to simulate the behavior of Parrot Bebop 2 by using SIL methodologies
Install / Use
/learn @gsilano/BebopSREADME
BebopS
| BebopS build status | |
|-----------------------|---------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|
BebopS is an extension of the ROS package RotorS, aimed to modeling, developing and integrating the Parrot Bebop 2 quadcopter in the physics based simulation environment Gazebo. The contribution can be also considered as a reference guide for expanding the RotorS functionalities in the Unmanned Aerial Vehicles (UAVs) filed and for simulating in a way rather close to reality the real aircraft behavior.
The repository was made for designing complex control systems for the Parrot Bebop 2, but it can also be used as a basis for any other aircraft with the aim of helping in the controller implementation. Indeed, implementing the own control algorithm is a not easy process and having a complete software platform for simulating the multirotor behavior, considering also its on-board sensors and the secondary effects, could give advantages in terms of coding and deployment of the controller software.
Finally, the software platform allows to detect and manage instabilities of the Parrot Bebop 2 that otherwise might not arise when considering only its Matlab/Simulink simulations. Moreover, implementation details such as synchronization, overflow or any other software related issue, can be isolated when looking at the Matlab/Simulink platform only, but their effects can be investigated by considering the proposed repository.
Simple cases study are considered (task1_world.launch and task2_world.launch) in order to show how the package works and the validity of the employed dynamical model together the control architecture of the quadrotor.
The code is released under Apache license, thus making it available for scientific and educational activities.
The platform was developed using Ubuntu 16.04 and the Kinetic Kame version of ROS, but it is also fully compatible with Ubuntu 18.04 and the Melodic Morenia distribution of ROS. Although backwards compatibility is guarantee, i.e., the platform is fully compatible with Indigo Igloo version of ROS and Ubuntu 14.04, such configuration is not recommended since the ROS support is expected to be closed in April 2019.
Below we provide the instructions necessary for getting started. See BebopS' wiki for more instructions and examples.
If you are using this simulator for research purposes especially for your publication, please take a look at the Publications page. The page contains the core papers and all related works (using the platform).
The authors are grateful to the LARICS Lab, University of Zagreb, for the initial work done to make the platform compatible with the latest changes to the RotorS package. Here the link to them sofware repositry. The software platform is an extract of the work carried out for the industrial challenge of the 26th Mediterranean Conference on Control and Automation (MED’18) in which the authors took part (here the link to the conference report).
Installation Instructions - Ubuntu 20.04 with ROS Noetic and Gazebo 11
To use the code developed and stored in this repository some preliminary actions are needed. They are listed below.
- Install and initialize ROS Melodic desktop full, additional ROS packages, catkin-tools, and wstool:
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
$ sudo apt install curl # if you haven't already installed curl
$ curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
$ sudo apt update
$ sudo apt install ros-noetic-desktop-full ros-noetic-joy ros-noetic-octomap-ros ros-noetic-mavlink
$ sudo apt install ros-noetic-octomap-mapping ros-noetic-control-toolbox
$ sudo apt install python3-vcstool python3-catkin-tools protobuf-compiler libgoogle-glog-dev
$ sudo rosdep init
$ rosdep update
$ echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
$ sudo apt-get install python3-rosdep python3-wstool ros-noetic-ros libgoogle-glog-dev
- If you don't have ROS workspace yet you can do so by
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
$ catkin_init_workspace # initialize your catkin workspace
$ cd ~/catkin_ws/
$ catkin init
$ cd ~/catkin_ws/src
$ git clone -b dev/ros-noetic https://github.com/gsilano/rotors_simulator.git
$ git clone -b dev/ros-noetic https://github.com/gsilano/BebopS.git
$ git clone -b med18_gazebo9 https://github.com/gsilano/mav_comm.git
$ cd ~/catkin_ws
- Build your workspace with
python_catkin_tools(therefore you needpython_catkin_tools)
$ rosdep install --from-paths src -i
$ rosdep update
$ catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release -DCATKIN_ENABLE_TESTING=False
$ catkin build
- Add sourcing to your
.bashrcfile
$ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
In the event the
cmd /opt/ros/melodic/lib/gazebo_ros/gzserver -u -e odeappear, the solution proposed in #40 temporany fixes the issue.
$ cp build/rotors_gazebo_plugins/libmav_msgs.so devel/lib/
Installation Instructions - Ubuntu 18.04 with ROS Melodic and Gazebo 9
To use the code developed and stored in this repository some preliminary actions are needed. They are listed below.
- Install and initialize ROS Melodic desktop full, additional ROS packages, catkin-tools, and wstool:
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
$ sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
$ sudo apt update
$ sudo apt install ros-melodic-desktop-full ros-melodic-joy ros-melodic-octomap-ros ros-melodic-mavlink
$ sudo apt install python-wstool python-catkin-tools protobuf-compiler libgoogle-glog-dev ros-melodic-control-toolbox
$ sudo rosdep init
$ rosdep update
$ echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
$ sudo apt install python-rosinstall python-rosinstall-generator build-essential
- If you don't have ROS workspace yet you can do so by
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
$ catkin_init_workspace # initialize your catkin workspace
$ cd ~/catkin_ws/
$ catkin init
$ cd ~/catkin_ws/src
$ git clone -b med18_gazebo9 https://github.com/gsilano/rotors_simulator.git
$ git clone -b med18_gazebo9 https://github.com/gsilano/mav_comm.git
$ git clone -b dev/gazebo9 https://github.com/gsilano/BebopS.git
$ git clone https://github.com/AutonomyLab/bebop_autonomy.git
$ cd ~/catkin_ws
- Build your workspace with
python_catkin_tools(therefore you needpython_catkin_tools)
$ rosdep install --from-paths src -i
$ catkin build
In case the building process should fail, consider what's detailed in #43. In particular, run the instructions reported at the bottom.
$ cd ~/catkin_ws/src/rotors_simulator $ git checkout med18_gazebo9_fix $ cd ~/catkin_ws $ catkin build
- Add sourcing to your
.bashrcfile
$ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
- Update the pre-installed Gazebo version. This fix the issue with the
error in REST request for accessing api.ignition.org
$ sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
$ wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
$ sudo apt update
$ sudo apt install gazebo9 gazebo9-* ros-melodic-gazebo-*
$ sudo apt upgrade
In the event that the simulation does not start, the problem may be related to Gazebo and missing packages. Therefore, run the following commands. More details are reported in #25.
$ sudo apt-get remove ros-melodic-gazebo* gazebo*
$ sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
$ wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install gazebo9 gazebo9-* ros-melodic-gazebo-*
$ sudo apt upgrade
Installation Instructions - Ubuntu 16.04 with ROS Kinetic and Gazebo 7
To use the
