mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
initial dev env setup scripts for Ubuntu and OSX (#8818)
This commit is contained in:
parent
b03cfd9afa
commit
a4a0ccf7f7
14
Tools/setup/OSX.sh
Executable file
14
Tools/setup/OSX.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
# script directory
|
||||
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
|
||||
brew tap PX4/px4
|
||||
brew install px4-dev
|
||||
|
||||
# python dependencies
|
||||
sudo easy_install pip
|
||||
pip install -r ${DIR}/requirements.txt
|
||||
|
||||
# Optional, but recommended additional simulation tools:
|
||||
brew install px4-sim
|
||||
10
Tools/setup/requirements.txt
Normal file
10
Tools/setup/requirements.txt
Normal file
@ -0,0 +1,10 @@
|
||||
argparse>=1.2
|
||||
empy>=3.3
|
||||
jinja2>=2.8
|
||||
numpy>=1.13
|
||||
pandas>=0.21
|
||||
pyserial>=3.0
|
||||
pyulog>=0.5.0
|
||||
setuptools>=39.2.0
|
||||
toml>=0.9
|
||||
wheel>=0.31.1
|
||||
53
Tools/setup/ubuntu.sh
Executable file
53
Tools/setup/ubuntu.sh
Executable file
@ -0,0 +1,53 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
# script directory
|
||||
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
|
||||
# check ubuntu version
|
||||
# instructions for 16.04, 18.04
|
||||
# otherwise warn and point to docker?
|
||||
UBUNTU_RELEASE=`lsb_release -rs`
|
||||
|
||||
if [[ "${UBUNTU_RELEASE}" == "14.04" ]]
|
||||
then
|
||||
echo "Ubuntu 14.04 unsupported, see docker px4io/px4-dev-base"
|
||||
exit 1
|
||||
elif [[ "${UBUNTU_RELEASE}" == "16.04" ]]
|
||||
then
|
||||
echo "Ubuntu 16.04"
|
||||
elif [[ "${UBUNTU_RELEASE}" == "18.04" ]]
|
||||
then
|
||||
echo "Ubuntu 18.04"
|
||||
echo "WARNING, instructions only tested on Ubuntu 16.04"
|
||||
fi
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
sudo apt-get update -yy --quiet
|
||||
sudo apt-get -yy --quiet --no-install-recommends install \
|
||||
bzip2 \
|
||||
ca-certificates \
|
||||
ccache \
|
||||
cmake \
|
||||
g++ \
|
||||
gcc \
|
||||
git \
|
||||
lcov \
|
||||
make \
|
||||
ninja-build \
|
||||
python-pip
|
||||
rsync \
|
||||
unzip \
|
||||
wget \
|
||||
wget \
|
||||
xsltproc \
|
||||
zip
|
||||
|
||||
# python dependencies
|
||||
python -m pip install --user --upgrade pip setuptools wheel
|
||||
python -m pip install --user -r ${DIR}/requirements.txt
|
||||
|
||||
# java (jmavsim or fastrtps)
|
||||
# TODO: only install when necessary
|
||||
sudo apt-get -y --quiet --no-install-recommends install \
|
||||
default-jre-headless \
|
||||
default-jdk-headless \
|
||||
Loading…
x
Reference in New Issue
Block a user