Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup and harmonize Carla build #7919

Open
wants to merge 43 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
5be0e2f
Fix OSM2ODR build
Blyron May 6, 2024
649e2aa
Merge branch 'dev' of https://github.com/carla-simulator/carla into dev
Blyron May 13, 2024
d854ab5
Merge branch 'dev' of https://github.com/carla-simulator/carla into dev
Blyron May 14, 2024
2a50799
Merge branch 'dev' of https://github.com/carla-simulator/carla into dev
Blyron May 15, 2024
b86b199
Merge branch 'dev' of https://github.com/carla-simulator/carla into dev
Blyron May 21, 2024
5043ad7
Merge branch 'dev' of https://github.com/carla-simulator/carla into dev
Blyron May 28, 2024
1796390
Merge branch 'dev' of https://github.com/carla-simulator/carla into dev
Blyron May 30, 2024
7c47e7d
Merge branch 'dev' of https://github.com/carla-simulator/carla into dev
Blyron Jul 8, 2024
634e418
Cleanup and harmonize Carla build
berndgassmann Jul 7, 2024
edcbae1
removed debug logs
berndgassmann Jul 8, 2024
fa5b123
Merge remote-tracking branch 'carla/dev' into berndgassmann/rework_ro…
berndgassmann Jul 8, 2024
c83c045
Merge branch 'dev' of https://github.com/carla-simulator/carla into dev
Blyron Jul 10, 2024
b013f17
updated readme with advisories
MattRoweEAIF Jul 10, 2024
83068cb
Merge branch 'dev' into berndgassmann/rework_ros2_step_1_harmonize_build
berndgassmann Aug 27, 2024
43441c7
Dev (#8185)
Blyron Sep 25, 2024
21f3e40
Update pull_request_template.md (#8187)
Blyron Sep 25, 2024
d6f23ed
Update Jenkinsfile (#8188)
Blyron Sep 27, 2024
0ce3559
update ue4 docs (#8253)
MattRoweEAIF Oct 7, 2024
1c55966
Updated install_gtest.bat
Setnr Oct 8, 2024
6df1c1e
added Unreal Engine lhcs diagram (#8280)
MattRoweEAIF Oct 15, 2024
f91eab2
Docs/lh coord system diagram (#8281)
MattRoweEAIF Oct 15, 2024
715c217
Docs/lh coord system diagram (#8282)
MattRoweEAIF Oct 15, 2024
9a59963
Typing and modernisation of Agent code (#8072)
Daraan Oct 18, 2024
b60034b
Include invertedai script (#8322)
PabloVD Oct 28, 2024
e8947a4
Instance segmentation (#8334)
AreopagX Nov 5, 2024
e41ffa0
Fix waypoints next and previous when connecting two lines with opposi…
matejm42 Nov 7, 2024
bed15c4
Update UE5 build setup script name (#8377)
MattRoweEAIF Nov 15, 2024
bc3b18d
Update build_linux_ue5.md to 5.5
MattRoweEAIF Nov 19, 2024
21dfe70
Update build_windows_ue5.md
MattRoweEAIF Nov 19, 2024
e9b2d16
Update build_carla.md from UE 5.3 to UE 5.5
MattRoweEAIF Nov 19, 2024
30ce294
Update stale bot configuration (#8388)
Blyron Nov 21, 2024
c568719
Remove py dependency. (#8379)
donghaiwang Nov 22, 2024
3935f73
removed UE5 build docs (#8417)
MattRoweEAIF Nov 27, 2024
6ffe564
Update typo in example code in core_actors.md (#8424)
karimkohel Nov 29, 2024
baabfae
Introducing CARLA Simulator Guru on Gurubase.io (#8398)
kursataktas Nov 29, 2024
238f84a
Remove RSS documentation from UE4 CARLA (#8418)
MattRoweEAIF Dec 2, 2024
a1399c6
Fix mistake in bounding box documentation. (#8457)
dominikmaeckel Dec 10, 2024
0bbe650
Change order of spawn points getter
PabloVD Dec 10, 2024
92856c8
Fix typo
nongfugengxia Dec 13, 2024
64bec80
Fix typo (#8478)
donghaiwang Dec 17, 2024
685281a
added note about UE5 documentation (#8498)
MattRoweEAIF Dec 19, 2024
8f7e40f
Fix zOffset typo.
MarcelPiNacy-CVC Jan 3, 2025
66924ac
Merge remote-tracking branch 'origin/ue4-dev' into berndgassmann/rewo…
berndgassmann Jan 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cleanup and harmonize Carla build
Ensure that actually only the unreal sysroot is deployed for all C as
well C++ compilations including dependencies. That ensures the server is
NOT anymore linked against the system glibc (which is in Ubuntu22.04
incompatible with the Unreal one). As a consequence no local clang
installation required anymore to build under Linux.

Harmonized naming split into client/server (instead of libcpp and
libstdcpp) to ensure nothing mixed up (and there were things mixed up
before!)

Refactor C# Unreal build using CarlaRules base class to provide common
functionality. Fixing windows build without ROS2 and added intitial
windows build with ROS2

Restrict to one DDS-Domain-Participant for carla-server (Fixes bind
address already in use exception on with ROS2).

Due to continued segfaults in reallocations of MallocBinned2 in
conjunction with ROS2 enforce using AnsiMalloc calls under Linux (see
https://forums.unrealengine.com/t/dealing-with-allocator-mismatches-with-external-libraries/1416830)

Use C++20 to allow for more robust struct initialization (see
https://en.cppreference.com/w/cpp/language/aggregate_initialization),
added Eigen C++20 patches and required CARLA changes to cope with C++20
compilation errors
Be aware: This change requires the Unreal PR
(CarlaUnreal/UnrealEngine#23)

Move forward to g++-13

Minors:
- Fix make clean call
- Update osm2odr commit with build fix
(carla-simulator/sumo#6)
- Update ad-rss to 4.4.5 (supports boost 1.80)
- Fix windows install scripts and forward arguments for building
libcarla
- Adapt codeformat.py to python3 using clang-format-14
berndgassmann committed Jul 8, 2024
commit 634e41877701ab4ac365ea4304d1767f67cce6c8
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -12,13 +12,11 @@
* Fixed bug in python agents when vehicle list was empty causing a check on all vehicles (BasicAgent.py) and detected pedestrians as vehicles if no pedestrains are present (BehaviourAgent.py)
* Extended debug drawing functions to allow drawing primitives on HUD layer
* Added possibility to change gravity variable in imui sensor for the accelerometer
* Fixed ROS2 native extension build error when ROS2 is installed in the system.
* ROS2Native: Force fast-dds dependencies download to avoid build crash when boost_asio and tinyxml2 are not installed in Linux.
* Added API function `get_telemetry_data` to the vehicle actor.
* PythonAPI `Sensor.is_listening` was defined twice (property and method), cleaned and clarified it as a method.
* Added V2X sensors for cooperative awareness message and custom user-defined messages to support vehicle-to-vehicle communication
* Added named tuples for BasicAgent.py's detection result to allow for type-hints and better semantics.

* Cleaned up the client/server build and respective naming

## CARLA 0.9.15

38 changes: 11 additions & 27 deletions Docs/build_linux.md
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ CARLA requires many different kinds of software to run. Some are built during th
sudo apt-get update &&
sudo apt-get install wget software-properties-common &&
sudo add-apt-repository ppa:ubuntu-toolchain-r/test &&
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add
sudo apt-get update
```

!!! Warning
@@ -50,53 +50,37 @@ To avoid compatibility issues between Unreal Engine and the CARLA dependencies,

__Ubuntu 22.04__.
```sh
sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu focal main universe"
sudo apt-get update
sudo apt-get install build-essential clang-10 lld-10 g++-7 cmake ninja-build libvulkan1 python python3 python3-dev python3-pip libpng-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git git-lfs
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-10/bin/clang++ 180 &&
sudo update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-10/bin/clang 180 &&
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 180
sudo apt-get install build-essential g++-13 cmake ninja-build libvulkan1 python3 python3-dev python3-pip libpng-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git git-lfs
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 180
```

__Ubuntu 20.04__.
```sh
sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal main"
sudo apt-get update
sudo apt-get install build-essential clang-10 lld-10 g++-7 cmake ninja-build libvulkan1 python python-dev python3-dev python3-pip libpng-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-10/bin/clang++ 180 &&
sudo update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-10/bin/clang 180
sudo apt-get install build-essential g++-13 cmake ninja-build libvulkan1 python python-dev python3-dev python3-pip libpng-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 180
```

__Ubuntu 18.04__.

```sh
sudo apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main"
sudo apt-get update
sudo apt-get install build-essential clang-8 lld-8 g++-7 cmake ninja-build libvulkan1 python python-pip python-dev python3-dev python3-pip libpng-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-8/bin/clang++ 180 &&
sudo update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-8/bin/clang 180
sudo apt-get install build-essential g++-13 cmake ninja-build libvulkan1 python python-pip python-dev python3-dev python3-pip libpng-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 180
```

__Ubuntu 16.04__.

```sh
sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main" &&
sudo apt-get update
sudo apt-get install build-essential clang-8 lld-8 g++-7 cmake ninja-build libvulkan1 python python-pip python-dev python3-dev python3-pip libpng16-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-8/bin/clang++ 180 &&
sudo update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-8/bin/clang 180
sudo apt-get install build-essential g++-13 cmake ninja-build libvulkan1 python python-pip python-dev python3-dev python3-pip libpng16-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 180
```

__Previous Ubuntu versions__.

We strongly advise using Ubuntu 18.04 or later to build CARLA. However, you may attempt to build CARLA on older versions of Ubuntu with the following commands:

```sh
sudo apt-add-repository "deb http://apt.llvm.org/<code_name>/ llvm-toolchain-<code_name>-8 main" &&
sudo apt-get update
sudo apt-get install build-essential clang-8 lld-8 g++-7 cmake ninja-build libvulkan1 python python-pip python-dev python3-dev python3-pip libpng16-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-8/bin/clang++ 180 &&
sudo update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-8/bin/clang 180
sudo apt-get install build-essential g++-13 cmake ninja-build libvulkan1 python python-pip python-dev python3-dev python3-pip libpng16-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 180
```

__All Ubuntu systems__.
4 changes: 2 additions & 2 deletions Examples/CppClient/Makefile
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@ BINDIR=$(CURDIR)/bin
INSTALLDIR=$(CURDIR)/libcarla-install
TOOLCHAIN=$(CURDIR)/ToolChain.cmake

CC=/usr/bin/gcc-7
CXX=/usr/bin/g++-7
CC=/usr/bin/gcc-13
CXX=/usr/bin/g++-13
CXXFLAGS=-std=c++14 -pthread -fPIC -O3 -DNDEBUG -Werror -Wall -Wextra

define log
8 changes: 4 additions & 4 deletions LibCarla/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -4,10 +4,12 @@ project(libcarla)
option(LIBCARLA_BUILD_DEBUG "Build debug configuration" ON)
option(LIBCARLA_BUILD_RELEASE "Build release configuration" ON)
option(LIBCARLA_BUILD_TEST "Build unit tests" ON)
option(LIBCARLA_USE_ROS "Build ROS variant" OFF)

message(STATUS "Build debug: ${LIBCARLA_BUILD_DEBUG}")
message(STATUS "Build release: ${LIBCARLA_BUILD_RELEASE}")
message(STATUS "Build test: ${LIBCARLA_BUILD_TEST}")
message(STATUS "Enable ROS: ${LIBCARLA_USE_ROS}")

set(libcarla_source_path "${PROJECT_SOURCE_DIR}/../source")
set(libcarla_source_thirdparty_path "${libcarla_source_path}/third-party")
@@ -24,14 +26,12 @@ if (CMAKE_BUILD_TYPE STREQUAL "Client")
elseif (CMAKE_BUILD_TYPE STREQUAL "Server")
add_subdirectory("server")
elseif (CMAKE_BUILD_TYPE STREQUAL "Pytorch")
add_subdirectory("pytorch")
elseif (CMAKE_BUILD_TYPE STREQUAL "ros2")
add_subdirectory("fast_dds")
add_subdirectory("pytorch")
else ()
message(FATAL_ERROR "Unknown build type '${CMAKE_BUILD_TYPE}'")
endif ()

# GTest is not compiled on Windows.
if ((LIBCARLA_BUILD_TEST) AND (NOT WIN32) AND (NOT (CMAKE_BUILD_TYPE STREQUAL "Pytorch")) AND (NOT (CMAKE_BUILD_TYPE STREQUAL "ros2")))
if ((LIBCARLA_BUILD_TEST) AND (NOT WIN32) AND (NOT (CMAKE_BUILD_TYPE STREQUAL "Pytorch")))
add_subdirectory("test")
endif()
19 changes: 12 additions & 7 deletions LibCarla/cmake/client/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -21,8 +21,8 @@ if (BUILD_RSS_VARIANT)
install(FILES ${spdlog_file} DESTINATION lib)
list(APPEND ADRSS_LIBS ${spdlog_file})

set(proj_include_dir ${ADRSS_INSTALL_DIR}/../../proj-install/include)
set(proj_lib ${ADRSS_INSTALL_DIR}/../../proj-install/lib/libproj.a)
set(proj_include_dir ${PROJ_INCLUDE_PATH})
set(proj_lib ${PROJ_LIBPATH}/libproj.a)
install(DIRECTORY ${proj_include_dir} DESTINATION include/system)
list(APPEND ADRSS_INCLUDE_DIRS ${proj_include_dir})
install(FILES ${proj_lib} DESTINATION lib)
@@ -98,6 +98,12 @@ file(GLOB libcarla_carla_sources
set(libcarla_sources "${libcarla_sources};${libcarla_carla_sources}")
install(FILES ${libcarla_carla_sources} DESTINATION include/carla)

file(GLOB libcarla_carla_actors_sources
"${libcarla_source_path}/carla/actors/*.cpp"
"${libcarla_source_path}/carla/actors/*.h")
set(libcarla_sources "${libcarla_sources};${libcarla_carla_actors_sources}")
install(FILES ${libcarla_carla_actors_sources} DESTINATION include/carla/actors)

file(GLOB libcarla_carla_client_sources
"${libcarla_source_path}/carla/client/*.cpp"
"${libcarla_source_path}/carla/client/*.h")
@@ -266,11 +272,10 @@ file(GLOB libcarla_carla_trafficmanager_sources
set(libcarla_sources "${libcarla_sources};${libcarla_carla_trafficmanager_sources}")
install(FILES ${libcarla_carla_trafficmanager_sources} DESTINATION include/carla/trafficmanager)

file(GLOB libcarla_carla_ros2_sources
"${libcarla_source_path}/carla/ros2/*.cpp"
"${libcarla_source_path}/carla/ros2/*.h")
set(libcarla_sources "${libcarla_sources};${libcarla_carla_ros2_sources}")
install(FILES ${libcarla_carla_ros2_sources} DESTINATION include/carla/ros2)
file(GLOB libcarla_carla_ros2_public_headers
"${libcarla_source_path}/carla/ros2/*.h"
)
install(FILES ${libcarla_carla_ros2_public_headers} DESTINATION include/carla/ros2)

# ==============================================================================
# Create targets for debug and release in the same build type.
56 changes: 0 additions & 56 deletions LibCarla/cmake/fast_dds/CMakeLists.txt

This file was deleted.

Loading