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

Conversation

berndgassmann
Copy link
Contributor

@berndgassmann berndgassmann commented Jul 8, 2024

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
(https://github.com/CarlaUnreal/UnrealEngine/pull/23)

Move forward to g++-13

Minors:

  • Fix make clean call
  • Update osm2odr commit with build fix (Fix build with Unreal sysroot 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

Description

Fixes #

Where has this been tested?

tested build of:

  • make launch
  • make launch ARGS="--ros2"
  • make check
  • make PythonAPI
  • make PythonAPI.rss
  • make package ARGS="--ros2"

Additional tests: launched carla from installed package and verified basic ros2 is working:

  • Added ROS2=True to DefaultGame.ini
  • Started carla-server and ensured /clock is published
  • Started manual_control.py and ensured that some sensor data is sent out
    (Note: This last step only worked without "bind failed expection" after DdsDomainParticipant became a singleton in carla-server)
  • Python version(s): ... 3.10
  • Unreal Engine version(s): ... 4.26

Possible Drawbacks


This change is Reviewable

Blyron and others added 9 commits May 6, 2024 16:29
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 berndgassmann requested a review from a team as a code owner July 8, 2024 07:32
Blyron and others added 17 commits July 10, 2024 10:01
* added cpp client build docs (carla-simulator#7942)

* fixed IMU units (carla-simulator#7960)

* Update README.md with new TinyURL links (carla-simulator#7988)

* Added inverse transform (carla-simulator#7999)

Co-authored-by: glopezdiest <glopez@cvc.uab.cat>

* Aaron/fixwheelchair (carla-simulator#8001)

* Fix OSM2ODR build

* Updated fix wheelchair default value

* Docs/unit updates (carla-simulator#8007)

* fixed IMU units

* updated autitwheel version

* Add a `*.pyi` file for auto-completion & hints.

To enable auto-completion and hints in code editors such as VScode, create a `*.pyi` file. This feature is compatible with `python 3.9` and later versions.

* Fixes and missing Iterators

* Fixed Actor.parent

Can be None or an Actor

* Fixed missing return types

* Updated changelog

needs merge with dev version

* Added DSVEventArray iterator

* Added missing type for Labelled Point

* Fixed spelling misstakes

* Removed wrong unit indication

* Added missing -> World to load_world

* Added missing return value to reload_world

* FIX: __init__ methods do not return

* FIX: added ApplyTransform, fixed ApplyTorque

* Filled in missing information and types.

* ActorList.filter actually returns ActorList

* Fixed CityObjectLabels

* Disambiguated get_waypoint signature

Syntax fix (squased)

* Added undocumented variables

FutureActor
laod_world_if_different

* Corrected Sensor.is_listening

Was changed to a function in 0.9.15. More info see: carla-simulator#7439

* Added type hints for `values` attribute on enums

* Fix intendation shadowing methods

* Fix missing @Property

* Formatted some docstring to be shorter

* Added stubs for HUD drawing

Functions from carla-simulator#7168

* Corrected and more precise type-hints

- fixed carla.Waypoint.next_until_lane_end

* Improved get_waypoint disambiguation

correctly added two overload function

* Fix spelling mistakes

* Better usage of Enum if typing.Self is availiable

Using Self will not report an override / incompatible error.

* Fix: Enum values were tuples. Added Flag or Int to Enums

* Fixes for wrong stubs

- OpendriveGenerationParameter had no init
- missing @Property
- wrong signatures

* Added self parameter to property signatures

* Various fixes

- wrong signatures
- wrong names

* Added setters for VehicleControl

* Improved get_waypoints and Literal type hints

* Corrected [try_]spawn_actor keyword name

* Added Transform.inverse_transform and corrected signature

parameter is called in_point not in_vector

* Improved Callable and callbacks signature

* Corrections and additions

more setters
missing, wrong types corrected
spelling

* Fixed Vector arithmetic

* added digital twins video (carla-simulator#8090)

* navigation information is now loaded when changing maps

* Porting the changes done to UE5 to fix the recording leak to UE4

The slowdown is considerably more noticeable here since the engine runs much smoother. This makes evident that this is a stopgap measure, and should be looked into further down the line.

* Fixed typo in CityScapes palette (carla-simulator#8137)

* Correcting makefile typo to avoid override warning for target "downloadplugins" (carla-simulator#8167)

The downloadplugins target is already defined below (line 162).

---------

Co-authored-by: MattRoweEAIF <125647690+MattRoweEAIF@users.noreply.github.com>
Co-authored-by: glopezdiest <58212725+glopezdiest@users.noreply.github.com>
Co-authored-by: glopezdiest <glopez@cvc.uab.cat>
Co-authored-by: Minokori <73998474+Minokori@users.noreply.github.com>
Co-authored-by: Daniel <github.blurry@9ox.net>
Co-authored-by: AreopagX <49414432+AreopagX@users.noreply.github.com>
Co-authored-by: Jorge Virgos <jorgevirgos.dev@gmail.com>
Co-authored-by: Sergio Paniego Blanco <sergiopaniegoblanco@gmail.com>
Co-authored-by: Ylmdrin <150919430+Ylmdrin@users.noreply.github.com>
The g_test.bat was checking against a string instead of the Variable
leading to a error when gtest was already installed and the bat was run
* added Unreal Engine lhcs diagram

* changed to <img> tag
* added Unreal Engine lhcs diagram

* changed to <img> tag

* replaced with github link
* added cpp client build docs (carla-simulator#7942)

* fixed IMU units (carla-simulator#7960)

* Update README.md with new TinyURL links (carla-simulator#7988)

* Added inverse transform (carla-simulator#7999)

Co-authored-by: glopezdiest <glopez@cvc.uab.cat>

* Aaron/fixwheelchair (carla-simulator#8001)

* Fix OSM2ODR build

* Updated fix wheelchair default value

* Docs/unit updates (carla-simulator#8007)

* fixed IMU units

* updated autitwheel version

* Add a `*.pyi` file for auto-completion & hints.

To enable auto-completion and hints in code editors such as VScode, create a `*.pyi` file. This feature is compatible with `python 3.9` and later versions.

* Fixes and missing Iterators

* Fixed Actor.parent

Can be None or an Actor

* Fixed missing return types

* Updated changelog

needs merge with dev version

* Added DSVEventArray iterator

* Added missing type for Labelled Point

* Fixed spelling misstakes

* Removed wrong unit indication

* Added missing -> World to load_world

* Added missing return value to reload_world

* FIX: __init__ methods do not return

* FIX: added ApplyTransform, fixed ApplyTorque

* Filled in missing information and types.

* ActorList.filter actually returns ActorList

* Fixed CityObjectLabels

* Disambiguated get_waypoint signature

Syntax fix (squased)

* Added undocumented variables

FutureActor
laod_world_if_different

* Corrected Sensor.is_listening

Was changed to a function in 0.9.15. More info see: carla-simulator#7439

* Added type hints for `values` attribute on enums

* Fix intendation shadowing methods

* Fix missing @Property

* Formatted some docstring to be shorter

* Added stubs for HUD drawing

Functions from carla-simulator#7168

* Corrected and more precise type-hints

- fixed carla.Waypoint.next_until_lane_end

* Improved get_waypoint disambiguation

correctly added two overload function

* Fix spelling mistakes

* Better usage of Enum if typing.Self is availiable

Using Self will not report an override / incompatible error.

* Fix: Enum values were tuples. Added Flag or Int to Enums

* Fixes for wrong stubs

- OpendriveGenerationParameter had no init
- missing @Property
- wrong signatures

* Added self parameter to property signatures

* Various fixes

- wrong signatures
- wrong names

* Added setters for VehicleControl

* Improved get_waypoints and Literal type hints

* Corrected [try_]spawn_actor keyword name

* Added Transform.inverse_transform and corrected signature

parameter is called in_point not in_vector

* Improved Callable and callbacks signature

* Corrections and additions

more setters
missing, wrong types corrected
spelling

* Fixed Vector arithmetic

* added digital twins video (carla-simulator#8090)

* Typing for GlobalRoutePlanner

* 0.9.13+ modernisation of code

* made function static

* Updated changelog

* fixed spelling mistakes

* No unnecessary inheritance from object and empty class brackets & other

Removed empty variables and whitespaces
formatting

* navigation information is now loaded when changing maps

* Porting the changes done to UE5 to fix the recording leak to UE4

The slowdown is considerably more noticeable here since the engine runs much smoother. This makes evident that this is a stopgap measure, and should be looked into further down the line.

* Fixed typo in CityScapes palette (carla-simulator#8137)

* Correcting makefile typo to avoid override warning for target "downloadplugins" (carla-simulator#8167)

The downloadplugins target is already defined below (line 162).

* fix typo in title (carla-simulator#8225)

* added unreal coord system, fixed v2x (carla-simulator#8251)

---------

Co-authored-by: MattRoweEAIF <125647690+MattRoweEAIF@users.noreply.github.com>
Co-authored-by: Blyron <samaniegoaaron112@gmail.com>
Co-authored-by: glopezdiest <58212725+glopezdiest@users.noreply.github.com>
Co-authored-by: glopezdiest <glopez@cvc.uab.cat>
Co-authored-by: Blyron <53337103+Blyron@users.noreply.github.com>
Co-authored-by: Minokori <73998474+Minokori@users.noreply.github.com>
Co-authored-by: AreopagX <49414432+AreopagX@users.noreply.github.com>
Co-authored-by: Jorge Virgos <jorgevirgos.dev@gmail.com>
Co-authored-by: Sergio Paniego Blanco <sergiopaniegoblanco@gmail.com>
Co-authored-by: Ylmdrin <150919430+Ylmdrin@users.noreply.github.com>
* added cpp client build docs (carla-simulator#7942)

* fixed IMU units (carla-simulator#7960)

* Update README.md with new TinyURL links (carla-simulator#7988)

* Added inverse transform (carla-simulator#7999)

Co-authored-by: glopezdiest <glopez@cvc.uab.cat>

* Aaron/fixwheelchair (carla-simulator#8001)

* Fix OSM2ODR build

* Updated fix wheelchair default value

* Docs/unit updates (carla-simulator#8007)

* fixed IMU units

* updated autitwheel version

* Add a `*.pyi` file for auto-completion & hints.

To enable auto-completion and hints in code editors such as VScode, create a `*.pyi` file. This feature is compatible with `python 3.9` and later versions.

* Fixes and missing Iterators

* Fixed Actor.parent

Can be None or an Actor

* Fixed missing return types

* Updated changelog

needs merge with dev version

* Added DSVEventArray iterator

* Added missing type for Labelled Point

* Fixed spelling misstakes

* Removed wrong unit indication

* Added missing -> World to load_world

* Added missing return value to reload_world

* FIX: __init__ methods do not return

* FIX: added ApplyTransform, fixed ApplyTorque

* Filled in missing information and types.

* ActorList.filter actually returns ActorList

* Fixed CityObjectLabels

* Disambiguated get_waypoint signature

Syntax fix (squased)

* Added undocumented variables

FutureActor
laod_world_if_different

* Corrected Sensor.is_listening

Was changed to a function in 0.9.15. More info see: carla-simulator#7439

* Added type hints for `values` attribute on enums

* Fix intendation shadowing methods

* Fix missing @Property

* Formatted some docstring to be shorter

* Added stubs for HUD drawing

Functions from carla-simulator#7168

* Corrected and more precise type-hints

- fixed carla.Waypoint.next_until_lane_end

* Improved get_waypoint disambiguation

correctly added two overload function

* Fix spelling mistakes

* Better usage of Enum if typing.Self is availiable

Using Self will not report an override / incompatible error.

* Fix: Enum values were tuples. Added Flag or Int to Enums

* Fixes for wrong stubs

- OpendriveGenerationParameter had no init
- missing @Property
- wrong signatures

* Added self parameter to property signatures

* Various fixes

- wrong signatures
- wrong names

* Added setters for VehicleControl

* Improved get_waypoints and Literal type hints

* Corrected [try_]spawn_actor keyword name

* Added Transform.inverse_transform and corrected signature

parameter is called in_point not in_vector

* Improved Callable and callbacks signature

* Corrections and additions

more setters
missing, wrong types corrected
spelling

* Fixed Vector arithmetic

* added digital twins video (carla-simulator#8090)

* use actor ids for instance segmentation

* synchronize bboxes between server and client

* add actor_id attribute to bounding boxes

* navigation information is now loaded when changing maps

* Porting the changes done to UE5 to fix the recording leak to UE4

The slowdown is considerably more noticeable here since the engine runs much smoother. This makes evident that this is a stopgap measure, and should be looked into further down the line.

* Fixed typo in CityScapes palette (carla-simulator#8137)

* Correcting makefile typo to avoid override warning for target "downloadplugins" (carla-simulator#8167)

The downloadplugins target is already defined below (line 162).

* fix typo in title (carla-simulator#8225)

* added unreal coord system, fixed v2x (carla-simulator#8251)

---------


Co-authored-by: Minokori <73998474+Minokori@users.noreply.github.com>
Co-authored-by: Daniel <github.blurry@9ox.net>
Co-authored-by: Sergio Paniego Blanco <sergiopaniegoblanco@gmail.com>
Co-authored-by: Ylmdrin <150919430+Ylmdrin@users.noreply.github.com>
…te directions (carla-simulator#7137)

* Update semantic labels (changed from version 0.9.13 -> 0.9.14)

* Add "Other" Label description in ref_sensors.md

* Revert "Add "Other" Label description in ref_sensors.md"

This reverts commit 3958e35.

* Revert "Update semantic labels (changed from version 0.9.13 -> 0.9.14)"

This reverts commit 6ee572e.

* Fix waypoints next and previous when connecting two lines with opposite
dirrections.

Fixing issue carla-simulator#7136

Probably not the best solution, but works for our case. The waypoint
that would cause conflict when calling next from it is not returned.

* Update CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: Michal Sojka <michal.sojka@cvut.cz>

---------

Co-authored-by: Gerhard Dorn <67096719+dorn-gerhard@users.noreply.github.com>
Co-authored-by: Michal Sojka <michal.sojka@cvut.cz>
* Update build_linux_ue5.md

* Update build_windows_ue5.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.