carla/Util/BuildTools/BuildCarlaUE4.bat

247 lines
6.9 KiB
Batchfile
Raw Normal View History

@echo off
setlocal enabledelayedexpansion
rem BAT script that creates the binaries for Carla (carla.org).
rem Run it through a cmd with the x64 Visual C++ Toolset enabled.
set LOCAL_PATH=%~dp0
set FILE_N=-[%~n0]:
2018-08-29 18:24:30 +08:00
rem Print batch params (debug purpose)
echo %FILE_N% [Batch params]: %*
rem ============================================================================
rem -- Parse arguments ---------------------------------------------------------
rem ============================================================================
set BUILD_UE4_EDITOR=false
set LAUNCH_UE4_EDITOR=false
set REMOVE_INTERMEDIATE=false
set USE_CARSIM=false
set USE_CHRONO=false
set USE_UNITY=true
set CARSIM_STATE="CarSim OFF"
set CHRONO_STATE="Chrono OFF"
set UNITY_STATE="Unity ON"
set AT_LEAST_WRITE_OPTIONALMODULES=false
2022-06-09 05:22:30 +08:00
set EDITOR_FLAGS=""
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
set USE_ROS2=false
set ROS2_STATE="Ros2 OFF"
:arg-parse
echo %1
if not "%1"=="" (
2022-06-09 05:22:30 +08:00
if "%1"=="--editor-flags" (
set EDITOR_FLAGS=%2
shift
)
if "%1"=="--build" (
set BUILD_UE4_EDITOR=true
)
if "%1"=="--launch" (
set LAUNCH_UE4_EDITOR=true
)
if "%1"=="--clean" (
set REMOVE_INTERMEDIATE=true
)
if "%1"=="--carsim" (
set USE_CARSIM=true
)
if "%1"=="--chrono" (
set USE_CHRONO=true
)
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 "%1"=="--ros2" (
set USE_ROS2=true
)
if "%1"=="--no-unity" (
set USE_UNITY=false
)
if "%1"=="--at-least-write-optionalmodules" (
set AT_LEAST_WRITE_OPTIONALMODULES=true
)
if "%1"=="-h" (
goto help
)
if "%1"=="--help" (
goto help
)
shift
goto arg-parse
)
2022-06-09 05:22:30 +08:00
rem remove quotes from arguments
set EDITOR_FLAGS=%EDITOR_FLAGS:"=%
if %REMOVE_INTERMEDIATE% == false (
if %LAUNCH_UE4_EDITOR% == false (
if %BUILD_UE4_EDITOR% == false (
if %AT_LEAST_WRITE_OPTIONALMODULES% == false (
goto help
)
)
)
)
rem Get Unreal Engine root path
if not defined UE4_ROOT (
set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\EpicGames\Unreal Engine"
set VALUE_NAME=InstalledDirectory
for /f "usebackq tokens=1,2,*" %%A in (`reg query !KEY_NAME! /s /reg:64`) do (
if "%%A" == "!VALUE_NAME!" (
set UE4_ROOT=%%C
)
)
if not defined UE4_ROOT goto error_unreal_no_found
)
if not "%UE4_ROOT:~-1%"=="\" set UE4_ROOT=%UE4_ROOT%\
rem Set the visual studio solution directory
rem
set UE4_PROJECT_FOLDER=%ROOT_PATH:/=\%Unreal\CarlaUE4\
pushd "%UE4_PROJECT_FOLDER%"
rem Clear binaries and intermediates generated by the build system
rem
if %REMOVE_INTERMEDIATE% == true (
rem Remove directories
for %%G in (
"%UE4_PROJECT_FOLDER%Binaries",
"%UE4_PROJECT_FOLDER%Build",
"%UE4_PROJECT_FOLDER%Saved",
"%UE4_PROJECT_FOLDER%Intermediate",
"%UE4_PROJECT_FOLDER%Plugins\Carla\Binaries",
"%UE4_PROJECT_FOLDER%Plugins\Carla\Intermediate",
"%UE4_PROJECT_FOLDER%.vs"
) do (
if exist %%G (
echo %FILE_N% Cleaning %%G
rmdir /s/q %%G
)
)
rem Remove files
for %%G in (
"%UE4_PROJECT_FOLDER%CarlaUE4.sln"
) do (
if exist %%G (
echo %FILE_N% Cleaning %%G
del %%G
)
)
2018-08-24 16:43:22 +08:00
)
Digital Twins first iteration (#6260) * Added way to download files from overpass api * Save downloaded text to a file * Changed log type for File manipulation * Online process files when request is valid * Correct file format * Correct file format for UE4 class * Fix compilation issue due to name change * Create Widget with OpenFileDialogFunctionality * Step xodr to map completed * Generated Static meshes and replace procedural actors * Created and saved assets during road generation * Formatted file correctly * OSM To ODR broguht to UE4 * Full pipeline working on linux * Added osm2odr support in editor in Windos * Added Widget to CartaTools * Fixed Linux compilation error * Added Carla Game Instance included to avoid compilation error * Osm Renderer Tool dummy version * Server creates SVG files when client request it * SVG creation and rasterization - libraries integration * Server size working * Added Simplify to LibCarla, Added timers to measure time generation. Add mesh deformation during road creation. * Fixed mesh format translations * Trying to paint bitmap into the UTexture * 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 * 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 * Build system adapted to wndows * Headers fixed to avoid windows specific heraders compilation * 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 --------- Co-authored-by: Aaron <samaniegoaaron112@gmail.com> Co-authored-by: Blyron <53337103+Blyron@users.noreply.github.com> Co-authored-by: aollero <aollero@cvc.uab.cat> Co-authored-by: aollero <adriollero@gmail.com> Co-authored-by: bernat <bernatx@gmail.com>
2023-03-04 00:26:48 +08:00
rem Download Houdini Plugin
set HOUDINI_PLUGIN_REPO=https://github.com/sideeffects/HoudiniEngineForUnreal.git
set HOUDINI_PLUGIN_PATH=Plugins/HoudiniEngine
2023-07-03 19:55:50 +08:00
set HOUDINI_PLUGIN_COMMIT=55b6a16cdf274389687fce3019b33e3b6e92a914
Digital Twins first iteration (#6260) * Added way to download files from overpass api * Save downloaded text to a file * Changed log type for File manipulation * Online process files when request is valid * Correct file format * Correct file format for UE4 class * Fix compilation issue due to name change * Create Widget with OpenFileDialogFunctionality * Step xodr to map completed * Generated Static meshes and replace procedural actors * Created and saved assets during road generation * Formatted file correctly * OSM To ODR broguht to UE4 * Full pipeline working on linux * Added osm2odr support in editor in Windos * Added Widget to CartaTools * Fixed Linux compilation error * Added Carla Game Instance included to avoid compilation error * Osm Renderer Tool dummy version * Server creates SVG files when client request it * SVG creation and rasterization - libraries integration * Server size working * Added Simplify to LibCarla, Added timers to measure time generation. Add mesh deformation during road creation. * Fixed mesh format translations * Trying to paint bitmap into the UTexture * 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 * 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 * Build system adapted to wndows * Headers fixed to avoid windows specific heraders compilation * 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 --------- Co-authored-by: Aaron <samaniegoaaron112@gmail.com> Co-authored-by: Blyron <53337103+Blyron@users.noreply.github.com> Co-authored-by: aollero <aollero@cvc.uab.cat> Co-authored-by: aollero <adriollero@gmail.com> Co-authored-by: bernat <bernatx@gmail.com>
2023-03-04 00:26:48 +08:00
set HOUDINI_PATCH=${CARLA_UTIL_FOLDER}/Patches/houdini_patch.txt
if not exist "%HOUDINI_PLUGIN_PATH%" (
2023-07-03 19:55:50 +08:00
call git clone %HOUDINI_PLUGIN_REPO% %HOUDINI_PLUGIN_PATH%
cd %HOUDINI_PLUGIN_PATH%
call git checkout %HOUDINI_PLUGIN_COMMIT%
cd ../..
Digital Twins first iteration (#6260) * Added way to download files from overpass api * Save downloaded text to a file * Changed log type for File manipulation * Online process files when request is valid * Correct file format * Correct file format for UE4 class * Fix compilation issue due to name change * Create Widget with OpenFileDialogFunctionality * Step xodr to map completed * Generated Static meshes and replace procedural actors * Created and saved assets during road generation * Formatted file correctly * OSM To ODR broguht to UE4 * Full pipeline working on linux * Added osm2odr support in editor in Windos * Added Widget to CartaTools * Fixed Linux compilation error * Added Carla Game Instance included to avoid compilation error * Osm Renderer Tool dummy version * Server creates SVG files when client request it * SVG creation and rasterization - libraries integration * Server size working * Added Simplify to LibCarla, Added timers to measure time generation. Add mesh deformation during road creation. * Fixed mesh format translations * Trying to paint bitmap into the UTexture * 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 * 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 * Build system adapted to wndows * Headers fixed to avoid windows specific heraders compilation * 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 --------- Co-authored-by: Aaron <samaniegoaaron112@gmail.com> Co-authored-by: Blyron <53337103+Blyron@users.noreply.github.com> Co-authored-by: aollero <aollero@cvc.uab.cat> Co-authored-by: aollero <adriollero@gmail.com> Co-authored-by: bernat <bernatx@gmail.com>
2023-03-04 00:26:48 +08:00
)
rem Build Carla Editor
rem
2023-03-09 23:01:53 +08:00
set OMNIVERSE_PATCH_FOLDER=%ROOT_PATH%Util\Patches\omniverse_4.26\
set OMNIVERSE_PLUGIN_FOLDER=%UE4_ROOT%Engine\Plugins\Marketplace\NVIDIA\Omniverse\
if exist %OMNIVERSE_PLUGIN_FOLDER% (
set OMNIVERSE_PLUGIN_INSTALLED="Omniverse ON"
xcopy /Y /S /I "%OMNIVERSE_PATCH_FOLDER%USDCARLAInterface.h" "%OMNIVERSE_PLUGIN_FOLDER%Source\OmniverseUSD\Public\" > NUL
xcopy /Y /S /I "%OMNIVERSE_PATCH_FOLDER%USDCARLAInterface.cpp" "%OMNIVERSE_PLUGIN_FOLDER%Source\OmniverseUSD\Private\" > NUL
) else (
set OMNIVERSE_PLUGIN_INSTALLED="Omniverse OFF"
)
if %USE_CARSIM% == true (
2024-02-19 17:55:48 +08:00
python %ROOT_PATH%Util/BuildTools/enable_carsim_to_uproject.py -f="%ROOT_PATH%Unreal/CarlaUE4/CarlaUE4.uproject" -e
set CARSIM_STATE="CarSim ON"
) else (
2024-02-19 17:55:48 +08:00
python %ROOT_PATH%Util/BuildTools/enable_carsim_to_uproject.py -f="%ROOT_PATH%Unreal/CarlaUE4/CarlaUE4.uproject"
set CARSIM_STATE="CarSim OFF"
)
if %USE_CHRONO% == true (
set CHRONO_STATE="Chrono ON"
) else (
set CHRONO_STATE="Chrono OFF"
)
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 %USE_ROS2% == true (
set ROS2_STATE="Ros2 ON"
) else (
set ROS2_STATE="Ros2 OFF"
)
if %USE_UNITY% == true (
set UNITY_STATE="Unity ON"
) else (
set UNITY_STATE="Unity OFF"
)
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
set OPTIONAL_MODULES_TEXT=%CARSIM_STATE% %CHRONO_STATE% %ROS2_STATE% %OMNIVERSE_PLUGIN_INSTALLED% %UNITY_STATE%
2023-03-09 23:01:53 +08:00
echo %OPTIONAL_MODULES_TEXT% > "%ROOT_PATH%Unreal/CarlaUE4/Config/OptionalModules.ini"
2023-03-09 21:17:41 +08:00
if %BUILD_UE4_EDITOR% == true (
echo %FILE_N% Building Unreal Editor...
call "%UE4_ROOT%Engine\Build\BatchFiles\Build.bat"^
CarlaUE4Editor^
Win64^
Development^
-WaitMutex^
-FromMsBuild^
"%ROOT_PATH%Unreal/CarlaUE4/CarlaUE4.uproject"
if errorlevel 1 goto bad_exit
call "%UE4_ROOT%Engine\Build\BatchFiles\Build.bat"^
CarlaUE4^
Win64^
Development^
-WaitMutex^
-FromMsBuild^
"%ROOT_PATH%Unreal/CarlaUE4/CarlaUE4.uproject"
if errorlevel 1 goto bad_exit
)
rem Launch Carla Editor
rem
if %LAUNCH_UE4_EDITOR% == true (
echo %FILE_N% Launching Unreal Editor...
call "%UE4_ROOT%\Engine\Binaries\Win64\UE4Editor.exe"^
2022-06-09 05:22:30 +08:00
"%UE4_PROJECT_FOLDER%CarlaUE4.uproject" %EDITOR_FLAGS%
if %errorlevel% neq 0 goto error_build
)
goto good_exit
rem ============================================================================
rem -- Messages and Errors -----------------------------------------------------
rem ============================================================================
:help
echo Build LibCarla.
echo "Usage: %FILE_N% [-h^|--help] [--build] [--launch] [--clean]"
goto good_exit
:error_build
echo.
echo %FILE_N% [ERROR] There was a problem building CarlaUE4.
echo %FILE_N% Please go to "Carla\Unreal\CarlaUE4", right click on
echo %FILE_N% "CarlaUE4.uproject" and select:
echo %FILE_N% "Generate Visual Studio project files"
echo %FILE_N% Open de generated "CarlaUE4.sln" and try to manually compile it
echo %FILE_N% and check what is causing the error.
goto bad_exit
:good_exit
endlocal
exit /b 0
:bad_exit
endlocal
exit /b %errorlevel%
:error_unreal_no_found
echo.
echo %FILE_N% [ERROR] Unreal Engine not detected
goto bad_exit