## QUICK TUTORIAL ABOUT HOW TO INSTALL ROS AND GAZEBO WITH JD's MODIFICATIONS (FOR DUMMIES)

1. Download ubuntu_sim_ros_gazebo.sh and save it in your Download folder.

download ubuntu_sim_ros_gazebo.sh

Right click, ‘save as’ in your downloads directory.

2. Open your terminal and to go your download folder ( cd Downlads/ )

3. Install ROS, GAZEBO and the px4 stack by typing in "source ubuntu_sim_ros_gazebo.sh" in your terminal

4. When the install is finished go to your home folder and delete the SRC folder!! (this is important, we will replace this with JD’s own px4 stack)

5. Download all folders from Github openUAV to your HOME folder.

Open-UAV github (6 folders in total)

Copy github link

Go to home folder (cd)

In terminal (git clone ‘adress’)

6. Go to the downloaded Firmware folder (cd Firmware/ )

7. type source setup-install.sh , this will install the px4 flight stack with modifications made by JD

(press enter when asked while running the installation)

8. When the installation is finished continue by typing "cd ~/src/Firmware/ && make posix_sitl_default gazebo" in your terminal

9. If posix_sitl_gazebo doesn’t launch the gazebo and gives you a error message regarding geographiclib, do the following:

In your terminal type: sudo apt-get install ros-kinetic-mavros ros-kinetic-mavros-extras

When that installation is ready type:

cd; wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh

./install_geographiclib_datasets.sh

you might have to make the install_geographiclib_datasets.sh executable.

In terminal(home): sudo ./install_geographiclib_datasets.sh

10. Connect the sitl_gazebo folder with your catkin_ws/src folder by typing "sudo ln -s ~/sitl_gazebo ~/catkin_ws/src" in your terminal

11. Connect the src/firmware with your catkin_ws/src folder by typing "sudo ln -s ~/src/Firmware ~/catkin_ws/src" in your terminal

12. Go to your catkin folder and build it by typing "catkin build" in the terminal.

13. Then type "source devel/setup.bash" in the terminal (in your catkin_ws folder)

14. Copy and paste this is in your terminal:

roscd; cd ..; cd src/Firmware

make posix_sitl_default

source ~/catkin_ws/devel/setup.bash

source Tools/setup_gazebo.bash $(pwd) $(pwd)/build_posix_sitl_default

export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)

export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)/Tools/sitl_gazebo

roslaunch px4 posix_sitl.launch

roslaunch mavros px4.launch fcu_url:="udp://:14550@127.0.0.1:14557"

this only needs to be done once, to start the simulation from now on it is just to type the two lower rows.

roslaunch px4 posix_sitl.launch

roslaunch mavros px4.launch fcu_url:="udp://:14550@127.0.0.1:14557"

To launch gezebo with sensors etc:

Download pkg “pilot_v2” and use px4_mavros.launch (launch file)

Make sure you add models for f450 to home/sitl_gazebo/models