carla/Util/BuildTools/BuildCarlaUE4.sh

216 lines
5.8 KiB
Bash
Raw Normal View History

2018-07-04 17:59:59 +08:00
#! /bin/bash
# ==============================================================================
# -- Parse arguments -----------------------------------------------------------
# ==============================================================================
DOC_STRING="Build and launch CarlaUE4."
USAGE_STRING="Usage: $0 [-h|--help] [--build] [--rebuild] [--launch] [--clean] [--hard-clean] [--opengl]"
2018-07-04 17:59:59 +08:00
REMOVE_INTERMEDIATE=false
HARD_CLEAN=false
BUILD_CARLAUE4=false
LAUNCH_UE4_EDITOR=false
USE_CARSIM=false
2021-01-28 19:53:40 +08:00
USE_CHRONO=false
Pytorch integration with terramechanics (#5684) * Added sparse map reprsentation * Added pytorch for terramechanics modules * Added saving loading particles in independent thread * Added blank space at the EOF * Added texture creation lambda * Moving function to component * Added input/output architecture for neural network * Filling heightmap with particles data. Adding Logging to debug * Updating Texture data at realtime * Connected 3 stages, using MPC Position to Update and Texture * Added square particle sampling. Added second model input/output scheme. Fixed start up crash. * Added new flags and fixes * Position to update not updating in material but yes in MPC * Fixed coordinate frame issues and crashes * Prepared to follow position in the 1st vehicle in map * Fixed height map alignment * Fixed large map and terrain tiles alignment * Fixed inputs for new model * Added scale factor * Fixed slow read write operations * Bug fixes * Removed debug output * Removed nvidia profinling marks * Preparing merge debug code removed, runtime working by rounding the loading data properly * Made pytorch optional module * Added TRACE_CPUPROFILER_EVENT_SCOPE to Update and UpdateTexture * Added optional pytorch conditions and macros * Removed static Path * Fixed #ifdef clause. Added missing include. * Deformation on vehicle working. Ready to start optimisation * First optimsation done. Heightmap per Tile * Updated tiles'heightmap to make their size relative to texture and tilesize * Fixed slow frames. Added functionality * Removed unecessary library links * Fixed pytorch link * Limited search to relevant tiles * Added multithreaded particle search. Fixed cuda architectures compilation * Deformation plane added * Added missing resources * Updated particle movement update methods * Spawn on runtime deformation plane * Added cachemap lock when initializing a region * Added UHeightMapDataAsset to hold heightmap data * Fixing some settings Co-authored-by: Aaron <samaniegoaaron112@gmail.com> Co-authored-by: bernatx <bernatx@gmail.com>
2022-09-23 21:39:09 +08:00
USE_PYTORCH=false
USE_UNITY=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
USE_ROS2=false
2022-06-09 05:22:30 +08:00
EDITOR_FLAGS=""
2018-07-04 17:59:59 +08:00
2019-03-29 04:11:15 +08:00
GDB=
RHI="-vulkan"
2019-03-29 04:11:15 +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
OPTS=`getopt -o h --long help,build,rebuild,launch,clean,hard-clean,gdb,opengl,carsim,pytorch,chrono,ros2,no-unity,editor-flags: -n 'parse-options' -- "$@"`
2018-07-04 17:59:59 +08:00
eval set -- "$OPTS"
2020-10-01 22:35:12 +08:00
while [[ $# -gt 0 ]]; do
2018-07-04 17:59:59 +08:00
case "$1" in
2022-06-09 05:22:30 +08:00
--editor-flags )
EDITOR_FLAGS=$2
shift ;;
2019-03-29 04:11:15 +08:00
--gdb )
GDB="gdb --args";
shift ;;
2018-07-04 17:59:59 +08:00
--build )
BUILD_CARLAUE4=true;
shift ;;
--rebuild )
REMOVE_INTERMEDIATE=true;
BUILD_CARLAUE4=true;
shift ;;
--launch )
LAUNCH_UE4_EDITOR=true;
shift ;;
--clean )
REMOVE_INTERMEDIATE=true;
shift ;;
--hard-clean )
REMOVE_INTERMEDIATE=true;
HARD_CLEAN=true;
shift ;;
--opengl )
RHI="-opengl";
shift ;;
--carsim )
USE_CARSIM=true;
shift ;;
2021-01-28 19:53:40 +08:00
--chrono )
USE_CHRONO=true
shift ;;
Pytorch integration with terramechanics (#5684) * Added sparse map reprsentation * Added pytorch for terramechanics modules * Added saving loading particles in independent thread * Added blank space at the EOF * Added texture creation lambda * Moving function to component * Added input/output architecture for neural network * Filling heightmap with particles data. Adding Logging to debug * Updating Texture data at realtime * Connected 3 stages, using MPC Position to Update and Texture * Added square particle sampling. Added second model input/output scheme. Fixed start up crash. * Added new flags and fixes * Position to update not updating in material but yes in MPC * Fixed coordinate frame issues and crashes * Prepared to follow position in the 1st vehicle in map * Fixed height map alignment * Fixed large map and terrain tiles alignment * Fixed inputs for new model * Added scale factor * Fixed slow read write operations * Bug fixes * Removed debug output * Removed nvidia profinling marks * Preparing merge debug code removed, runtime working by rounding the loading data properly * Made pytorch optional module * Added TRACE_CPUPROFILER_EVENT_SCOPE to Update and UpdateTexture * Added optional pytorch conditions and macros * Removed static Path * Fixed #ifdef clause. Added missing include. * Deformation on vehicle working. Ready to start optimisation * First optimsation done. Heightmap per Tile * Updated tiles'heightmap to make their size relative to texture and tilesize * Fixed slow frames. Added functionality * Removed unecessary library links * Fixed pytorch link * Limited search to relevant tiles * Added multithreaded particle search. Fixed cuda architectures compilation * Deformation plane added * Added missing resources * Updated particle movement update methods * Spawn on runtime deformation plane * Added cachemap lock when initializing a region * Added UHeightMapDataAsset to hold heightmap data * Fixing some settings Co-authored-by: Aaron <samaniegoaaron112@gmail.com> Co-authored-by: bernatx <bernatx@gmail.com>
2022-09-23 21:39:09 +08:00
--pytorch )
USE_PYTORCH=true;
shift ;;
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
--ros2 )
USE_ROS2=true;
shift ;;
--no-unity )
USE_UNITY=false
shift ;;
2018-07-04 17:59:59 +08:00
-h | --help )
echo "$DOC_STRING"
echo "$USAGE_STRING"
exit 1
;;
* )
shift ;;
2018-07-04 17:59:59 +08:00
esac
done
# ==============================================================================
# -- Set up environment --------------------------------------------------------
# ==============================================================================
source $(dirname "$0")/Environment.sh
if [ ! -d "${UE4_ROOT}" ]; then
fatal_error "UE4_ROOT is not defined, or points to a non-existant directory, please set this environment variable."
else
log "Using Unreal Engine at '$UE4_ROOT'"
fi
2018-07-04 17:59:59 +08:00
if ! { ${REMOVE_INTERMEDIATE} || ${BUILD_CARLAUE4} || ${LAUNCH_UE4_EDITOR}; }; then
fatal_error "Nothing selected to be done."
fi
pushd "${CARLAUE4_ROOT_FOLDER}" >/dev/null
# ==============================================================================
# -- Clean CarlaUE4 ------------------------------------------------------------
# ==============================================================================
if ${HARD_CLEAN} ; then
if [ ! -f Makefile ]; then
fatal_error "The project wasn't built before!"
fi
log "Doing a \"hard\" clean of the Unreal Engine project."
make CarlaUE4Editor ARGS=-clean
fi
if ${REMOVE_INTERMEDIATE} ; then
2018-10-27 19:21:35 +08:00
log "Cleaning intermediate files and folders."
UE4_INTERMEDIATE_FOLDERS="Binaries Build Intermediate DerivedDataCache"
rm -Rf ${UE4_INTERMEDIATE_FOLDERS}
rm -f Makefile
2018-10-27 19:21:35 +08:00
pushd "${CARLAUE4_PLUGIN_ROOT_FOLDER}" >/dev/null
rm -Rf ${UE4_INTERMEDIATE_FOLDERS}
2024-05-13 22:17:26 +08:00
cd Plugins
rm -Rf HoudiniEngine
cd ..
2018-10-27 19:21:35 +08:00
popd >/dev/null
2018-07-04 17:59:59 +08:00
fi
# ==============================================================================
# -- Build CarlaUE4 ------------------------------------------------------------
# ==============================================================================
if ${BUILD_CARLAUE4} ; then
OPTIONAL_MODULES_TEXT=""
if ${USE_CARSIM} ; then
python ${PWD}/../../Util/BuildTools/enable_carsim_to_uproject.py -f="CarlaUE4.uproject" -e
OPTIONAL_MODULES_TEXT="CarSim ON"$'\n'"${OPTIONAL_MODULES_TEXT}"
else
python ${PWD}/../../Util/BuildTools/enable_carsim_to_uproject.py -f="CarlaUE4.uproject"
OPTIONAL_MODULES_TEXT="CarSim OFF"$'\n'"${OPTIONAL_MODULES_TEXT}"
2021-01-28 19:53:40 +08:00
fi
if ${USE_CHRONO} ; then
OPTIONAL_MODULES_TEXT="Chrono ON"$'\n'"${OPTIONAL_MODULES_TEXT}"
2021-01-28 19:53:40 +08:00
else
OPTIONAL_MODULES_TEXT="Chrono OFF"$'\n'"${OPTIONAL_MODULES_TEXT}"
fi
Pytorch integration with terramechanics (#5684) * Added sparse map reprsentation * Added pytorch for terramechanics modules * Added saving loading particles in independent thread * Added blank space at the EOF * Added texture creation lambda * Moving function to component * Added input/output architecture for neural network * Filling heightmap with particles data. Adding Logging to debug * Updating Texture data at realtime * Connected 3 stages, using MPC Position to Update and Texture * Added square particle sampling. Added second model input/output scheme. Fixed start up crash. * Added new flags and fixes * Position to update not updating in material but yes in MPC * Fixed coordinate frame issues and crashes * Prepared to follow position in the 1st vehicle in map * Fixed height map alignment * Fixed large map and terrain tiles alignment * Fixed inputs for new model * Added scale factor * Fixed slow read write operations * Bug fixes * Removed debug output * Removed nvidia profinling marks * Preparing merge debug code removed, runtime working by rounding the loading data properly * Made pytorch optional module * Added TRACE_CPUPROFILER_EVENT_SCOPE to Update and UpdateTexture * Added optional pytorch conditions and macros * Removed static Path * Fixed #ifdef clause. Added missing include. * Deformation on vehicle working. Ready to start optimisation * First optimsation done. Heightmap per Tile * Updated tiles'heightmap to make their size relative to texture and tilesize * Fixed slow frames. Added functionality * Removed unecessary library links * Fixed pytorch link * Limited search to relevant tiles * Added multithreaded particle search. Fixed cuda architectures compilation * Deformation plane added * Added missing resources * Updated particle movement update methods * Spawn on runtime deformation plane * Added cachemap lock when initializing a region * Added UHeightMapDataAsset to hold heightmap data * Fixing some settings Co-authored-by: Aaron <samaniegoaaron112@gmail.com> Co-authored-by: bernatx <bernatx@gmail.com>
2022-09-23 21:39:09 +08:00
if ${USE_PYTORCH} ; then
OPTIONAL_MODULES_TEXT="Pytorch ON"$'\n'"${OPTIONAL_MODULES_TEXT}"
else
OPTIONAL_MODULES_TEXT="Pytorch OFF"$'\n'"${OPTIONAL_MODULES_TEXT}"
fi
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} ; then
OPTIONAL_MODULES_TEXT="Ros2 ON"$'\n'"${OPTIONAL_MODULES_TEXT}"
else
OPTIONAL_MODULES_TEXT="Ros2 OFF"$'\n'"${OPTIONAL_MODULES_TEXT}"
fi
if ${USE_UNITY} ; then
OPTIONAL_MODULES_TEXT="Unity ON"$'\n'"${OPTIONAL_MODULES_TEXT}"
else
OPTIONAL_MODULES_TEXT="Unity OFF"$'\n'"${OPTIONAL_MODULES_TEXT}"
fi
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
OPTIONAL_MODULES_TEXT="Fast_dds ON"$'\n'"${OPTIONAL_MODULES_TEXT}"
echo ${OPTIONAL_MODULES_TEXT} > ${PWD}/Config/OptionalModules.ini
2018-07-04 17:59:59 +08:00
if [ ! -f Makefile ]; then
2020-12-04 23:24:36 +08:00
2018-07-04 17:59:59 +08:00
# This command fails sometimes but normally we can continue anyway.
set +e
log "Generate Unreal project files."
${UE4_ROOT}/GenerateProjectFiles.sh -project="${PWD}/CarlaUE4.uproject" -game -engine -makefiles
set -e
fi
log "Build CarlaUE4 project."
make CarlaUE4Editor
#Providing the user with the ExportedMaps folder
EXPORTED_MAPS="${CARLAUE4_ROOT_FOLDER}/Content/Carla/ExportedMaps"
mkdir -p "${EXPORTED_MAPS}"
2018-07-04 17:59:59 +08:00
fi
# ==============================================================================
# -- Launch UE4Editor ----------------------------------------------------------
# ==============================================================================
if ${LAUNCH_UE4_EDITOR} ; then
log "Launching UE4Editor..."
2022-06-09 05:22:30 +08:00
${GDB} ${UE4_ROOT}/Engine/Binaries/Linux/UE4Editor "${PWD}/CarlaUE4.uproject" ${RHI} ${EDITOR_FLAGS}
2018-07-04 17:59:59 +08:00
else
log "Success!"
fi
# ==============================================================================
# -- ...and we are done --------------------------------------------------------
# ==============================================================================
popd >/dev/null