Adding make commands to retrieve the Plugins (#3017)

Co-authored-by: Marc Garcia Puig <marcgpuig@gmail.com>
This commit is contained in:
bernat 2020-07-17 12:36:49 +02:00 committed by GitHub
parent 0b781d5fd5
commit 5ac2ba712c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 129 additions and 0 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@ Deprecated/PythonClient/dist
TrafficManager/build TrafficManager/build
Util/Build Util/Build
Install Install
Plugins
/ExportedMaps /ExportedMaps
/Import/* /Import/*

View File

@ -17,6 +17,7 @@
* All sensors are now multi-stream, that means that the same sensor can be listened from different clients * All sensors are now multi-stream, that means that the same sensor can be listened from different clients
* Fixed point cloud of LiDAR. Now the points are given correctly in the sensor's coordinate system. * Fixed point cloud of LiDAR. Now the points are given correctly in the sensor's coordinate system.
* Exposed matrix form of transformation to the client and Python API. * Exposed matrix form of transformation to the client and Python API.
* Added make command to download contributions as plugins (`make plugins`)
* Added PythonAPI command to set multiple car light states at once * Added PythonAPI command to set multiple car light states at once
* Added PythonAPI `carla.world.get_vehicles_light_states` to get all the car light states at once * Added PythonAPI `carla.world.get_vehicles_light_states` to get all the car light states at once
* OpenDRIVE ingestion bugfixes * OpenDRIVE ingestion bugfixes

View File

@ -131,6 +131,10 @@ LibCarla.client.rss.debug: setup ad-rss
LibCarla.client.rss.release: setup ad-rss LibCarla.client.rss.release: setup ad-rss
@${CARLA_BUILD_TOOLS_FOLDER}/BuildLibCarla.sh --client --release --rss @${CARLA_BUILD_TOOLS_FOLDER}/BuildLibCarla.sh --client --release --rss
.PHONY: Plugins
plugins:
@${CARLA_BUILD_TOOLS_FOLDER}/Plugins.sh $(ARGS)
setup: setup:
@${CARLA_BUILD_TOOLS_FOLDER}/Setup.sh @${CARLA_BUILD_TOOLS_FOLDER}/Setup.sh

View File

@ -0,0 +1,77 @@
@echo off
setlocal
rem BAT script that downloads and installs all Plugins
rem Run it through a cmd with the x64 Visual C++ Toolset enabled.
set LOCAL_PATH=%~dp0
set "FILE_N= -[%~n0]:"
rem Print batch params (debug purpose)
echo %FILE_N% [Batch params]: %*
rem ============================================================================
rem -- Parse arguments ---------------------------------------------------------
rem ============================================================================
set RELEASE=false
:arg-parse
if not "%1"=="" (
if "%1"=="--release" (
set RELEASE=true
shift
)
shift
goto :arg-parse
)
rem ============================================================================
rem -- Parse arguments ---------------------------------------------------------
rem ============================================================================
if not exist "%ROOT_PATH%Plugins" (
if %RELEASE% == true (
echo Cloning for release...
call git clone --depth=1 --recursive https://github.com/carla-simulator/carla-plugins.git "%ROOT_PATH%Plugins"
) else (
echo Cloning for build...
call git clone --recursive https://github.com/carla-simulator/carla-plugins.git "%ROOT_PATH%Plugins"
)
if %errorlevel% neq 0 goto error_git
) else (
goto already
)
goto success
rem ============================================================================
rem -- Messages and Errors -----------------------------------------------------
rem ============================================================================
:success
echo.
echo %FILE_N% "Plugins" has been successfully installed in "%ROOT_PATH%Plugins!"
goto good_exit
:already
echo.
echo %FILE_N% "Plugins" already exists in "%ROOT_PATH%Plugins!"
goto good_exit
:error_git
echo.
echo %FILE_N% [GIT ERROR] An error ocurred while executing the git.
echo %FILE_N% [GIT ERROR] Possible causes:
echo %FILE_N% - Make sure "git" is installed.
echo %FILE_N% - Make sure it is available on your Windows "path".
goto bad_exit
:good_exit
echo %FILE_N% Exiting...
endlocal
exit /b 0
:bad_exit
echo %FILE_N% Exiting with error...
endlocal
exit /b %errorlevel%

42
Util/BuildTools/Plugins.sh Executable file
View File

@ -0,0 +1,42 @@
# ==============================================================================
# -- Parse arguments -----------------------------------------------------------
# ==============================================================================
DOC_STRING="Retrieve the plugins for CARLA"
USAGE_STRING="Usage: $0 [-h|--help] [--release]"
RELEASE=false
if [ $? != 0 ] ; then echo "$USAGE_STRING" ; exit 2 ; fi
while true; do
case "$1" in
--release )
RELEASE=true
shift ;;
-h | --help )
echo "$DOC_STRING"
echo "$USAGE_STRING"
exit 1
;;
* )
break ;;
esac
done
# ==============================================================================
# -- Get Plugins ---------------------------------------------------------------
# ==============================================================================
log "Retrieving Plugins"
if [[ -d "${CARLA_ROOT_FOLDER}Plugins" ]] ; then
log "Plugins already installed."
else
if ${RELEASE} ; then
git clone --depth=1 --recursive https://github.com/carla-simulator/carla-plugins.git "${CARLA_ROOT_FOLDER}Plugins"
else
git clone --recursive https://github.com/carla-simulator/carla-plugins.git "${CARLA_ROOT_FOLDER}Plugins"
fi
fi

View File

@ -71,5 +71,9 @@ LibCarla: setup
setup: setup:
@"${CARLA_BUILD_TOOLS_FOLDER}/Setup.bat" --boost-toolset msvc-14.1 @"${CARLA_BUILD_TOOLS_FOLDER}/Setup.bat" --boost-toolset msvc-14.1
.PHONY: Plugins
plugins:
@"${CARLA_BUILD_TOOLS_FOLDER}/Plugins.bat" $(ARGS)
deploy: deploy:
@"${CARLA_BUILD_TOOLS_FOLDER}/Deploy.bat" $(ARGS) @"${CARLA_BUILD_TOOLS_FOLDER}/Deploy.bat" $(ARGS)