From 41c08326cf5065d03645f07d84a8684eb6ae557c Mon Sep 17 00:00:00 2001 From: Martina Rivizzigno Date: Tue, 13 Aug 2019 17:22:03 +0200 Subject: [PATCH] README: add installation script to be run after the ones in the dev guide --- README.md | 22 ++++++++++++++++++++++ tools/install_avoidance.sh | 9 +++++++++ 2 files changed, 31 insertions(+) create mode 100644 tools/install_avoidance.sh diff --git a/README.md b/README.md index 233a8de10..f5d4fa499 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,28 @@ The documentation contains information about how to setup and run the two planne ## Installation +### Script Installation (Recommended) +1. Go to the [PX4 Development Guide](https://dev.px4.io/v1.8.2/en/setup/dev_env_linux.html#gazebo-with-ros) and run the Gazebo with ROS installation script +1. Download [install_avoidance.sh](https://github.com/PX4/avoidance/blob/master/install_avoidance.sh) +1. Run the script +``` bash +source install_avoidance.sh +``` +To run the local planner +```bash +roslaunch local_planner local_planner_sitl_3cam.launch +``` +To run the safe landing planner +```bash +roslaunch safe_landing_planner safe_landing_planner.launch +``` +To run the safe global planner +```bash +roslaunch global_planner global_planner_depth-camera.launch +``` + +Alternitavely you can follow the step by step instructions in the following sections. + ### Installation for Ubuntu 16.04 and ROS Kinetic This is a step-by-step guide to install and build all the prerequisites for running this module on Ubuntu 16.04. You might want to skip some of them if your system is already partially installed. diff --git a/tools/install_avoidance.sh b/tools/install_avoidance.sh new file mode 100644 index 000000000..26d293a5d --- /dev/null +++ b/tools/install_avoidance.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +cd ~/src/Firmware && git submodule update --init --recursive && DONT_RUN=1 make px4_sitl_default gazebo + +cd ~/catkin_ws/src && git clone https://github.com/PX4/avoidance.git && catkin build + +echo "source ~/src/Firmware/Tools/setup_gazebo.bash ~/src/Firmware ~/src/Firmware/build/px4_sitl_default > /dev/null +export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:~/catkin_ws/src/avoidance/avoidance/sim/models:~/catkin_ws/src/avoidance/avoidance/sim/worlds +export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:~/src/Firmware:~/src/Firmware/Tools/sitl_gazebo" >> ~/.bashrc