carla/Util/BuildTools/Package.sh

402 lines
13 KiB
Bash
Raw Normal View History

2018-01-24 19:36:18 +08:00
#! /bin/bash
# ==============================================================================
# -- Parse arguments -----------------------------------------------------------
# ==============================================================================
DOC_STRING="Makes a packaged version of CARLA and other content packages ready for distribution."
2018-07-04 17:59:59 +08:00
2023-11-09 05:29:28 +08:00
USAGE_STRING="Usage: $0 [-h|--help] [--config={Debug,Development,Shipping}] [--no-zip] [--clean-intermediate] [--packages=Name1,Name2,...] [--target-archive=] [--archive-sufix=]"
2018-07-04 17:59:59 +08:00
PACKAGES="Carla"
2018-01-24 19:36:18 +08:00
DO_TARBALL=true
2018-01-25 02:47:57 +08:00
DO_CLEAN_INTERMEDIATE=false
PROPS_MAP_NAME=PropsMap
PACKAGE_CONFIG=Shipping
USE_CARSIM=false
SINGLE_PACKAGE=false
2023-11-09 05:29:28 +08:00
ARCHIVE_SUFIX=""
2018-01-24 19:36:18 +08:00
2023-11-09 05:29:28 +08:00
OPTS=`getopt -o h --long help,config:,no-zip,clean-intermediate,carsim,packages:,python-version,target-archive:,archive-sufix:, -n 'parse-options' -- "$@"`
2018-01-24 19:36:18 +08:00
eval set -- "$OPTS"
2020-08-25 21:12:46 +08:00
while [[ $# -gt 0 ]]; do
2018-01-24 19:36:18 +08:00
case "$1" in
--config )
PACKAGE_CONFIG="$2"
shift 2 ;;
2018-01-25 02:47:57 +08:00
--no-zip )
DO_TARBALL=false
shift ;;
--clean-intermediate )
DO_CLEAN_INTERMEDIATE=true
shift ;;
--packages )
PACKAGES="$2"
shift 2 ;;
--target-archive )
SINGLE_PACKAGE=true
TARGET_ARCHIVE="$2"
shift 2 ;;
2023-11-09 05:29:28 +08:00
--archive-sufix )
ARCHIVE_SUFIX="$2"
shift 2 ;;
--carsim )
USE_CARSIM=true;
shift ;;
2018-01-24 19:36:18 +08:00
-h | --help )
echo "$DOC_STRING"
echo "$USAGE_STRING"
exit 1
;;
* )
2020-08-25 21:12:46 +08:00
shift ;;
2018-01-24 19:36:18 +08:00
esac
done
# ==============================================================================
# -- Prepare environment -------------------------------------------------------
2018-01-24 19:36:18 +08:00
# ==============================================================================
source $(dirname "$0")/Environment.sh
2018-01-24 19:36:18 +08:00
if [ ! -d "${UE4_ROOT}" ]; then
fatal_error "UE4_ROOT is not defined, or points to a non-existent directory, please set this environment variable."
fi
if [ ! -n "${PACKAGES}" ] ; then
fatal_error "Nothing to be done."
fi
# Convert comma-separated string to array of unique elements.
PACKAGES="$(echo "${PACKAGES}" | tr ',' '\n' | sort -u | tr '\n' ',')"
IFS=',' read -r -a PACKAGES <<< "${PACKAGES}"
# If contains an element called "Carla".
if [[ "${PACKAGES[@]}" =~ "Carla" ]] ; then
DO_CARLA_RELEASE=true
else
DO_CARLA_RELEASE=false
fi
2019-03-20 05:41:42 +08:00
REPOSITORY_TAG=$(get_git_repository_version)
2018-01-24 19:36:18 +08:00
2023-11-09 05:29:28 +08:00
if [[ ${ARCHIVE_SUFIX} != "" ]] ; then
RELEASE_BUILD_FOLDER=${CARLA_DIST_FOLDER}/CARLA_${PACKAGE_CONFIG}_${REPOSITORY_TAG}_${ARCHIVE_SUFIX}
else
RELEASE_BUILD_FOLDER=${CARLA_DIST_FOLDER}/CARLA_${PACKAGE_CONFIG}_${REPOSITORY_TAG}
fi
if [[ ${PACKAGE_CONFIG} == "Shipping" ]] ; then
2023-11-09 05:29:28 +08:00
RELEASE_PACKAGE_PATH=${CARLA_DIST_FOLDER}/CARLA_${REPOSITORY_TAG}
else
2023-11-09 05:29:28 +08:00
RELEASE_PACKAGE_PATH=${CARLA_DIST_FOLDER}/CARLA_${PACKAGE_CONFIG}_${REPOSITORY_TAG}
fi
2023-11-09 05:29:28 +08:00
if [[ ${ARCHIVE_SUFIX} != "" ]] ; then
RELEASE_PACKAGE_PATH=${RELEASE_PACKAGE_PATH}_${ARCHIVE_SUFIX}
fi
RELEASE_PACKAGE_PATH=${RELEASE_PACKAGE_PATH}.tar.gz
log "Packaging version '${REPOSITORY_TAG}' (${PACKAGE_CONFIG})."
2018-01-24 19:36:18 +08:00
# ==============================================================================
# -- Cook CARLA project --------------------------------------------------------
# ==============================================================================
2018-01-24 19:36:18 +08:00
if ${DO_CARLA_RELEASE} ; then
2018-01-24 19:36:18 +08:00
2018-07-04 17:59:59 +08:00
pushd "${CARLAUE4_ROOT_FOLDER}" >/dev/null
2018-01-24 19:36:18 +08:00
if ${USE_CARSIM} ; then
python ${PWD}/../../Util/BuildTools/enable_carsim_to_uproject.py -f="CarlaUE4.uproject" -e
echo "CarSim ON" > ${PWD}/Config/CarSimConfig.ini
else
python ${PWD}/../../Util/BuildTools/enable_carsim_to_uproject.py -f="CarlaUE4.uproject"
echo "CarSim OFF" > ${PWD}/Config/CarSimConfig.ini
fi
log "Cooking CARLA project."
2018-01-24 19:36:18 +08:00
rm -Rf ${RELEASE_BUILD_FOLDER}
mkdir -p ${RELEASE_BUILD_FOLDER}
2018-01-24 19:36:18 +08:00
${UE4_ROOT}/Engine/Build/BatchFiles/RunUAT.sh BuildCookRun \
-project="${PWD}/CarlaUE4.uproject" \
-nocompileeditor -nop4 -cook -stage -archive -package -iterate \
-clientconfig=${PACKAGE_CONFIG} -ue4exe=UE4Editor \
-prereqs -targetplatform=Linux -build -utf8output \
-archivedirectory="${RELEASE_BUILD_FOLDER}"
2018-01-24 19:36:18 +08:00
popd >/dev/null
if [[ ! -d ${RELEASE_BUILD_FOLDER}/LinuxNoEditor ]] ; then
fatal_error "Failed to cook the project!"
fi
2018-01-24 19:36:18 +08:00
fi
# ==============================================================================
2018-07-04 17:59:59 +08:00
# -- Copy files (Python API, README, etc) --------------------------------------
2018-01-24 19:36:18 +08:00
# ==============================================================================
if ${DO_CARLA_RELEASE} ; then
2018-01-24 19:36:18 +08:00
DESTINATION=${RELEASE_BUILD_FOLDER}/LinuxNoEditor
2018-01-24 19:36:18 +08:00
log "Adding extra files to CARLA package."
2018-01-24 19:36:18 +08:00
2018-07-04 17:59:59 +08:00
pushd ${CARLA_ROOT_FOLDER} >/dev/null
2018-01-24 19:36:18 +08:00
mkdir -p "${DESTINATION}/Import"
2019-01-22 16:47:32 +08:00
echo "${REPOSITORY_TAG}" > ${DESTINATION}/VERSION
2018-07-04 17:59:59 +08:00
copy_if_changed "./LICENSE" "${DESTINATION}/LICENSE"
copy_if_changed "./CHANGELOG.md" "${DESTINATION}/CHANGELOG"
copy_if_changed "./Docs/release_readme.md" "${DESTINATION}/README"
copy_if_changed "./Docs/python_api.md" "${DESTINATION}/PythonAPI/python_api.md"
2018-07-04 17:59:59 +08:00
copy_if_changed "./Util/Docker/Release.Dockerfile" "${DESTINATION}/Dockerfile"
copy_if_changed "./Util/ImportAssets.sh" "${DESTINATION}/ImportAssets.sh"
2020-02-24 21:12:04 +08:00
copy_if_changed "./Util/DockerUtils/dist/RecastBuilder" "${DESTINATION}/Tools/"
2018-01-24 19:36:18 +08:00
copy_if_changed "./PythonAPI/carla/dist/*.egg" "${DESTINATION}/PythonAPI/carla/dist/"
2021-07-15 17:18:34 +08:00
copy_if_changed "./PythonAPI/carla/dist/*.whl" "${DESTINATION}/PythonAPI/carla/dist/"
copy_if_changed "./PythonAPI/carla/agents/" "${DESTINATION}/PythonAPI/carla/agents"
copy_if_changed "./PythonAPI/carla/scene_layout.py" "${DESTINATION}/PythonAPI/carla/"
copy_if_changed "./PythonAPI/carla/requirements.txt" "${DESTINATION}/PythonAPI/carla/"
copy_if_changed "./PythonAPI/examples/*.py" "${DESTINATION}/PythonAPI/examples/"
copy_if_changed "./PythonAPI/examples/rss/*.py" "${DESTINATION}/PythonAPI/examples/rss/"
copy_if_changed "./PythonAPI/examples/requirements.txt" "${DESTINATION}/PythonAPI/examples/"
copy_if_changed "./PythonAPI/util/*.py" "${DESTINATION}/PythonAPI/util/"
copy_if_changed "./PythonAPI/util/opendrive/" "${DESTINATION}/PythonAPI/util/opendrive/"
copy_if_changed "./PythonAPI/util/requirements.txt" "${DESTINATION}/PythonAPI/util/"
2019-03-27 23:39:09 +08:00
2020-03-31 22:33:19 +08:00
copy_if_changed "./Co-Simulation/" "${DESTINATION}/Co-Simulation/"
if [ -d "./Plugins/" ] ; then
copy_if_changed "./Plugins/" "${DESTINATION}/Plugins/"
fi
2020-12-22 18:08:27 +08:00
Ros2 (#6862) * Adding ROS2 manager * Trying to compile fastDDS in windows, but have problems with dependencies * Camera sensors connected to ROS2, dependencies disabled temporaly * Including enum with sensors list * adding GNSS sensor capture * adding IMU sensor capture * adding DVS sensor capture * adding Lidar sensor capture * adding SemanticLidar and Radar capture * adding ObstacleDetector and some fixes * modify cmakelists, failed to find libatomic * fixed libatomic * compile fast-dds with libc++ * fixed compliation fast dds with libcxx * linked carla with fastdds * Fixed Fast-DDS lib Now its compiled to a intermediate lib with a bridge so libstdc++ can be used * moved all ros2 deps to ros2 folder renamed types from .cxx to .cpp * Finally FastDDS compiled and working inside CARLA * exposed publish function for testing * fixed code style * make ros2 optional * make ros2 optional * Added defines to compile ROS2 code * ros image publisher working * deleted some buffer copies * Added more topics and ROS2 types * Adding sensor Transform as argument, and add function to send buffer or serialize and send buffer * Removing empty buffer from DVS sensor * fixed lidar publisher * fixed lidar publisher * Fix buffer of RGB in ROS2 * adding timestamp of each frame into ROS2 manager * sending timestamps with frame to ROS2 * put apart timestamp from frame counter call * adding BufferView to share buffers * adding BufferView to share buffers * adding ros_name attribute to all actors * mapping ros_name for each actor * ROS2 is now published in a different thread Publishers now can be created on demand and be reused Added subscriber for ego vehicle Fixed build scripts * forgot to add this fix * add ros2 to windows scripts * fixed default ros topic names * fix topic name duplication * Adding functions for enable/disable sensors publishing without listen to it * Added Camera info and ROI types RGB Camera now publishes in both topics * move camera info immutable data to the constructor * Publish transform for all topics Create Camera DVS subtopics Fixed bug with Lidar * Added flip Y to semantic lidar * Adding callbacks for subscribers from Unreal * Adding camera info to ROS2 (resolution and FOV) * Finished ROS2 naming from python * Fixed bug with ros names * Delete topics when deleting the sensors * setting the rosname same as default no longer rewrites it * ROS transform fix * Added all camera topics with the image and camera info Added vehicle control Added clock publisher * Change ros2 topic names for vehicle subscriber and clock publisher * Rename vehicle control ros2 topic name * rename subscriber type to CarlaEgoVehicleControl * Fix semantic lidar default ros name Fix sizeof the semantic lidar data buffer * Changed controller stored as string to pointer * Back to previous version for default hero ros name Removed debug prints * Remvoe callback when ego publisher disconnects * Serializing DVS data before sending to ROS * dvs camera image and lidar * DVS Pointcloud publishing * Remove unnecessary fields * Send local transforms to ros * avoid transform recalculation if not needed * Optical Flow Camera fixed * Set fixed branch for Fast-DDS to avoid cmake version change issues * Finally Working on package * Fix style from FastDDS auto generated files * Added ros2 to ubuntu in jenkins * removed ros2 from jenkins, test * restore ros2 in jenkins * fix copy shareds, and removed server dependency from libcarla * test installing the fastdds dependencies in jenkins * move installing deps to separate stage * removed install deps * Fixing test_benchmark_streaming * Fixed imu orientation and camera info data * Fixing test_benchmark_streaming.cpp with BufferView * Removing DEBUG_ONLY() * publish collision sensor * Fixing unit-tests with the new BufferView * camera info is set once * Fix echo camera info * fix transform rotation * Fixing ros_name attribute creation * fixed camera info and region of interest publish * fix IMU compass * Forgot to add ros2 flag to jenkins package --------- Co-authored-by: bernatx <bernatx@gmail.com>
2023-11-06 19:34:07 +08:00
if [ -d "./Unreal/CarlaUE4/Plugins/Carla/CarlaDependencies/lib" ] ; then
cp -r "./Unreal/CarlaUE4/Plugins/Carla/CarlaDependencies/lib" "${DESTINATION}/CarlaUE4/Plugins/Carla/CarlaDependencies"
fi
2019-03-29 04:45:08 +08:00
copy_if_changed "./Unreal/CarlaUE4/Content/Carla/HDMaps/*.pcd" "${DESTINATION}/HDMaps/"
copy_if_changed "./Unreal/CarlaUE4/Content/Carla/HDMaps/Readme.md" "${DESTINATION}/HDMaps/README"
2018-07-04 17:59:59 +08:00
popd >/dev/null
2018-01-24 19:36:18 +08:00
fi
# ==============================================================================
# -- Zip the project -----------------------------------------------------------
# ==============================================================================
if ${DO_CARLA_RELEASE} && ${DO_TARBALL} ; then
2018-01-24 19:36:18 +08:00
DESTINATION=${RELEASE_PACKAGE_PATH}
SOURCE=${RELEASE_BUILD_FOLDER}/LinuxNoEditor
2018-01-24 19:36:18 +08:00
2018-07-04 17:59:59 +08:00
pushd "${SOURCE}" >/dev/null
2018-01-24 19:36:18 +08:00
log "Packaging CARLA release."
2018-01-24 19:36:18 +08:00
rm -f ./Manifest_NonUFSFiles_Linux.txt
rm -f ./Manifest_UFSFiles_Linux.txt
2018-01-24 19:36:18 +08:00
rm -Rf ./CarlaUE4/Saved
rm -Rf ./Engine/Saved
tar -czf ${DESTINATION} *
2018-01-24 19:36:18 +08:00
popd >/dev/null
fi
2018-01-25 02:47:57 +08:00
# ==============================================================================
# -- Remove intermediate files -------------------------------------------------
# ==============================================================================
if ${DO_CARLA_RELEASE} && ${DO_CLEAN_INTERMEDIATE} ; then
2018-01-25 02:47:57 +08:00
2018-07-04 17:59:59 +08:00
log "Removing intermediate build."
2018-01-25 02:47:57 +08:00
rm -Rf ${RELEASE_BUILD_FOLDER}
2018-01-25 02:47:57 +08:00
fi
2018-01-24 19:36:18 +08:00
# ==============================================================================
# -- Cook other packages -------------------------------------------------------
2018-01-24 19:36:18 +08:00
# ==============================================================================
PACKAGE_PATH_FILE=${CARLAUE4_ROOT_FOLDER}/Content/PackagePath.txt
MAP_LIST_FILE=${CARLAUE4_ROOT_FOLDER}/Content/MapPathsLinux.txt
for PACKAGE_NAME in "${PACKAGES[@]}" ; do if [[ ${PACKAGE_NAME} != "Carla" ]] ; then
log "Preparing environment for cooking '${PACKAGE_NAME}'."
if ${SINGLE_PACKAGE} ; then
BUILD_FOLDER_TARGET=${CARLA_DIST_FOLDER}/${TARGET_ARCHIVE}_${REPOSITORY_TAG}
else
BUILD_FOLDER_TARGET=${CARLA_DIST_FOLDER}/${PACKAGE_NAME}_${REPOSITORY_TAG}
fi
2023-11-09 05:29:28 +08:00
if [[ ${ARCHIVE_SUFIX} != "" ]] ; then
BUILD_FOLDER_TARGET=${BUILD_FOLDER_TARGET}_${ARCHIVE_SUFIX}
fi
if [[ ${ARCHIVE_SUFIX} != "" ]] ; then
BUILD_FOLDER=${CARLA_DIST_FOLDER}/${PACKAGE_NAME}_${REPOSITORY_TAG}_${ARCHIVE_SUFIX}
else
BUILD_FOLDER=${CARLA_DIST_FOLDER}/${PACKAGE_NAME}_${REPOSITORY_TAG}
fi
DESTINATION=${BUILD_FOLDER_TARGET}.tar
PACKAGE_PATH=${CARLAUE4_ROOT_FOLDER}/Content/${PACKAGE_NAME}
mkdir -p ${BUILD_FOLDER}
log "Cooking package '${PACKAGE_NAME}'..."
pushd "${CARLAUE4_ROOT_FOLDER}" > /dev/null
# Prepare cooking of package
${UE4_ROOT}/Engine/Binaries/Linux/UE4Editor "${CARLAUE4_ROOT_FOLDER}/CarlaUE4.uproject" \
-run=PrepareAssetsForCooking -PackageName=${PACKAGE_NAME} -OnlyPrepareMaps=false
PACKAGE_FILE=$(<${PACKAGE_PATH_FILE})
MAPS_TO_COOK=$(<${MAP_LIST_FILE})
# Cook maps in batches
MAX_STRINGLENGTH=1000
IFS="+" read -ra MAP_LIST <<< $MAPS_TO_COOK
TOTAL=0
MAP_STRING=""
for MAP in "${MAP_LIST[@]}"; do
if (($(($TOTAL+${#MAP})) > $MAX_STRINGLENGTH)); then
echo "Cooking $MAP_STRING"
${UE4_ROOT}/Engine/Binaries/Linux/UE4Editor "${CARLAUE4_ROOT_FOLDER}/CarlaUE4.uproject" \
-run=cook -map="${MAP_STRING}" -cooksinglepackage -targetplatform="LinuxNoEditor" \
-OutputDir="${BUILD_FOLDER}" -iterate
MAP_STRING=""
TOTAL=0
fi
MAP_STRING=$MAP_STRING+$MAP
TOTAL=$(($TOTAL+${#MAP}))
done
if (($TOTAL > 0)); then
${UE4_ROOT}/Engine/Binaries/Linux/UE4Editor "${CARLAUE4_ROOT_FOLDER}/CarlaUE4.uproject" \
-run=cook -map="${MAP_STRING}" -cooksinglepackage -targetplatform="LinuxNoEditor" \
-OutputDir="${BUILD_FOLDER}" -iterate
fi
PROP_MAP_FOLDER="${PACKAGE_PATH}/Maps/${PROPS_MAP_NAME}"
if [ -d ${PROP_MAP_FOLDER} ] ; then
rm -Rf ${PROP_MAP_FOLDER}
fi
popd >/dev/null
2022-11-03 20:10:43 +08:00
pushd "${BUILD_FOLDER}" > /dev/null
2022-11-03 20:10:43 +08:00
SUBST_PATH="${BUILD_FOLDER}/CarlaUE4"
SUBST_FILE="${PACKAGE_FILE/${CARLAUE4_ROOT_FOLDER}/${SUBST_PATH}}"
2022-11-03 20:10:43 +08:00
# Copy the package config file to package
mkdir -p "$(dirname ${SUBST_FILE})" && cp "${PACKAGE_FILE}" "$_"
2022-11-03 20:10:43 +08:00
# Copy the OpenDRIVE .xodr files to package
IFS='+' # set delimiter
# MAPS_TO_COOK is read into an array as tokens separated by IFS
read -ra ADDR <<< "$MAPS_TO_COOK"
for i in "${ADDR[@]}"; do # access each element of array
Digital Twins 0.2 version (#6768) * Bitmap sent and drawn in widget texture with bugs * Map bitmap shown on widget * Concated meshes generated in the same lane to avoid errors during simplification * Navigation added to widget * Avoid Simplify to remove border vertices and try to parallel assets creation process * Road Generation 0.1 version ready * Removing Engine Association, Formatting CarlaTools Build dependencies * Change container type of generated procedural mesh componetns to be supported by UPROPERTY * Fixed indices jumping by two * Added in separate thread junctions generation * Started dynamic database creation * Dynamic database creation temporally removed * First step of merge. Coords of bottom left corner and top right corner * Libraries added to build system * Git ignore for osmrenderer to avoid ThirdParties directory to be tracked * Lat and Lon coords for corners sent from server to client * Transformed to local coords meshes' vertices' coords * Coords format error fixed * Saving xodr and osm files inside of OpenDrive folder * Widget fixed * UI design improved * WIP Windows build system for osm-world-renderer * Socket implementation replaced by boost asio framework in osmrenderer * Added multithreaded simplification of meshes * Build system adapted to wndows * Headers fixed to avoid windows specific heraders compilation * Remove warnings * Added widget to import building from houdini * Added origin latitude and longituda to OSM to OpenDRIVE conversion functions. Fixed Houdini importer widgets. * Add Houdini plugin download to the build system * Moved houdini blueprint. Houdini plugin now dowloads by default * Added houdini download for windows * OpenDriveToMap Now is a UOBject instead of widget * Added Lane mark generation. * Roads materials and distance field scale set to 0 * M_PI macro fixed for windows osm-renderer build system * Added Lane Marking generation * Fixed compilation issue related with std pair non copyable lane * Fix bug where different lanes were concating. Fix bug where end of roadmark was creating an artifact * Lanes Marks material assignation * Fix compilation issue and reading from not valid memory crash * Middle Lane mark duplication bug fixed - temp solution * Added bumps along road * Adding marchingcubes library and added to create junctions * Added junctions generations using marching cube and smoothed * Fixed linux compilation and removed couple warnings * Using previous algorithim for two road connections * Code cleanup * Remove debug state * Format Files * Format third parties files * Spaces removal * Fix code format * Added spawnning for trees * New branch to don`t loose modifications in code * Removing unnecesary spaces * Set trees for designer * Tag static mesh actor from road type * One tile with landscape and road cut * Changed format of For * WidgetCreated * Widget progress * LevelCreator Update * Folder for basicParameters in father map * Father map from template * Terrain mesh generated from noise and road mask Road mask not applied * Assign SubLevel by position * Changed to static functions * StrigUpdate * Added missing UFUNCTIONS * Trying to move Houdini actors to tiles * Meshes from Houdini to Tiles * Number of X and Y tiles exposed * Modify to new functions * Modifying code to create a new variable-offset and table to ingest blueprints * Update assignTile Function * Updating widget and cpp file to relocate meshes * Update Widget and create local copy of OpenDriveToMap * Added planes as landscape * RoadImported fixed * Simplification done in UE side * Update Houdini pipeline * Fixed osmrenderer compilation for windows * Generate landscape and set materials * Generate UVs for lane meshes. Generate Normals and Tangets for lane meshes * Delete unnecesary files * Widget updated * Exposing different variables to BPs * Update Assets * Asset path names fixed * Fixed height for misc objects, set default landscape * Rotate Light boxes * Adding OSM Importer plugin * Fixed normals on sidewalks * Update adding buildings plugin * Adding missing BP * Update * Fix BP_Instanced * Update OSMImporter * Creating BP_BuildingCreator * LevelCreator Fixed * Update building asset creation * If def add for osm renderer * Building block variation and styles * Updated values and generation for demo3 * Fix Widget * Changed unreal FSocket for boost sockets. Fixed road position errors * Update building creation * Updated Building Height * Fixing line colors * Added Planes in missing stuff * Update for meshes * Update deformation, avoid creation of individual buildings and add check for deformation * Deleted unnecesary files * New branch to work on building generation * Added shorts walls and roofs * Improve triangulation of polygons using UE * Fixing pipeline * Disabling shadows for roads and terrain * Updated default values for BP_Opendrivetomap * Updated OpenDriveToMap * Use Editor world instead of GetWorld * Added HTTP module * Change customfiledownloader API * Adding debuginformation * Using OpenDriveToMapObject * Adding Debug stuff * Expose Buildings names in ue4 * Remove from root when generation finished * Adding Slopes to building generation * Table update * Set pivot point at centre of building and Set use of material instances * Updating Buildings plane stuff * Fixing walls for building generator * Update data table * Updated road generation * Update DT * Update Origin of map and set moving for large map * Remove logs prepare blueprints for getting new info * Update slope fix and material for slopes * Updated Digital Twins for 12/06 * Added direct URL support * Avoid some crashes and improve QoL * Height fix * Tried to expose largemap in tick * New vegetation scatter tool * Added Full largemap support * Edit building levels in some type of levels * Updated static meshes instead of procedural meshes * Updated building generation and reduced logs * Vegetation tool into landscape pipeline * Demo ready for digital twins * Automated download of plugin * Update linux build script for UE4 Plugins * Disable sidewalks in junctions * Re enable sidewalksin crossing lanes * Removed asserts added checks to avoid generation of sidewalks on road * Optimizations for VRAM * Move actors slowly to sub levels * Added optimizations and support for smaller or bigger maps in tiles, modified TileSize * Garage and shed styles * Update generation stages * Update garage and shed parameters * Changed method generation to tile by tile * Fixed memory leak and UOpenDriveToMap is a uobject now * Fixed tile by tile generation * Added Heightmap support to map gen * last update * Commandlet generation working * Merge finished * Update DefaultEngine.ini to rever default rhi * Clean up HoudiniImporterWidget.cpp * Add with editor and make editor only code * Setup dependencies for CarlaTools plugin * Update StreetMap plugin commit and gitignore * Update Content version * Update next content version * Changed based type of OpenDrivetomap * Remove intermediate files if need similar to BuildCarlaUE4.sh * Update order of execution of donwload * Try to run download plugins everytime is used * Update packages sh avoid to delete anything * Fixing setup in windows * Add UE Constructor to Commandlet * More fixes * content version * Update package sh and update * Update Streetmap version * Update dependencies * Update StreetMap commit * Fix typo in gitignore * Update STMap plugin commit * Revert latest changes in windows package script * Update comments --------- Co-authored-by: aollero <aollero@cvc.uab.cat> Co-authored-by: aollero <adriollero@gmail.com> Co-authored-by: Axel <axellopez92@outlook.com> Co-authored-by: marionzki <mnoriegazamora@gmail.com> Co-authored-by: bernatx <bernatx@gmail.com>
2023-10-31 18:24:22 +08:00
2022-11-03 20:10:43 +08:00
XODR_FILE_PATH="${CARLAUE4_ROOT_FOLDER}/Content${i:5}"
MAP_NAME=${XODR_FILE_PATH##*/}
XODR_FILE=$(find "${CARLAUE4_ROOT_FOLDER}/Content" -name "${MAP_NAME}.xodr" -print -quit)
2022-11-03 20:10:43 +08:00
if [ -f "${XODR_FILE}" ] ; then
2022-11-03 20:10:43 +08:00
SUBST_FILE="${XODR_FILE/${CARLAUE4_ROOT_FOLDER}/${SUBST_PATH}}"
2022-11-03 20:10:43 +08:00
# Copy the package config file to package
mkdir -p "$(dirname ${SUBST_FILE})" && cp "${XODR_FILE}" "$_"
2022-11-03 20:10:43 +08:00
fi
2022-11-03 20:10:43 +08:00
# binary files for navigation and traffic manager
BIN_FILE_PATH="${CARLAUE4_ROOT_FOLDER}/Content${i:5}"
MAP_NAME=${BIN_FILE_PATH##*/}
find "${CARLAUE4_ROOT_FOLDER}/Content" -name "${MAP_NAME}.bin" -print0 | while read -d $'\0' BIN_FILE
do
if [ -f "${BIN_FILE}" ] ; then
2019-12-11 16:48:27 +08:00
2022-11-03 20:10:43 +08:00
SUBST_FILE="${BIN_FILE/${CARLAUE4_ROOT_FOLDER}/${SUBST_PATH}}"
2019-12-11 16:48:27 +08:00
2022-11-03 20:10:43 +08:00
# Copy the package config file to package
mkdir -p "$(dirname ${SUBST_FILE})" && cp "${BIN_FILE}" "$_"
fi
done
2022-11-03 20:10:43 +08:00
done
Digital Twins 0.2 version (#6768) * Bitmap sent and drawn in widget texture with bugs * Map bitmap shown on widget * Concated meshes generated in the same lane to avoid errors during simplification * Navigation added to widget * Avoid Simplify to remove border vertices and try to parallel assets creation process * Road Generation 0.1 version ready * Removing Engine Association, Formatting CarlaTools Build dependencies * Change container type of generated procedural mesh componetns to be supported by UPROPERTY * Fixed indices jumping by two * Added in separate thread junctions generation * Started dynamic database creation * Dynamic database creation temporally removed * First step of merge. Coords of bottom left corner and top right corner * Libraries added to build system * Git ignore for osmrenderer to avoid ThirdParties directory to be tracked * Lat and Lon coords for corners sent from server to client * Transformed to local coords meshes' vertices' coords * Coords format error fixed * Saving xodr and osm files inside of OpenDrive folder * Widget fixed * UI design improved * WIP Windows build system for osm-world-renderer * Socket implementation replaced by boost asio framework in osmrenderer * Added multithreaded simplification of meshes * Build system adapted to wndows * Headers fixed to avoid windows specific heraders compilation * Remove warnings * Added widget to import building from houdini * Added origin latitude and longituda to OSM to OpenDRIVE conversion functions. Fixed Houdini importer widgets. * Add Houdini plugin download to the build system * Moved houdini blueprint. Houdini plugin now dowloads by default * Added houdini download for windows * OpenDriveToMap Now is a UOBject instead of widget * Added Lane mark generation. * Roads materials and distance field scale set to 0 * M_PI macro fixed for windows osm-renderer build system * Added Lane Marking generation * Fixed compilation issue related with std pair non copyable lane * Fix bug where different lanes were concating. Fix bug where end of roadmark was creating an artifact * Lanes Marks material assignation * Fix compilation issue and reading from not valid memory crash * Middle Lane mark duplication bug fixed - temp solution * Added bumps along road * Adding marchingcubes library and added to create junctions * Added junctions generations using marching cube and smoothed * Fixed linux compilation and removed couple warnings * Using previous algorithim for two road connections * Code cleanup * Remove debug state * Format Files * Format third parties files * Spaces removal * Fix code format * Added spawnning for trees * New branch to don`t loose modifications in code * Removing unnecesary spaces * Set trees for designer * Tag static mesh actor from road type * One tile with landscape and road cut * Changed format of For * WidgetCreated * Widget progress * LevelCreator Update * Folder for basicParameters in father map * Father map from template * Terrain mesh generated from noise and road mask Road mask not applied * Assign SubLevel by position * Changed to static functions * StrigUpdate * Added missing UFUNCTIONS * Trying to move Houdini actors to tiles * Meshes from Houdini to Tiles * Number of X and Y tiles exposed * Modify to new functions * Modifying code to create a new variable-offset and table to ingest blueprints * Update assignTile Function * Updating widget and cpp file to relocate meshes * Update Widget and create local copy of OpenDriveToMap * Added planes as landscape * RoadImported fixed * Simplification done in UE side * Update Houdini pipeline * Fixed osmrenderer compilation for windows * Generate landscape and set materials * Generate UVs for lane meshes. Generate Normals and Tangets for lane meshes * Delete unnecesary files * Widget updated * Exposing different variables to BPs * Update Assets * Asset path names fixed * Fixed height for misc objects, set default landscape * Rotate Light boxes * Adding OSM Importer plugin * Fixed normals on sidewalks * Update adding buildings plugin * Adding missing BP * Update * Fix BP_Instanced * Update OSMImporter * Creating BP_BuildingCreator * LevelCreator Fixed * Update building asset creation * If def add for osm renderer * Building block variation and styles * Updated values and generation for demo3 * Fix Widget * Changed unreal FSocket for boost sockets. Fixed road position errors * Update building creation * Updated Building Height * Fixing line colors * Added Planes in missing stuff * Update for meshes * Update deformation, avoid creation of individual buildings and add check for deformation * Deleted unnecesary files * New branch to work on building generation * Added shorts walls and roofs * Improve triangulation of polygons using UE * Fixing pipeline * Disabling shadows for roads and terrain * Updated default values for BP_Opendrivetomap * Updated OpenDriveToMap * Use Editor world instead of GetWorld * Added HTTP module * Change customfiledownloader API * Adding debuginformation * Using OpenDriveToMapObject * Adding Debug stuff * Expose Buildings names in ue4 * Remove from root when generation finished * Adding Slopes to building generation * Table update * Set pivot point at centre of building and Set use of material instances * Updating Buildings plane stuff * Fixing walls for building generator * Update data table * Updated road generation * Update DT * Update Origin of map and set moving for large map * Remove logs prepare blueprints for getting new info * Update slope fix and material for slopes * Updated Digital Twins for 12/06 * Added direct URL support * Avoid some crashes and improve QoL * Height fix * Tried to expose largemap in tick * New vegetation scatter tool * Added Full largemap support * Edit building levels in some type of levels * Updated static meshes instead of procedural meshes * Updated building generation and reduced logs * Vegetation tool into landscape pipeline * Demo ready for digital twins * Automated download of plugin * Update linux build script for UE4 Plugins * Disable sidewalks in junctions * Re enable sidewalksin crossing lanes * Removed asserts added checks to avoid generation of sidewalks on road * Optimizations for VRAM * Move actors slowly to sub levels * Added optimizations and support for smaller or bigger maps in tiles, modified TileSize * Garage and shed styles * Update generation stages * Update garage and shed parameters * Changed method generation to tile by tile * Fixed memory leak and UOpenDriveToMap is a uobject now * Fixed tile by tile generation * Added Heightmap support to map gen * last update * Commandlet generation working * Merge finished * Update DefaultEngine.ini to rever default rhi * Clean up HoudiniImporterWidget.cpp * Add with editor and make editor only code * Setup dependencies for CarlaTools plugin * Update StreetMap plugin commit and gitignore * Update Content version * Update next content version * Changed based type of OpenDrivetomap * Remove intermediate files if need similar to BuildCarlaUE4.sh * Update order of execution of donwload * Try to run download plugins everytime is used * Update packages sh avoid to delete anything * Fixing setup in windows * Add UE Constructor to Commandlet * More fixes * content version * Update package sh and update * Update Streetmap version * Update dependencies * Update StreetMap commit * Fix typo in gitignore * Update STMap plugin commit * Revert latest changes in windows package script * Update comments --------- Co-authored-by: aollero <aollero@cvc.uab.cat> Co-authored-by: aollero <adriollero@gmail.com> Co-authored-by: Axel <axellopez92@outlook.com> Co-authored-by: marionzki <mnoriegazamora@gmail.com> Co-authored-by: bernatx <bernatx@gmail.com>
2023-10-31 18:24:22 +08:00
rm -Rf "./CarlaUE4/Metadata"
rm -Rf "./CarlaUE4/Plugins"
rm -Rf "./CarlaUE4/Content/${PACKAGE_NAME}/Maps/${PROPS_MAP_NAME}"
rm -f "./CarlaUE4/AssetRegistry.bin"
2022-11-03 20:10:43 +08:00
if ${DO_TARBALL} ; then
Digital Twins 0.2 version (#6768) * Bitmap sent and drawn in widget texture with bugs * Map bitmap shown on widget * Concated meshes generated in the same lane to avoid errors during simplification * Navigation added to widget * Avoid Simplify to remove border vertices and try to parallel assets creation process * Road Generation 0.1 version ready * Removing Engine Association, Formatting CarlaTools Build dependencies * Change container type of generated procedural mesh componetns to be supported by UPROPERTY * Fixed indices jumping by two * Added in separate thread junctions generation * Started dynamic database creation * Dynamic database creation temporally removed * First step of merge. Coords of bottom left corner and top right corner * Libraries added to build system * Git ignore for osmrenderer to avoid ThirdParties directory to be tracked * Lat and Lon coords for corners sent from server to client * Transformed to local coords meshes' vertices' coords * Coords format error fixed * Saving xodr and osm files inside of OpenDrive folder * Widget fixed * UI design improved * WIP Windows build system for osm-world-renderer * Socket implementation replaced by boost asio framework in osmrenderer * Added multithreaded simplification of meshes * Build system adapted to wndows * Headers fixed to avoid windows specific heraders compilation * Remove warnings * Added widget to import building from houdini * Added origin latitude and longituda to OSM to OpenDRIVE conversion functions. Fixed Houdini importer widgets. * Add Houdini plugin download to the build system * Moved houdini blueprint. Houdini plugin now dowloads by default * Added houdini download for windows * OpenDriveToMap Now is a UOBject instead of widget * Added Lane mark generation. * Roads materials and distance field scale set to 0 * M_PI macro fixed for windows osm-renderer build system * Added Lane Marking generation * Fixed compilation issue related with std pair non copyable lane * Fix bug where different lanes were concating. Fix bug where end of roadmark was creating an artifact * Lanes Marks material assignation * Fix compilation issue and reading from not valid memory crash * Middle Lane mark duplication bug fixed - temp solution * Added bumps along road * Adding marchingcubes library and added to create junctions * Added junctions generations using marching cube and smoothed * Fixed linux compilation and removed couple warnings * Using previous algorithim for two road connections * Code cleanup * Remove debug state * Format Files * Format third parties files * Spaces removal * Fix code format * Added spawnning for trees * New branch to don`t loose modifications in code * Removing unnecesary spaces * Set trees for designer * Tag static mesh actor from road type * One tile with landscape and road cut * Changed format of For * WidgetCreated * Widget progress * LevelCreator Update * Folder for basicParameters in father map * Father map from template * Terrain mesh generated from noise and road mask Road mask not applied * Assign SubLevel by position * Changed to static functions * StrigUpdate * Added missing UFUNCTIONS * Trying to move Houdini actors to tiles * Meshes from Houdini to Tiles * Number of X and Y tiles exposed * Modify to new functions * Modifying code to create a new variable-offset and table to ingest blueprints * Update assignTile Function * Updating widget and cpp file to relocate meshes * Update Widget and create local copy of OpenDriveToMap * Added planes as landscape * RoadImported fixed * Simplification done in UE side * Update Houdini pipeline * Fixed osmrenderer compilation for windows * Generate landscape and set materials * Generate UVs for lane meshes. Generate Normals and Tangets for lane meshes * Delete unnecesary files * Widget updated * Exposing different variables to BPs * Update Assets * Asset path names fixed * Fixed height for misc objects, set default landscape * Rotate Light boxes * Adding OSM Importer plugin * Fixed normals on sidewalks * Update adding buildings plugin * Adding missing BP * Update * Fix BP_Instanced * Update OSMImporter * Creating BP_BuildingCreator * LevelCreator Fixed * Update building asset creation * If def add for osm renderer * Building block variation and styles * Updated values and generation for demo3 * Fix Widget * Changed unreal FSocket for boost sockets. Fixed road position errors * Update building creation * Updated Building Height * Fixing line colors * Added Planes in missing stuff * Update for meshes * Update deformation, avoid creation of individual buildings and add check for deformation * Deleted unnecesary files * New branch to work on building generation * Added shorts walls and roofs * Improve triangulation of polygons using UE * Fixing pipeline * Disabling shadows for roads and terrain * Updated default values for BP_Opendrivetomap * Updated OpenDriveToMap * Use Editor world instead of GetWorld * Added HTTP module * Change customfiledownloader API * Adding debuginformation * Using OpenDriveToMapObject * Adding Debug stuff * Expose Buildings names in ue4 * Remove from root when generation finished * Adding Slopes to building generation * Table update * Set pivot point at centre of building and Set use of material instances * Updating Buildings plane stuff * Fixing walls for building generator * Update data table * Updated road generation * Update DT * Update Origin of map and set moving for large map * Remove logs prepare blueprints for getting new info * Update slope fix and material for slopes * Updated Digital Twins for 12/06 * Added direct URL support * Avoid some crashes and improve QoL * Height fix * Tried to expose largemap in tick * New vegetation scatter tool * Added Full largemap support * Edit building levels in some type of levels * Updated static meshes instead of procedural meshes * Updated building generation and reduced logs * Vegetation tool into landscape pipeline * Demo ready for digital twins * Automated download of plugin * Update linux build script for UE4 Plugins * Disable sidewalks in junctions * Re enable sidewalksin crossing lanes * Removed asserts added checks to avoid generation of sidewalks on road * Optimizations for VRAM * Move actors slowly to sub levels * Added optimizations and support for smaller or bigger maps in tiles, modified TileSize * Garage and shed styles * Update generation stages * Update garage and shed parameters * Changed method generation to tile by tile * Fixed memory leak and UOpenDriveToMap is a uobject now * Fixed tile by tile generation * Added Heightmap support to map gen * last update * Commandlet generation working * Merge finished * Update DefaultEngine.ini to rever default rhi * Clean up HoudiniImporterWidget.cpp * Add with editor and make editor only code * Setup dependencies for CarlaTools plugin * Update StreetMap plugin commit and gitignore * Update Content version * Update next content version * Changed based type of OpenDrivetomap * Remove intermediate files if need similar to BuildCarlaUE4.sh * Update order of execution of donwload * Try to run download plugins everytime is used * Update packages sh avoid to delete anything * Fixing setup in windows * Add UE Constructor to Commandlet * More fixes * content version * Update package sh and update * Update Streetmap version * Update dependencies * Update StreetMap commit * Fix typo in gitignore * Update STMap plugin commit * Revert latest changes in windows package script * Update comments --------- Co-authored-by: aollero <aollero@cvc.uab.cat> Co-authored-by: aollero <adriollero@gmail.com> Co-authored-by: Axel <axellopez92@outlook.com> Co-authored-by: marionzki <mnoriegazamora@gmail.com> Co-authored-by: bernatx <bernatx@gmail.com>
2023-10-31 18:24:22 +08:00
if ${SINGLE_PACKAGE} ; then
tar -rf ${DESTINATION} *
else
tar -czf ${DESTINATION}.gz *
fi
popd >/dev/null
fi
if ${DO_CLEAN_INTERMEDIATE} ; then
log "Removing intermediate build."
rm -Rf ${BUILD_FOLDER}
fi
fi ; done
# compress the TAR if it is a single package
if ${SINGLE_PACKAGE} ; then
gzip -f ${DESTINATION}
fi
# ==============================================================================
# -- Log paths of generated packages -------------------------------------------
# ==============================================================================
# for PACKAGE_NAME in "${PACKAGES[@]}" ; do if [[ ${PACKAGE_NAME} != "Carla" ]] ; then
# FINAL_PACKAGE=${CARLA_DIST_FOLDER}/${PACKAGE_NAME}_${REPOSITORY_TAG}.tar.gz
# log "Package '${PACKAGE_NAME}' created at ${FINAL_PACKAGE}"
# fi ; done
if ${DO_CARLA_RELEASE} ; then
if ${DO_TARBALL} ; then
log "CARLA release created at ${RELEASE_PACKAGE_PATH}"
else
log "CARLA release created at ${RELEASE_BUILD_FOLDER}"
fi
2018-03-16 18:47:42 +08:00
fi
# ==============================================================================
# -- ...and we are done --------------------------------------------------------
# ==============================================================================
2018-07-04 17:59:59 +08:00
log "Success!"