Merge branch 'benchmark_branch' of https://github.com/carla-simulator/carla into benchmark_branch

This commit is contained in:
felipecode 2018-01-22 11:01:27 +01:00
commit babb965a88
4 changed files with 89 additions and 6 deletions

View File

@ -27,6 +27,19 @@ building CARLA from source.
Once you open the project in the Unreal Editor, you can hit Play to test CARLA.
#### Can I skip the download step in Setup.sh?
It is possible to skip the download step by passing the `-s` argument to the
setup script
$ ./Setup.sh -s
Bear in mind that if you do so, you are supposed to manually download and
extract the content package yourself, check out the last output of the Setup.sh
for instructions or run
$ ./Update.sh -s
#### How can I create a binary version of CARLA?
To compile a binary (packaged) version of CARLA, open the CarlaUE4 project with

View File

@ -26,3 +26,16 @@ rebuild of all the project files with
$ cd Unreal/CarlaUE4/
$ make CarlaUE4Editor ARGS=-clean
$ make CarlaUE4Editor
#### Setup.sh fails to download content
It is possible to skip the download step by passing the `-s` argument to the
setup script
$ ./Setup.sh -s
Bear in mind that if you do so, you are supposed to manually download and
extract the content package yourself, check out the last output of the Setup.sh
for instructions or run
$ ./Update.sh -s

View File

@ -1,10 +1,14 @@
#! /bin/bash
################################################################################
# CARLA Util Setup
# CARLA Setup.sh
#
# This downloads and compiles libc++. So we can build and compile our
# dependencies with libc++ for linking against Unreal.
# This script sets up the environment and dependencies for compiling CARLA on
# Linux.
#
# 1) Download CARLA Content if necessary.
# 2) Download and compile libc++.
# 3) Download other third-party libraries and compile them with libc++.
#
# Thanks to the people at https://github.com/Microsoft/AirSim for providing the
# important parts of this script.
@ -12,6 +16,10 @@
set -e
# ==============================================================================
# -- Set up environment --------------------------------------------------------
# ==============================================================================
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pushd "$SCRIPT_DIR" >/dev/null
@ -22,9 +30,6 @@ command -v clang++-3.9 >/dev/null 2>&1 || {
exit 1;
}
# Update content.
./Update.sh
mkdir -p Util/Build
pushd Util/Build >/dev/null
@ -161,6 +166,13 @@ fi
./Util/Protoc.sh
# ==============================================================================
# -- Update CARLA Content ------------------------------------------------------
# ==============================================================================
echo
./Update.sh $@
# ==============================================================================
# -- ...and we are done --------------------------------------------------------
# ==============================================================================

View File

@ -6,6 +6,38 @@
set -e
# ==============================================================================
# -- Parse arguments -----------------------------------------------------------
# ==============================================================================
USAGE_STRING="Usage: $0 [-h|--help] [-s|--skip-download]"
SKIP_DOWNLOAD=false
OPTS=`getopt -o hs --long help,skip-download -n 'parse-options' -- "$@"`
if [ $? != 0 ] ; then echo "$USAGE_STRING" ; exit 2 ; fi
eval set -- "$OPTS"
while true; do
case "$1" in
-s | --skip-download )
SKIP_DOWNLOAD=true;
shift ;;
-h | --help )
echo "$USAGE_STRING"
exit 1
;;
* )
break ;;
esac
done
# ==============================================================================
# -- Set up environment --------------------------------------------------------
# ==============================================================================
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pushd "$SCRIPT_DIR" >/dev/null
@ -30,6 +62,19 @@ function download_content {
echo "Content updated successfully."
}
# ==============================================================================
# -- Download Content if necessary ---------------------------------------------
# ==============================================================================
if $SKIP_DOWNLOAD ; then
echo "Skipping 'Content' update. Please manually download the package from"
echo
echo " https://drive.google.com/open?id=$CONTENT_GDRIVE_ID"
echo
echo "and extract it under Unreal/CarlaUE4/Content."
exit 0
fi
if [[ -d "$CONTENT_FOLDER/.git" ]]; then
echo "Using git version of 'Content', skipping update."
elif [[ -f "$CONTENT_FOLDER/.version" ]]; then