Advertisement
Guest User

Untitled

a guest
Apr 24th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.57 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. ## Bash script for setting up a PX4 development environment on Ubuntu LTS (16.04).
  4. ## It can be used for installing simulators (only) or for installing the preconditions for Snapdragon Flight or Raspberry Pi.
  5. ##
  6. ## Installs:
  7. ## - Common dependencies libraries and tools as defined in `ubuntu_sim_common_deps.sh`
  8. ## - Gazebo9 simulator
  9.  
  10. echo "Downloading dependent script 'ubuntu_sim_common_deps.sh'"
  11. # Source the ubuntu_sim_common_deps.sh script directly from github
  12. common_deps=$(wget https://raw.githubusercontent.com/PX4/Devguide/master/build_scripts/ubuntu_sim_common_deps.sh -O -)
  13. wget_return_code=$?
  14. # If there was an error downloading the dependent script, we must warn the user and exit at this point.
  15. if [[ $wget_return_code -ne 0 ]]; then echo "Error downloading 'ubuntu_sim_common_deps.sh'. Sorry but I cannot proceed further :("; exit 1; fi
  16. # Otherwise, source the downloaded script.
  17. . <(echo "${common_deps}")
  18.  
  19.  
  20. ###
  21. # Gazebo (9) simulator dependencies
  22. echo "Installing Gazebo9"
  23. sudo apt-get install protobuf-compiler libeigen3-dev libopencv-dev -y
  24. sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
  25. ## Setup keys
  26. wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
  27. ## Update the debian database:
  28. sudo apt-get update -y
  29. ## Install Gazebo9
  30. sudo apt-get install gazebo9 -y
  31. ## For developers (who work on top of Gazebo) one extra package
  32. sudo apt-get install libgazebo9-dev -y
  33.  
  34.  
  35.  
  36. # Go to the firmware directory
  37. cd $clone_dir/Firmware
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement