Skip to content

Trajectory generation and control algorithms for UAVs with ROS wrapping.

License

Notifications You must be signed in to change notification settings

gipsa-lab-uav/trajectory_control

Repository files navigation

Trajectory Control

Trajectory generation and control algorithms for UAVs with ROS wrapping.

The project uses external software such as Mavros. Below are the links directing to their documentations.

PX4 Development Guide

PX4-Firmware

Mavros

Sitl-Gazebo

Installation

For the installation, you need to have ROS melodic (or kinetic) installed, a catkin workspace and Gazebo. Follow the online documentation to set up your environement.

ROS Installation

Catkin Workspace

Gazebo

Prerequisites

Install mavros

sudo apt install ros-melodic-mavros ros-melodic-mavros-extras

Mavros request the GeographicLib datasets, install it by running the install_geographiclib_datasets.sh script

wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh
chmod +x install_geographiclib_datasets.sh
sudo ./install_geographiclib_datasets.sh

Install libgstreamer

sudo apt install libgstreamer1.0-dev

Initialize rosdep and update it

sudo rosdep init
rosdep update

Clone sitl_gazebo and PX4 Firmware

cd ~/catkin_ws/src/
git clone --recursive https://github.com/PX4/sitl_gazebo
git clone --recursive https://github.com/PX4/Firmware px4

Note: If you have troubles installing the different packages, it is recommended to read the related documentation.

Install trajectory_control

Clone the trajectory_control repository

cd ~/catkin_ws/src/
git clone https://github.com/gipsa-lab-uav/trajectory_control

Don't forget to install the required Python packages, with:

pip install -r requirements.txt

And then continue the installation:

cd ..
catkin_make

Then source your setup.bash

source devel/setup.bash

Testing the installation

On one terminal, run the following launch file:

roslaunch trajectory_control trajectory_control_example.launch

A gazebo window should open with the iris model along with a window displaying live information sush as the thrust, and a window with a generated trajectory. Close the generated trajectory window. In the gazebo window, the iris quadcopter should takeoff and start the trajectory. You can open QGroundControl in parallel also to check if everything is interfacing correctly.

Troubleshooting

catkin_make

In case of issue with catkin_make it is advisable to launch it with the VERBOSE=1 option

If performance issues don't allow for the computer to finish catkin_make, it is possible to reduce the compiler usage on the computer, using the -j option. Use the nproc command to get the number of CPU cores/threads available. Example:

nproc
>> 8
catkin_make -j2

rosdep

If an error of type 'cannot download default sources list from: ... Website may be down' occurs

sudo apt-get install ca-certificates

If it still does not work, try to update your system date/clock

Gazebo

Run Gazebo with the verbose option to get more information on issues gazebo --verbose. If Gazebo process dies at the start, it might be a symbol lookup error. Upgrade all your package and try again.

sudo apt upgrade

About

Trajectory generation and control algorithms for UAVs with ROS wrapping.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •