From 74d19eece21b10163a96a1ef83522c44a18ca0f4 Mon Sep 17 00:00:00 2001 From: Marcel Pi <25649656+MarcelPiNacy@users.noreply.github.com> Date: Mon, 26 Feb 2024 17:09:02 +0100 Subject: [PATCH] Restructure PythonAPI folder layout + update copyright. --- CMake/CarlaDependencies.cmake | 37 ++- CMake/CarlaOptions.cmake | 2 +- CMakeLists.txt | 2 +- LibCarla/CMakeLists.txt | 2 +- LibCarla/source/carla/FileSystem.cpp | 11 +- LibCarla/source/carla/image/ImageIOConfig.h | 6 +- .../third-party/odrSpiral/odrSpiral.cpp | 3 - PythonAPI/CMakeLists.txt | 85 +++++-- .../{source/libcarla => include}/PythonAPI.h | 48 ++-- PythonAPI/carla/scene_layout.py | 2 +- PythonAPI/carla/setup-old.py | 2 +- PythonAPI/carla/source/carla/__init__.py | 8 - PythonAPI/carla/source/carla/command.py | 8 - .../carla/{source/libcarla => src}/Actor.cpp | 2 +- .../carla/{source/libcarla => src}/AdRss.cpp | 0 .../{source/libcarla => src}/Blueprint.cpp | 2 +- .../carla/{source/libcarla => src}/Client.cpp | 2 +- .../{source/libcarla => src}/Commands.cpp | 2 +- .../{source/libcarla => src}/Control.cpp | 2 +- .../{source/libcarla => src}/Exception.cpp | 2 +- .../libcarla/Geom.cpp => src/Geometry.cpp} | 2 +- .../{source/libcarla => src}/LightManager.cpp | 2 +- .../carla/{source/libcarla => src}/Map.cpp | 2 +- .../{source/libcarla => src}/OSM2ODR.cpp | 8 +- .../{source/libcarla => src}/PythonAPI.cpp | 2 +- .../carla/{source/libcarla => src}/Sensor.cpp | 2 +- .../{source/libcarla => src}/SensorData.cpp | 30 ++- .../{source/libcarla => src}/Snapshot.cpp | 2 +- .../libcarla => src}/TrafficManager.cpp | 4 +- .../{source/libcarla => src}/Weather.cpp | 2 +- .../carla/{source/libcarla => src}/World.cpp | 10 +- PythonAPI/carla/{ => src}/agents/__init__.py | 0 .../{ => src}/agents/navigation/__init__.py | 0 .../agents/navigation/basic_agent.py | 0 .../agents/navigation/behavior_agent.py | 0 .../agents/navigation/behavior_types.py | 0 .../navigation/constant_velocity_agent.py | 0 .../{ => src}/agents/navigation/controller.py | 0 .../agents/navigation/global_route_planner.py | 0 .../agents/navigation/local_planner.py | 0 .../carla/{ => src}/agents/tools/__init__.py | 0 .../carla/{ => src}/agents/tools/misc.py | 0 PythonAPI/examples/automatic_control.py | 8 +- PythonAPI/examples/no_rendering_mode.py | 2 +- PythonAPI/examples/rss/manual_control_rss.py | 2 +- .../examples/show_recorder_actors_blocked.py | 2 +- .../examples/show_recorder_collisions.py | 2 +- PythonAPI/examples/show_recorder_file_info.py | 2 +- PythonAPI/examples/start_recording.py | 2 +- PythonAPI/examples/start_replaying.py | 2 +- PythonAPI/examples/synchronous_mode.py | 2 +- PythonAPI/examples/tutorial.py | 2 +- PythonAPI/examples/tutorial_gbuffer.py | 2 +- PythonAPI/examples/vehicle_gallery.py | 2 +- PythonAPI/test/smoke/__init__.py | 2 +- PythonAPI/test/smoke/test_props_loading.py | 2 +- .../test/smoke/test_sensor_determinism.py | 2 +- PythonAPI/test/smoke/test_snapshot.py | 2 +- PythonAPI/test/smoke/test_streamming.py | 2 +- PythonAPI/test/smoke/test_sync.py | 2 +- PythonAPI/test/smoke/test_world.py | 2 +- PythonAPI/util/config.py | 2 +- PythonAPI/util/lane_explorer.py | 2 +- PythonAPI/util/test_connection.py | 2 +- Unreal/CarlaUE4/CarlaUE4.uproject | 4 +- .../Carla/Source/Carla/Sensor/PixelReader.cpp | 2 +- .../Carla/Source/Carla/Sensor/PixelReader.h | 238 +++++++++--------- Util/BuildTools/Import.py | 2 +- Util/Docker/docker_tools.py | 2 +- Util/Docker/docker_utils.py | 2 +- Util/DockerUtils/dist/get_xodr_crosswalks.py | 2 +- 71 files changed, 321 insertions(+), 275 deletions(-) rename PythonAPI/carla/{source/libcarla => include}/PythonAPI.h (94%) delete mode 100644 PythonAPI/carla/source/carla/__init__.py delete mode 100644 PythonAPI/carla/source/carla/command.py rename PythonAPI/carla/{source/libcarla => src}/Actor.cpp (99%) rename PythonAPI/carla/{source/libcarla => src}/AdRss.cpp (100%) rename PythonAPI/carla/{source/libcarla => src}/Blueprint.cpp (99%) rename PythonAPI/carla/{source/libcarla => src}/Client.cpp (99%) rename PythonAPI/carla/{source/libcarla => src}/Commands.cpp (99%) rename PythonAPI/carla/{source/libcarla => src}/Control.cpp (99%) rename PythonAPI/carla/{source/libcarla => src}/Exception.cpp (96%) rename PythonAPI/carla/{source/libcarla/Geom.cpp => src/Geometry.cpp} (99%) rename PythonAPI/carla/{source/libcarla => src}/LightManager.cpp (99%) rename PythonAPI/carla/{source/libcarla => src}/Map.cpp (99%) rename PythonAPI/carla/{source/libcarla => src}/OSM2ODR.cpp (93%) rename PythonAPI/carla/{source/libcarla => src}/PythonAPI.cpp (98%) rename PythonAPI/carla/{source/libcarla => src}/Sensor.cpp (98%) rename PythonAPI/carla/{source/libcarla => src}/SensorData.cpp (98%) rename PythonAPI/carla/{source/libcarla => src}/Snapshot.cpp (99%) rename PythonAPI/carla/{source/libcarla => src}/TrafficManager.cpp (98%) rename PythonAPI/carla/{source/libcarla => src}/Weather.cpp (99%) rename PythonAPI/carla/{source/libcarla => src}/World.cpp (97%) rename PythonAPI/carla/{ => src}/agents/__init__.py (100%) rename PythonAPI/carla/{ => src}/agents/navigation/__init__.py (100%) rename PythonAPI/carla/{ => src}/agents/navigation/basic_agent.py (100%) rename PythonAPI/carla/{ => src}/agents/navigation/behavior_agent.py (100%) rename PythonAPI/carla/{ => src}/agents/navigation/behavior_types.py (100%) rename PythonAPI/carla/{ => src}/agents/navigation/constant_velocity_agent.py (100%) rename PythonAPI/carla/{ => src}/agents/navigation/controller.py (100%) rename PythonAPI/carla/{ => src}/agents/navigation/global_route_planner.py (100%) rename PythonAPI/carla/{ => src}/agents/navigation/local_planner.py (100%) rename PythonAPI/carla/{ => src}/agents/tools/__init__.py (100%) rename PythonAPI/carla/{ => src}/agents/tools/misc.py (100%) diff --git a/CMake/CarlaDependencies.cmake b/CMake/CarlaDependencies.cmake index fd6304ede..a42779cd9 100644 --- a/CMake/CarlaDependencies.cmake +++ b/CMake/CarlaDependencies.cmake @@ -68,7 +68,12 @@ set (PNG_SHARED OFF) set (PNG_TOOLS OFF) set (PNG_BUILD_ZLIB ON) set (ZLIB_INCLUDE_DIR ${zlib_SOURCE_DIR}) -set (ZLIB_LIBRARY ${zlib_BINARY_DIR}/zlib.lib) +if (WIN32) + set (ZLIB_LIBRARY ${zlib_BINARY_DIR}/zlibstatic.lib) +else () + set (ZLIB_LIBRARY ${zlib_BINARY_DIR}/libz.a) +endif () + carla_dependency_add ( libpng https://github.com/glennrp/libpng.git @@ -89,6 +94,9 @@ carla_dependency_add ( ${CARLA_BOOST_TAG} ) +set (EIGEN_BUILD_PKGCONFIG OFF) +set (BUILD_TESTING OFF) +set (EIGEN_BUILD_DOC OFF) carla_dependency_add ( eigen https://gitlab.com/libeigen/eigen.git @@ -107,17 +115,24 @@ carla_dependency_add ( ${CARLA_RECAST_TAG} ) -# carla_dependency_add ( -# proj -# https://github.com/OSGeo/PROJ.git -# ${CARLA_PROJ_TAG} -# ) +if (ENABLE_OSM2ODR) + set (BUILD_TESTING OFF) + set (ENABLE_TIFF OFF) + set (ENABLE_CURL OFF) + carla_dependency_add ( + proj + https://github.com/OSGeo/PROJ.git + ${CARLA_PROJ_TAG} + ) +endif () -carla_dependency_add ( - xercesc - https://github.com/apache/xerces-c.git - ${CARLA_XERCESC_TAG} -) +if (ENABLE_OSM2ODR) + carla_dependency_add ( + xercesc + https://github.com/apache/xerces-c.git + ${CARLA_XERCESC_TAG} + ) +endif () if (BUILD_OSM_WORLD_RENDERER) carla_dependency_add ( diff --git a/CMake/CarlaOptions.cmake b/CMake/CarlaOptions.cmake index ea4573a8a..5edf2a228 100644 --- a/CMake/CarlaOptions.cmake +++ b/CMake/CarlaOptions.cmake @@ -40,7 +40,7 @@ option ( option ( ENABLE_OSM2ODR "Enable OSM2ODR." - ON + OFF ) option ( diff --git a/CMakeLists.txt b/CMakeLists.txt index b5ac3ebb5..bc40b7735 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,10 +41,10 @@ set ( include (CheckCCompilerFlag) include (CheckCXXCompilerFlag) -include (FetchContent) include (${CARLA_WORKSPACE_PATH}/CMake/CarlaOptions.cmake) macro (carla_two_step_configure_file DESTINATION SOURCE) + message ("Configuring file \"${DESTINATION}\"") # Configure-time step; evaluate variables: configure_file (${SOURCE} ${DESTINATION}) # Generate-time step; evaluate generator expressions: diff --git a/LibCarla/CMakeLists.txt b/LibCarla/CMakeLists.txt index d07c1aaf4..79fd20f71 100644 --- a/LibCarla/CMakeLists.txt +++ b/LibCarla/CMakeLists.txt @@ -121,7 +121,7 @@ if (BUILD_CARLA_SERVER) ) target_link_libraries ( - carla-server PRIVATE + carla-server PUBLIC Boost::asio Boost::geometry Boost::algorithm diff --git a/LibCarla/source/carla/FileSystem.cpp b/LibCarla/source/carla/FileSystem.cpp index 21eb82608..f33158f08 100644 --- a/LibCarla/source/carla/FileSystem.cpp +++ b/LibCarla/source/carla/FileSystem.cpp @@ -17,16 +17,11 @@ namespace carla { void FileSystem::ValidateFilePath(std::string &filepath, const std::string &ext) { fs::path path(filepath); - if (path.extension().empty() && !ext.empty()) { - if (ext[0] != '.') { - path += '.'; - } - path += ext; - } + if (path.extension() != ext) + path.replace_extension(ext); auto parent = path.parent_path(); - if (!parent.empty()) { + if (!fs::exists(parent)) fs::create_directories(parent); - } filepath = path.string(); } diff --git a/LibCarla/source/carla/image/ImageIOConfig.h b/LibCarla/source/carla/image/ImageIOConfig.h index 8baf7ef5d..78860eb02 100644 --- a/LibCarla/source/carla/image/ImageIOConfig.h +++ b/LibCarla/source/carla/image/ImageIOConfig.h @@ -40,7 +40,7 @@ # pragma clang diagnostic ignored "-Wunused-parameter" #endif -#if LIBCARLA_IMAGE_WITH_PNG_SUPPORT == true +#if LIBCARLA_IMAGE_WITH_PNG_SUPPORT # ifndef png_infopp_NULL # define png_infopp_NULL (png_infopp)NULL # endif // png_infopp_NULL @@ -58,11 +58,11 @@ # endif #endif -#if LIBCARLA_IMAGE_WITH_JPEG_SUPPORT == true +#if LIBCARLA_IMAGE_WITH_JPEG_SUPPORT # include #endif -#if LIBCARLA_IMAGE_WITH_TIFF_SUPPORT == true +#if LIBCARLA_IMAGE_WITH_TIFF_SUPPORT # include #endif diff --git a/LibCarla/source/third-party/odrSpiral/odrSpiral.cpp b/LibCarla/source/third-party/odrSpiral/odrSpiral.cpp index fc9edbfc0..eae71bf06 100644 --- a/LibCarla/source/third-party/odrSpiral/odrSpiral.cpp +++ b/LibCarla/source/third-party/odrSpiral/odrSpiral.cpp @@ -36,9 +36,6 @@ /* ====== INCLUSIONS ====== */ #include -// Edit to original file----- -#define _USE_MATH_DEFINES // Enable windows compatibility -// -------------------------- #include /* ====== LOCAL VARIABLES ====== */ diff --git a/PythonAPI/CMakeLists.txt b/PythonAPI/CMakeLists.txt index dc5535b50..b2bf4bca6 100644 --- a/PythonAPI/CMakeLists.txt +++ b/PythonAPI/CMakeLists.txt @@ -15,38 +15,38 @@ find_package ( set (PYTHON_API_PATH ${CARLA_WORKSPACE_PATH}/PythonAPI) set (PYTHON_API_CARLA_PATH ${PYTHON_API_PATH}/carla) -set (PYTHON_API_SOURCE_PATH ${PYTHON_API_CARLA_PATH}/source/libcarla) -file ( - GENERATE - OUTPUT ${PYTHON_API_PATH}/carla/pyproject.toml - INPUT ${PYTHON_API_PATH}/carla/pyproject.toml.in +carla_two_step_configure_file ( + ${PYTHON_API_PATH}/carla/pyproject.toml + ${PYTHON_API_PATH}/carla/pyproject.toml.in ) set ( PYTHON_API_SOURCES - ${PYTHON_API_SOURCE_PATH}/PythonAPI.cpp - ${PYTHON_API_SOURCE_PATH}/PythonAPI.h - ${PYTHON_API_SOURCE_PATH}/Actor.cpp - ${PYTHON_API_SOURCE_PATH}/Blueprint.cpp - ${PYTHON_API_SOURCE_PATH}/Client.cpp - ${PYTHON_API_SOURCE_PATH}/Commands.cpp - ${PYTHON_API_SOURCE_PATH}/Control.cpp - ${PYTHON_API_SOURCE_PATH}/Exception.cpp - ${PYTHON_API_SOURCE_PATH}/Geom.cpp - ${PYTHON_API_SOURCE_PATH}/LightManager.cpp - ${PYTHON_API_SOURCE_PATH}/Map.cpp - ${PYTHON_API_SOURCE_PATH}/OSM2ODR.cpp - ${PYTHON_API_SOURCE_PATH}/Sensor.cpp - ${PYTHON_API_SOURCE_PATH}/SensorData.cpp - ${PYTHON_API_SOURCE_PATH}/Snapshot.cpp - ${PYTHON_API_SOURCE_PATH}/TrafficManager.cpp - ${PYTHON_API_SOURCE_PATH}/Weather.cpp - ${PYTHON_API_SOURCE_PATH}/World.cpp + ${PYTHON_API_CARLA_PATH}/src/PythonAPI.cpp + ${PYTHON_API_CARLA_PATH}/src/Actor.cpp + ${PYTHON_API_CARLA_PATH}/src/Blueprint.cpp + ${PYTHON_API_CARLA_PATH}/src/Client.cpp + ${PYTHON_API_CARLA_PATH}/src/Commands.cpp + ${PYTHON_API_CARLA_PATH}/src/Control.cpp + ${PYTHON_API_CARLA_PATH}/src/Exception.cpp + ${PYTHON_API_CARLA_PATH}/src/Geometry.cpp + ${PYTHON_API_CARLA_PATH}/src/LightManager.cpp + ${PYTHON_API_CARLA_PATH}/src/Map.cpp + ${PYTHON_API_CARLA_PATH}/src/Sensor.cpp + ${PYTHON_API_CARLA_PATH}/src/SensorData.cpp + ${PYTHON_API_CARLA_PATH}/src/Snapshot.cpp + ${PYTHON_API_CARLA_PATH}/src/TrafficManager.cpp + ${PYTHON_API_CARLA_PATH}/src/Weather.cpp + ${PYTHON_API_CARLA_PATH}/src/World.cpp ) +if (ENABLE_OSM2ODR) + list (APPEND PYTHON_API_SOURCES ${PYTHON_API_CARLA_PATH}/src/OSM2ODR.cpp) +endif () + if (ENABLE_RSS) - list (APPEND PYTHON_API_SOURCES ${PYTHON_API_SOURCE_PATH}/AdRss.cpp) + list (APPEND PYTHON_API_SOURCES ${PYTHON_API_CARLA_PATH}/src/AdRss.cpp) endif () Python_add_library ( @@ -54,12 +54,26 @@ Python_add_library ( ${PYTHON_API_SOURCES} ) +target_include_directories ( + carla-python-api PRIVATE + ${PYTHON_API_CARLA_PATH}/include +) + target_link_libraries ( carla-python-api PRIVATE carla-client + Boost::asio + Boost::algorithm + Boost::geometry Boost::python + Boost::assert + Boost::gil + RecastNavigation::Recast + RecastNavigation::Detour + RecastNavigation::DetourCrowd png_static zlibstatic + rpc ) target_compile_definitions ( @@ -67,12 +81,31 @@ target_compile_definitions ( ${CARLA_COMMON_DEFINITIONS} ${CARLA_RTTI_DEFINITIONS} BOOST_ALL_NO_LIB - BOOST_PYTHON_STATIC_LIB + BOOST_PYTHON_STATIC_LINK LIBCARLA_WITH_PYTHON_SUPPORT ) target_include_directories ( carla-python-api PRIVATE - ${PYTHON_API_SOURCE_PATH} + ${PYTHON_API_CARLA_PATH}/src ${LIBCARLA_SOURCE_PATH} ) + +if (WIN32) + set (PYD_EXT .pyd) +else () + set (PYD_EXT .so) +endif () + +# If this command fails, enable developer mode if on Windows. +add_custom_target ( + carla-python-api-symlink + ALL + COMMAND + ${CMAKE_COMMAND} -E create_symlink $ ${PYTHON_API_PATH}/examples/carla${PYD_EXT} +) + +add_dependencies ( + carla-python-api-symlink + carla-python-api +) diff --git a/PythonAPI/carla/source/libcarla/PythonAPI.h b/PythonAPI/carla/include/PythonAPI.h similarity index 94% rename from PythonAPI/carla/source/libcarla/PythonAPI.h rename to PythonAPI/carla/include/PythonAPI.h index 36205d2bb..91c322cb1 100644 --- a/PythonAPI/carla/source/libcarla/PythonAPI.h +++ b/PythonAPI/carla/include/PythonAPI.h @@ -96,8 +96,10 @@ #endif template -boost::python::object OptionalToPythonObject(OptionalT &optional) { - return optional.has_value() ? boost::python::object(*optional) : boost::python::object(); +static auto OptionalToPyObject(OptionalT &optional) { + return optional.has_value() ? + boost::python::object(*optional) : + boost::python::object(); } // Convenient for requests without arguments. @@ -156,12 +158,11 @@ boost::python::object OptionalToPythonObject(OptionalT &optional) { } template -std::vector PythonLitstToVector(boost::python::list &input) { +std::vector PyListToVector(boost::python::list &input) { std::vector result; - boost::python::ssize_t list_size = boost::python::len(input); - for (boost::python::ssize_t i = 0; i < list_size; ++i) { + auto list_size = boost::python::len(input); + for (decltype(list_size) i = 0; i < list_size; ++i) result.emplace_back(boost::python::extract(input[i])); - } return result; } @@ -203,22 +204,22 @@ std::vector PythonLitstToVector(boost::python::list &input) { #define CALL_RETURNING_OPTIONAL(cls, fn) +[](const cls &self) { \ auto optional = self.fn(); \ - return OptionalToPythonObject(optional); \ + return OptionalToPyObject(optional); \ } #define CALL_RETURNING_OPTIONAL_1(cls, fn, T1_) +[](const cls &self, T1_ t1) { \ auto optional = self.fn(std::forward(t1)); \ - return OptionalToPythonObject(optional); \ + return OptionalToPyObject(optional); \ } #define CALL_RETURNING_OPTIONAL_2(cls, fn, T1_, T2_) +[](const cls &self, T1_ t1, T2_ t2) { \ auto optional = self.fn(std::forward(t1), std::forward(t2)); \ - return OptionalToPythonObject(optional); \ + return OptionalToPyObject(optional); \ } #define CALL_RETURNING_OPTIONAL_3(cls, fn, T1_, T2_, T3_) +[](const cls &self, T1_ t1, T2_ t2, T3_ t3) { \ auto optional = self.fn(std::forward(t1), std::forward(t2), std::forward(t3)); \ - return OptionalToPythonObject(optional); \ + return OptionalToPyObject(optional); \ } #define CALL_RETURNING_OPTIONAL_WITHOUT_GIL(cls, fn) +[](const cls &self) { \ @@ -228,12 +229,12 @@ std::vector PythonLitstToVector(boost::python::list &input) { } template -void PrintListItem_(std::ostream &out, const T &item) { +void PrintListItem(std::ostream &out, const T &item) { out << item; } template -void PrintListItem_(std::ostream &out, const carla::SharedPtr &item) { +void PrintListItem(std::ostream &out, const carla::SharedPtr &item) { if (item == nullptr) { out << "nullptr"; } else { @@ -242,14 +243,14 @@ void PrintListItem_(std::ostream &out, const carla::SharedPtr &item) { } template -inline std::ostream &PrintList(std::ostream &out, const Iterable &list) { +std::ostream &PrintList(std::ostream &out, const Iterable &list) { out << '['; if (!list.empty()) { auto it = list.begin(); - PrintListItem_(out, *it); + PrintListItem(out, *it); for (++it; it != list.end(); ++it) { out << ", "; - PrintListItem_(out, *it); + PrintListItem(out, *it); } } out << ']'; @@ -257,18 +258,16 @@ inline std::ostream &PrintList(std::ostream &out, const Iterable &list) { } namespace std { - template - inline std::ostream &operator<<(std::ostream &out, const std::vector &vector_of_stuff) { + inline std::ostream& operator<<(std::ostream& out, const std::vector& vector_of_stuff) { return PrintList(out, vector_of_stuff); } template - inline std::ostream &operator<<(std::ostream &out, const std::pair &data) { + inline std::ostream& operator<<(std::ostream& out, const std::pair& data) { out << "(" << data.first << "," << data.second << ")"; return out; } - } // namespace std namespace carla { @@ -332,9 +331,6 @@ namespace geom { } } // namespace geom -} // namespace carla - -namespace carla { namespace sensor { namespace data { @@ -398,9 +394,7 @@ namespace client { } } // namespace client -} // namespace carla -namespace carla { namespace client { inline std::ostream &operator<<(std::ostream &out, const Actor &actor) { @@ -409,9 +403,7 @@ namespace client { } } // namespace client -} // namespace carla -namespace carla { namespace rpc { inline auto boolalpha(bool b) { @@ -523,9 +515,7 @@ namespace rpc { } } // namespace rpc -} // namespace carla -namespace carla { namespace client { inline std::ostream &operator<<(std::ostream &out, const Map &map) { @@ -567,4 +557,4 @@ inline auto MakeCallback(boost::python::object callback) { PyErr_Print(); } }; -} +} \ No newline at end of file diff --git a/PythonAPI/carla/scene_layout.py b/PythonAPI/carla/scene_layout.py index 91d046d09..1e3b06eb9 100644 --- a/PythonAPI/carla/scene_layout.py +++ b/PythonAPI/carla/scene_layout.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/carla/setup-old.py b/PythonAPI/carla/setup-old.py index 067e140a9..3383971c5 100644 --- a/PythonAPI/carla/setup-old.py +++ b/PythonAPI/carla/setup-old.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/carla/source/carla/__init__.py b/PythonAPI/carla/source/carla/__init__.py deleted file mode 100644 index 50a94a675..000000000 --- a/PythonAPI/carla/source/carla/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de -# Barcelona (UAB). -# -# This work is licensed under the terms of the MIT license. -# For a copy, see . - -# pylint: disable=W0401 -from .libcarla import * diff --git a/PythonAPI/carla/source/carla/command.py b/PythonAPI/carla/source/carla/command.py deleted file mode 100644 index afa1d25aa..000000000 --- a/PythonAPI/carla/source/carla/command.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de -# Barcelona (UAB). -# -# This work is licensed under the terms of the MIT license. -# For a copy, see . - -# pylint: disable=W0401 -from .libcarla.command import * diff --git a/PythonAPI/carla/source/libcarla/Actor.cpp b/PythonAPI/carla/src/Actor.cpp similarity index 99% rename from PythonAPI/carla/source/libcarla/Actor.cpp rename to PythonAPI/carla/src/Actor.cpp index 5b50a3b85..852ace38a 100644 --- a/PythonAPI/carla/source/libcarla/Actor.cpp +++ b/PythonAPI/carla/src/Actor.cpp @@ -4,7 +4,7 @@ // This work is licensed under the terms of the MIT license. // For a copy, see . -#include "PythonAPI.h" +#include #include diff --git a/PythonAPI/carla/source/libcarla/AdRss.cpp b/PythonAPI/carla/src/AdRss.cpp similarity index 100% rename from PythonAPI/carla/source/libcarla/AdRss.cpp rename to PythonAPI/carla/src/AdRss.cpp diff --git a/PythonAPI/carla/source/libcarla/Blueprint.cpp b/PythonAPI/carla/src/Blueprint.cpp similarity index 99% rename from PythonAPI/carla/source/libcarla/Blueprint.cpp rename to PythonAPI/carla/src/Blueprint.cpp index b18bb9fa1..ca94e2f78 100644 --- a/PythonAPI/carla/source/libcarla/Blueprint.cpp +++ b/PythonAPI/carla/src/Blueprint.cpp @@ -4,7 +4,7 @@ // This work is licensed under the terms of the MIT license. // For a copy, see . -#include "PythonAPI.h" +#include #include diff --git a/PythonAPI/carla/source/libcarla/Client.cpp b/PythonAPI/carla/src/Client.cpp similarity index 99% rename from PythonAPI/carla/source/libcarla/Client.cpp rename to PythonAPI/carla/src/Client.cpp index 0dada329d..d8a3eb410 100644 --- a/PythonAPI/carla/source/libcarla/Client.cpp +++ b/PythonAPI/carla/src/Client.cpp @@ -4,7 +4,7 @@ // This work is licensed under the terms of the MIT license. // For a copy, see . -#include "PythonAPI.h" +#include #include diff --git a/PythonAPI/carla/source/libcarla/Commands.cpp b/PythonAPI/carla/src/Commands.cpp similarity index 99% rename from PythonAPI/carla/source/libcarla/Commands.cpp rename to PythonAPI/carla/src/Commands.cpp index 52147b3b5..99ecd8669 100644 --- a/PythonAPI/carla/source/libcarla/Commands.cpp +++ b/PythonAPI/carla/src/Commands.cpp @@ -4,7 +4,7 @@ // This work is licensed under the terms of the MIT license. // For a copy, see . -#include "PythonAPI.h" +#include #define TM_DEFAULT_PORT 8000 diff --git a/PythonAPI/carla/source/libcarla/Control.cpp b/PythonAPI/carla/src/Control.cpp similarity index 99% rename from PythonAPI/carla/source/libcarla/Control.cpp rename to PythonAPI/carla/src/Control.cpp index 3bda8f653..8796f4252 100644 --- a/PythonAPI/carla/source/libcarla/Control.cpp +++ b/PythonAPI/carla/src/Control.cpp @@ -5,7 +5,7 @@ // This work is licensed under the terms of the MIT license. // For a copy, see . -#include "PythonAPI.h" +#include #include diff --git a/PythonAPI/carla/source/libcarla/Exception.cpp b/PythonAPI/carla/src/Exception.cpp similarity index 96% rename from PythonAPI/carla/source/libcarla/Exception.cpp rename to PythonAPI/carla/src/Exception.cpp index 59209205b..ae22fc705 100644 --- a/PythonAPI/carla/source/libcarla/Exception.cpp +++ b/PythonAPI/carla/src/Exception.cpp @@ -4,7 +4,7 @@ // This work is licensed under the terms of the MIT license. // For a copy, see . -#include "PythonAPI.h" +#include void translator(const rpc::rpc_error &e) { std::stringstream ss; diff --git a/PythonAPI/carla/source/libcarla/Geom.cpp b/PythonAPI/carla/src/Geometry.cpp similarity index 99% rename from PythonAPI/carla/source/libcarla/Geom.cpp rename to PythonAPI/carla/src/Geometry.cpp index 4450d1b48..13a8ece69 100644 --- a/PythonAPI/carla/source/libcarla/Geom.cpp +++ b/PythonAPI/carla/src/Geometry.cpp @@ -4,7 +4,7 @@ // This work is licensed under the terms of the MIT license. // For a copy, see . -#include "PythonAPI.h" +#include #include #include diff --git a/PythonAPI/carla/source/libcarla/LightManager.cpp b/PythonAPI/carla/src/LightManager.cpp similarity index 99% rename from PythonAPI/carla/source/libcarla/LightManager.cpp rename to PythonAPI/carla/src/LightManager.cpp index e8f44c328..62f1c548d 100644 --- a/PythonAPI/carla/source/libcarla/LightManager.cpp +++ b/PythonAPI/carla/src/LightManager.cpp @@ -4,7 +4,7 @@ // This work is licensed under the terms of the MIT license. // For a copy, see . -#include "PythonAPI.h" +#include #include "boost/python/suite/indexing/vector_indexing_suite.hpp" diff --git a/PythonAPI/carla/source/libcarla/Map.cpp b/PythonAPI/carla/src/Map.cpp similarity index 99% rename from PythonAPI/carla/source/libcarla/Map.cpp rename to PythonAPI/carla/src/Map.cpp index 4be264229..c74511600 100644 --- a/PythonAPI/carla/source/libcarla/Map.cpp +++ b/PythonAPI/carla/src/Map.cpp @@ -4,7 +4,7 @@ // This work is licensed under the terms of the MIT license. // For a copy, see . -#include "PythonAPI.h" +#include static void SaveOpenDriveToDisk(const carla::client::Map &self, std::string path) { carla::PythonUtil::ReleaseGIL unlock; diff --git a/PythonAPI/carla/source/libcarla/OSM2ODR.cpp b/PythonAPI/carla/src/OSM2ODR.cpp similarity index 93% rename from PythonAPI/carla/source/libcarla/OSM2ODR.cpp rename to PythonAPI/carla/src/OSM2ODR.cpp index 564227c1f..15dd7c310 100644 --- a/PythonAPI/carla/source/libcarla/OSM2ODR.cpp +++ b/PythonAPI/carla/src/OSM2ODR.cpp @@ -4,7 +4,7 @@ // This work is licensed under the terms of the MIT license. // For a copy, see . -#include "PythonAPI.h" +#include #ifdef CARLA_PYTHON_API_HAS_OSM2ODR @@ -22,10 +22,10 @@ namespace osm2odr { return out; } void SetOsmWayTypes(OSM2ODRSettings& self, boost::python::list input) { - self.osm_highways_types = PythonLitstToVector(input); + self.osm_highways_types = PyListToVector(input); } void SetTLExcludedWayTypes(OSM2ODRSettings& self, boost::python::list input) { - self.tl_excluded_highways_types = PythonLitstToVector(input); + self.tl_excluded_highways_types = PyListToVector(input); } } @@ -58,4 +58,4 @@ void export_osm2odr() { #pragma message("WARNING: Building CARLA PythonAPI without OSM2ODR support.") -#endif \ No newline at end of file +#endif diff --git a/PythonAPI/carla/source/libcarla/PythonAPI.cpp b/PythonAPI/carla/src/PythonAPI.cpp similarity index 98% rename from PythonAPI/carla/source/libcarla/PythonAPI.cpp rename to PythonAPI/carla/src/PythonAPI.cpp index 51c5453ba..35ae6e187 100644 --- a/PythonAPI/carla/source/libcarla/PythonAPI.cpp +++ b/PythonAPI/carla/src/PythonAPI.cpp @@ -4,7 +4,7 @@ // This work is licensed under the terms of the MIT license. // For a copy, see . -#include "PythonAPI.h" +#include extern void export_geom(); extern void export_control(); diff --git a/PythonAPI/carla/source/libcarla/Sensor.cpp b/PythonAPI/carla/src/Sensor.cpp similarity index 98% rename from PythonAPI/carla/source/libcarla/Sensor.cpp rename to PythonAPI/carla/src/Sensor.cpp index b8cb5b42e..d081e480c 100644 --- a/PythonAPI/carla/source/libcarla/Sensor.cpp +++ b/PythonAPI/carla/src/Sensor.cpp @@ -4,7 +4,7 @@ // This work is licensed under the terms of the MIT license. // For a copy, see . -#include "PythonAPI.h" +#include static void SubscribeToStream(carla::client::Sensor &self, boost::python::object callback) { self.Listen(MakeCallback(std::move(callback))); diff --git a/PythonAPI/carla/source/libcarla/SensorData.cpp b/PythonAPI/carla/src/SensorData.cpp similarity index 98% rename from PythonAPI/carla/source/libcarla/SensorData.cpp rename to PythonAPI/carla/src/SensorData.cpp index 13e3ca341..960034a7b 100644 --- a/PythonAPI/carla/source/libcarla/SensorData.cpp +++ b/PythonAPI/carla/src/SensorData.cpp @@ -4,7 +4,7 @@ // This work is licensed under the terms of the MIT license. // For a copy, see . -#include "PythonAPI.h" +#include #include namespace carla { @@ -300,29 +300,49 @@ static FakeImage ColorCodedFlow ( template static std::string SaveImageToDisk(T &self, std::string path, EColorConverter cc) { + std::string r; carla::PythonUtil::ReleaseGIL unlock; using namespace carla::image; + puts("ImageView::MakeView."); auto view = ImageView::MakeView(self); + puts("ImageIO::WriteView."); + try + { switch (cc) { case EColorConverter::Raw: - return ImageIO::WriteView( + r = ImageIO::WriteView( std::move(path), view); + break; case EColorConverter::Depth: - return ImageIO::WriteView( + r = ImageIO::WriteView( std::move(path), ImageView::MakeColorConvertedView(view, ColorConverter::Depth())); + break; case EColorConverter::LogarithmicDepth: - return ImageIO::WriteView( + r = ImageIO::WriteView( std::move(path), ImageView::MakeColorConvertedView(view, ColorConverter::LogarithmicDepth())); + break; case EColorConverter::CityScapesPalette: - return ImageIO::WriteView( + r = ImageIO::WriteView( std::move(path), ImageView::MakeColorConvertedView(view, ColorConverter::CityScapesPalette())); + break; default: throw std::invalid_argument("invalid color converter!"); } + } + catch (std::exception& e) + { + puts(e.what()); + } + catch (...) + { + puts("Exception thrown"); + } + puts("Done."); + return r; } template diff --git a/PythonAPI/carla/source/libcarla/Snapshot.cpp b/PythonAPI/carla/src/Snapshot.cpp similarity index 99% rename from PythonAPI/carla/source/libcarla/Snapshot.cpp rename to PythonAPI/carla/src/Snapshot.cpp index 8188e387c..29ac679b9 100644 --- a/PythonAPI/carla/source/libcarla/Snapshot.cpp +++ b/PythonAPI/carla/src/Snapshot.cpp @@ -4,7 +4,7 @@ // This work is licensed under the terms of the MIT license. // For a copy, see . -#include "PythonAPI.h" +#include #include diff --git a/PythonAPI/carla/source/libcarla/TrafficManager.cpp b/PythonAPI/carla/src/TrafficManager.cpp similarity index 98% rename from PythonAPI/carla/source/libcarla/TrafficManager.cpp rename to PythonAPI/carla/src/TrafficManager.cpp index faab51b43..fdb76df07 100644 --- a/PythonAPI/carla/source/libcarla/TrafficManager.cpp +++ b/PythonAPI/carla/src/TrafficManager.cpp @@ -4,7 +4,7 @@ // This work is licensed under the terms of the MIT license. // For a copy, see . -#include "PythonAPI.h" +#include #include "boost/python/suite/indexing/vector_indexing_suite.hpp" using ActorPtr = carla::SharedPtr; @@ -45,7 +45,7 @@ std::vector RoadOptionToUint(boost::python::list input) { } void InterSetCustomPath(carla::traffic_manager::TrafficManager& self, const ActorPtr &actor, boost::python::list input, bool empty_buffer) { - self.SetCustomPath(actor, PythonLitstToVector(input), empty_buffer); + self.SetCustomPath(actor, PyListToVector(input), empty_buffer); } void InterSetImportedRoute(carla::traffic_manager::TrafficManager& self, const ActorPtr &actor, boost::python::list input, bool empty_buffer) { diff --git a/PythonAPI/carla/source/libcarla/Weather.cpp b/PythonAPI/carla/src/Weather.cpp similarity index 99% rename from PythonAPI/carla/source/libcarla/Weather.cpp rename to PythonAPI/carla/src/Weather.cpp index f45b02385..36fa566f1 100644 --- a/PythonAPI/carla/source/libcarla/Weather.cpp +++ b/PythonAPI/carla/src/Weather.cpp @@ -4,7 +4,7 @@ // This work is licensed under the terms of the MIT license. // For a copy, see . -#include "PythonAPI.h" +#include namespace carla { namespace rpc { diff --git a/PythonAPI/carla/source/libcarla/World.cpp b/PythonAPI/carla/src/World.cpp similarity index 97% rename from PythonAPI/carla/source/libcarla/World.cpp rename to PythonAPI/carla/src/World.cpp index 8151e3343..7723ce043 100644 --- a/PythonAPI/carla/source/libcarla/World.cpp +++ b/PythonAPI/carla/src/World.cpp @@ -4,7 +4,7 @@ // This work is licensed under the terms of the MIT license. // For a copy, see . -#include "PythonAPI.h" +#include #include @@ -169,7 +169,7 @@ void export_world() { .def_readwrite("deterministic_ragdolls", &cr::EpisodeSettings::deterministic_ragdolls) .add_property("fixed_delta_seconds", +[](const cr::EpisodeSettings &self) { - return OptionalToPythonObject(self.fixed_delta_seconds); + return OptionalToPyObject(self.fixed_delta_seconds); }, +[](cr::EpisodeSettings &self, object value) { double fds = (value == object{} ? 0.0 : extract(value)); @@ -343,13 +343,13 @@ void export_world() { .def("apply_float_color_texture_to_object", &cc::World::ApplyFloatColorTextureToObject, (arg("object_name"), arg("material_parameter"), arg("texture"))) .def("apply_textures_to_object", &cc::World::ApplyTexturesToObject, (arg("object_name"), arg("diffuse_texture"), arg("emissive_texture"), arg("normal_texture"), arg("ao_roughness_metallic_emissive_texture"))) .def("apply_color_texture_to_objects", +[](cc::World &self, boost::python::list &list, const cr::MaterialParameter& parameter, const cr::TextureColor& Texture) { - self.ApplyColorTextureToObjects(PythonLitstToVector(list), parameter, Texture); + self.ApplyColorTextureToObjects(PyListToVector(list), parameter, Texture); }, (arg("objects_name_list"), arg("material_parameter"), arg("texture"))) .def("apply_float_color_texture_to_objects", +[](cc::World &self, boost::python::list &list, const cr::MaterialParameter& parameter, const cr::TextureFloatColor& Texture) { - self.ApplyFloatColorTextureToObjects(PythonLitstToVector(list), parameter, Texture); + self.ApplyFloatColorTextureToObjects(PyListToVector(list), parameter, Texture); }, (arg("objects_name_list"), arg("material_parameter"), arg("texture"))) .def("apply_textures_to_objects", +[](cc::World &self, boost::python::list &list, const cr::TextureColor& diffuse_texture, const cr::TextureFloatColor& emissive_texture, const cr::TextureFloatColor& normal_texture, const cr::TextureFloatColor& ao_roughness_metallic_emissive_texture) { - self.ApplyTexturesToObjects(PythonLitstToVector(list), diffuse_texture, emissive_texture, normal_texture, ao_roughness_metallic_emissive_texture); + self.ApplyTexturesToObjects(PyListToVector(list), diffuse_texture, emissive_texture, normal_texture, ao_roughness_metallic_emissive_texture); }, (arg("objects_name_list"), arg("diffuse_texture"), arg("emissive_texture"), arg("normal_texture"), arg("ao_roughness_metallic_emissive_texture"))) .def(self_ns::str(self_ns::self)) ; diff --git a/PythonAPI/carla/agents/__init__.py b/PythonAPI/carla/src/agents/__init__.py similarity index 100% rename from PythonAPI/carla/agents/__init__.py rename to PythonAPI/carla/src/agents/__init__.py diff --git a/PythonAPI/carla/agents/navigation/__init__.py b/PythonAPI/carla/src/agents/navigation/__init__.py similarity index 100% rename from PythonAPI/carla/agents/navigation/__init__.py rename to PythonAPI/carla/src/agents/navigation/__init__.py diff --git a/PythonAPI/carla/agents/navigation/basic_agent.py b/PythonAPI/carla/src/agents/navigation/basic_agent.py similarity index 100% rename from PythonAPI/carla/agents/navigation/basic_agent.py rename to PythonAPI/carla/src/agents/navigation/basic_agent.py diff --git a/PythonAPI/carla/agents/navigation/behavior_agent.py b/PythonAPI/carla/src/agents/navigation/behavior_agent.py similarity index 100% rename from PythonAPI/carla/agents/navigation/behavior_agent.py rename to PythonAPI/carla/src/agents/navigation/behavior_agent.py diff --git a/PythonAPI/carla/agents/navigation/behavior_types.py b/PythonAPI/carla/src/agents/navigation/behavior_types.py similarity index 100% rename from PythonAPI/carla/agents/navigation/behavior_types.py rename to PythonAPI/carla/src/agents/navigation/behavior_types.py diff --git a/PythonAPI/carla/agents/navigation/constant_velocity_agent.py b/PythonAPI/carla/src/agents/navigation/constant_velocity_agent.py similarity index 100% rename from PythonAPI/carla/agents/navigation/constant_velocity_agent.py rename to PythonAPI/carla/src/agents/navigation/constant_velocity_agent.py diff --git a/PythonAPI/carla/agents/navigation/controller.py b/PythonAPI/carla/src/agents/navigation/controller.py similarity index 100% rename from PythonAPI/carla/agents/navigation/controller.py rename to PythonAPI/carla/src/agents/navigation/controller.py diff --git a/PythonAPI/carla/agents/navigation/global_route_planner.py b/PythonAPI/carla/src/agents/navigation/global_route_planner.py similarity index 100% rename from PythonAPI/carla/agents/navigation/global_route_planner.py rename to PythonAPI/carla/src/agents/navigation/global_route_planner.py diff --git a/PythonAPI/carla/agents/navigation/local_planner.py b/PythonAPI/carla/src/agents/navigation/local_planner.py similarity index 100% rename from PythonAPI/carla/agents/navigation/local_planner.py rename to PythonAPI/carla/src/agents/navigation/local_planner.py diff --git a/PythonAPI/carla/agents/tools/__init__.py b/PythonAPI/carla/src/agents/tools/__init__.py similarity index 100% rename from PythonAPI/carla/agents/tools/__init__.py rename to PythonAPI/carla/src/agents/tools/__init__.py diff --git a/PythonAPI/carla/agents/tools/misc.py b/PythonAPI/carla/src/agents/tools/misc.py similarity index 100% rename from PythonAPI/carla/agents/tools/misc.py rename to PythonAPI/carla/src/agents/tools/misc.py diff --git a/PythonAPI/examples/automatic_control.py b/PythonAPI/examples/automatic_control.py index f51da7b8f..330d9afe4 100755 --- a/PythonAPI/examples/automatic_control.py +++ b/PythonAPI/examples/automatic_control.py @@ -39,7 +39,13 @@ except ImportError: # ============================================================================== # -- Find CARLA module --------------------------------------------------------- # ============================================================================== -import util.find_carla +try: + sys.path.append(glob.glob('../carla/dist/carla-*%d.%d-%s.egg' % ( + sys.version_info.major, + sys.version_info.minor, + 'win-amd64' if os.name == 'nt' else 'linux-x86_64'))[0]) +except IndexError: + pass # ============================================================================== # -- Add PythonAPI for release mode -------------------------------------------- diff --git a/PythonAPI/examples/no_rendering_mode.py b/PythonAPI/examples/no_rendering_mode.py index 075290411..a7c712d94 100755 --- a/PythonAPI/examples/no_rendering_mode.py +++ b/PythonAPI/examples/no_rendering_mode.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/examples/rss/manual_control_rss.py b/PythonAPI/examples/rss/manual_control_rss.py index ff0b7e1c5..6505cbc26 100755 --- a/PythonAPI/examples/rss/manual_control_rss.py +++ b/PythonAPI/examples/rss/manual_control_rss.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # Copyright (c) 2019-2020 Intel Corporation # diff --git a/PythonAPI/examples/show_recorder_actors_blocked.py b/PythonAPI/examples/show_recorder_actors_blocked.py index 13a27c293..d4d7e8d2d 100755 --- a/PythonAPI/examples/show_recorder_actors_blocked.py +++ b/PythonAPI/examples/show_recorder_actors_blocked.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/examples/show_recorder_collisions.py b/PythonAPI/examples/show_recorder_collisions.py index 18f710513..af1ad2e4b 100755 --- a/PythonAPI/examples/show_recorder_collisions.py +++ b/PythonAPI/examples/show_recorder_collisions.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/examples/show_recorder_file_info.py b/PythonAPI/examples/show_recorder_file_info.py index 1dde92ada..66fe3b2bf 100755 --- a/PythonAPI/examples/show_recorder_file_info.py +++ b/PythonAPI/examples/show_recorder_file_info.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/examples/start_recording.py b/PythonAPI/examples/start_recording.py index f9589af00..5e809744b 100755 --- a/PythonAPI/examples/start_recording.py +++ b/PythonAPI/examples/start_recording.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/examples/start_replaying.py b/PythonAPI/examples/start_replaying.py index bd8f30e76..9eab25b75 100755 --- a/PythonAPI/examples/start_replaying.py +++ b/PythonAPI/examples/start_replaying.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/examples/synchronous_mode.py b/PythonAPI/examples/synchronous_mode.py index 902842a8c..ef8897990 100755 --- a/PythonAPI/examples/synchronous_mode.py +++ b/PythonAPI/examples/synchronous_mode.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/examples/tutorial.py b/PythonAPI/examples/tutorial.py index 5655ef58f..98a0b7c47 100644 --- a/PythonAPI/examples/tutorial.py +++ b/PythonAPI/examples/tutorial.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/examples/tutorial_gbuffer.py b/PythonAPI/examples/tutorial_gbuffer.py index e8f2fe231..9def965ed 100644 --- a/PythonAPI/examples/tutorial_gbuffer.py +++ b/PythonAPI/examples/tutorial_gbuffer.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/examples/vehicle_gallery.py b/PythonAPI/examples/vehicle_gallery.py index 06777648e..fd0e35b01 100755 --- a/PythonAPI/examples/vehicle_gallery.py +++ b/PythonAPI/examples/vehicle_gallery.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/test/smoke/__init__.py b/PythonAPI/test/smoke/__init__.py index 7e2348c0c..8a83ab5f9 100644 --- a/PythonAPI/test/smoke/__init__.py +++ b/PythonAPI/test/smoke/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/test/smoke/test_props_loading.py b/PythonAPI/test/smoke/test_props_loading.py index d3d374574..cf7b0ad8f 100644 --- a/PythonAPI/test/smoke/test_props_loading.py +++ b/PythonAPI/test/smoke/test_props_loading.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/test/smoke/test_sensor_determinism.py b/PythonAPI/test/smoke/test_sensor_determinism.py index f065abc69..53f97b9f1 100644 --- a/PythonAPI/test/smoke/test_sensor_determinism.py +++ b/PythonAPI/test/smoke/test_sensor_determinism.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/test/smoke/test_snapshot.py b/PythonAPI/test/smoke/test_snapshot.py index caa7a0b8e..e8e0fd80b 100644 --- a/PythonAPI/test/smoke/test_snapshot.py +++ b/PythonAPI/test/smoke/test_snapshot.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/test/smoke/test_streamming.py b/PythonAPI/test/smoke/test_streamming.py index b845e93c3..d4e03356f 100644 --- a/PythonAPI/test/smoke/test_streamming.py +++ b/PythonAPI/test/smoke/test_streamming.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/test/smoke/test_sync.py b/PythonAPI/test/smoke/test_sync.py index c8e707a34..6c4068c0d 100644 --- a/PythonAPI/test/smoke/test_sync.py +++ b/PythonAPI/test/smoke/test_sync.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/test/smoke/test_world.py b/PythonAPI/test/smoke/test_world.py index ee2019cbc..13b0d5ebb 100644 --- a/PythonAPI/test/smoke/test_world.py +++ b/PythonAPI/test/smoke/test_world.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/util/config.py b/PythonAPI/util/config.py index 5740c0f6f..03ba281aa 100755 --- a/PythonAPI/util/config.py +++ b/PythonAPI/util/config.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/util/lane_explorer.py b/PythonAPI/util/lane_explorer.py index 584143c2b..055b27151 100755 --- a/PythonAPI/util/lane_explorer.py +++ b/PythonAPI/util/lane_explorer.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/PythonAPI/util/test_connection.py b/PythonAPI/util/test_connection.py index f38a2ec5e..2aac0564a 100755 --- a/PythonAPI/util/test_connection.py +++ b/PythonAPI/util/test_connection.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/Unreal/CarlaUE4/CarlaUE4.uproject b/Unreal/CarlaUE4/CarlaUE4.uproject index 5d0b3cfe5..33d7e2a95 100644 --- a/Unreal/CarlaUE4/CarlaUE4.uproject +++ b/Unreal/CarlaUE4/CarlaUE4.uproject @@ -157,7 +157,9 @@ "SupportedTargetPlatforms": [ "IOS", "Win64", - "Mac" + "Mac", + "Linux", + "Android" ] }, { diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.cpp index de8868fd6..81d436d62 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.cpp @@ -18,7 +18,7 @@ // ============================================================================= void FPixelReader::WritePixelsToBuffer( - const UTextureRenderTarget2D &RenderTarget, + UTextureRenderTarget2D &RenderTarget, uint32 Offset, FRHICommandListImmediate &RHICmdList, FPixelReader::Payload FuncForSending) diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.h b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.h index 44f571bcd..c49f292ce 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.h +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.h @@ -39,34 +39,34 @@ class FPixelReader { public: - using Payload = std::function; + using Payload = std::function; /// Copy the pixels in @a RenderTarget into @a BitMap. /// /// @pre To be called from game-thread. static bool WritePixelsToArray( - UTextureRenderTarget2D &RenderTarget, - TArray &BitMap); + UTextureRenderTarget2D& RenderTarget, + TArray& BitMap); /// Dump the pixels in @a RenderTarget. /// /// @pre To be called from game-thread. static TUniquePtr> DumpPixels( - UTextureRenderTarget2D &RenderTarget); + UTextureRenderTarget2D& RenderTarget); /// Asynchronously save the pixels in @a RenderTarget to disk. /// /// @pre To be called from game-thread. static TFuture SavePixelsToDisk( - UTextureRenderTarget2D &RenderTarget, - const FString &FilePath); + UTextureRenderTarget2D& RenderTarget, + const FString& FilePath); /// Asynchronously save the pixels in @a PixelData to disk. /// /// @pre To be called from game-thread. static TFuture SavePixelsToDisk( - TUniquePtr> PixelData, - const FString &FilePath); + TUniquePtr> PixelData, + const FString& FilePath); /// Convenience function to enqueue a render command that sends the pixels /// down the @a Sensor's data stream. It expects a sensor derived from @@ -77,16 +77,16 @@ public: /// /// @pre To be called from game-thread. template - static void SendPixelsInRenderThread(TSensor &Sensor, bool use16BitFormat = false, std::function(void *, uint32)> Conversor = {}); + static void SendPixelsInRenderThread(TSensor& Sensor, bool use16BitFormat = false, std::function(void*, uint32)> Conversor = {}); /// Copy the pixels in @a RenderTarget into @a Buffer. /// /// @pre To be called from render-thread. static void WritePixelsToBuffer( - const UTextureRenderTarget2D &RenderTarget, - uint32 Offset, - FRHICommandListImmediate &InRHICmdList, - FPixelReader::Payload FuncForSending); + UTextureRenderTarget2D& RenderTarget, + uint32 Offset, + FRHICommandListImmediate& InRHICmdList, + FPixelReader::Payload FuncForSending); }; @@ -95,7 +95,7 @@ public: // ============================================================================= template -void FPixelReader::SendPixelsInRenderThread(TSensor &Sensor, bool use16BitFormat, std::function(void *, uint32)> Conversor) +void FPixelReader::SendPixelsInRenderThread(TSensor& Sensor, bool use16BitFormat, std::function(void*, uint32)> Conversor) { TRACE_CPUPROFILER_EVENT_SCOPE(FPixelReader::SendPixelsInRenderThread); check(Sensor.CaptureRenderTarget != nullptr); @@ -107,133 +107,137 @@ void FPixelReader::SendPixelsInRenderThread(TSensor &Sensor, bool use16BitFormat /// Blocks until the render thread has finished all it's tasks. Sensor.EnqueueRenderSceneImmediate(); + FlushRenderingCommands(); + SavePixelsToDisk( + *Sensor.CaptureRenderTarget, + TEXT("F:\\Carla\\PythonAPI\\examples\\_out\\image.png")); // Enqueue a command in the render-thread that will write the image buffer to // the data stream. The stream is created in the capture thus executed in the // game-thread. ENQUEUE_RENDER_COMMAND(FWritePixels_SendPixelsInRenderThread) - ( - [&Sensor, use16BitFormat, Conversor = std::move(Conversor)](auto &InRHICmdList) mutable - { - TRACE_CPUPROFILER_EVENT_SCOPE_STR("FWritePixels_SendPixelsInRenderThread"); - - /// @todo Can we make sure the sensor is not going to be destroyed? - if (!Sensor.IsPendingKill()) + ( + [&Sensor, use16BitFormat, Conversor = std::move(Conversor)](auto& InRHICmdList) mutable { - FPixelReader::Payload FuncForSending = - [&Sensor, Frame = FCarlaEngine::GetFrameCounter(), Conversor = std::move(Conversor)](void *LockedData, uint32 Size, uint32 Offset, uint32 ExpectedRowBytes) - { - if (Sensor.IsPendingKill()) return; + TRACE_CPUPROFILER_EVENT_SCOPE_STR("FWritePixels_SendPixelsInRenderThread"); - TArray Converted; - - // optional conversion of data - if (Conversor) + /// @todo Can we make sure the sensor is not going to be destroyed? + if (!Sensor.IsPendingKill()) + { + FPixelReader::Payload FuncForSending = + [&Sensor, Frame = FCarlaEngine::GetFrameCounter(), Conversor = std::move(Conversor)](void* LockedData, uint32 Size, uint32 Offset, uint32 ExpectedRowBytes) { - TRACE_CPUPROFILER_EVENT_SCOPE_STR("Data conversion"); - Converted = Conversor(LockedData, Size); - LockedData = reinterpret_cast(Converted.GetData()); - Size = Converted.Num() * Converted.GetTypeSize(); - } + if (Sensor.IsPendingKill()) return; - auto Stream = Sensor.GetDataStream(Sensor); - Stream.SetFrameNumber(Frame); - auto Buffer = Stream.PopBufferFromPool(); + TArray Converted; - uint32 CurrentRowBytes = ExpectedRowBytes; + // optional conversion of data + if (Conversor) + { + TRACE_CPUPROFILER_EVENT_SCOPE_STR("Data conversion"); + Converted = Conversor(LockedData, Size); + LockedData = reinterpret_cast(Converted.GetData()); + Size = Converted.Num() * Converted.GetTypeSize(); + } + + auto Stream = Sensor.GetDataStream(Sensor); + Stream.SetFrameNumber(Frame); + auto Buffer = Stream.PopBufferFromPool(); + + uint32 CurrentRowBytes = ExpectedRowBytes; #ifdef _WIN32 - // DirectX uses additional bytes to align each row to 256 boundry, - // so we need to remove that extra data - if (IsD3DPlatform(GMaxRHIShaderPlatform)) - { - CurrentRowBytes = Align(ExpectedRowBytes, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT); - if (ExpectedRowBytes != CurrentRowBytes) + // DirectX uses additional bytes to align each row to 256 boundry, + // so we need to remove that extra data + if (IsD3DPlatform(GMaxRHIShaderPlatform)) { - TRACE_CPUPROFILER_EVENT_SCOPE_STR("Buffer Copy (windows, row by row)"); - Buffer.reset(Offset + Size); - auto DstRow = Buffer.begin() + Offset; - const uint8 *SrcRow = reinterpret_cast(LockedData); - uint32 i = 0; - while (i < Size) + CurrentRowBytes = Align(ExpectedRowBytes, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT); + if (ExpectedRowBytes != CurrentRowBytes) { - FMemory::Memcpy(DstRow, SrcRow, ExpectedRowBytes); - DstRow += ExpectedRowBytes; - SrcRow += CurrentRowBytes; - i += ExpectedRowBytes; + TRACE_CPUPROFILER_EVENT_SCOPE_STR("Buffer Copy (windows, row by row)"); + Buffer.reset(Offset + Size); + auto DstRow = Buffer.begin() + Offset; + const uint8* SrcRow = reinterpret_cast(LockedData); + uint32 i = 0; + while (i < Size) + { + FMemory::Memcpy(DstRow, SrcRow, ExpectedRowBytes); + DstRow += ExpectedRowBytes; + SrcRow += CurrentRowBytes; + i += ExpectedRowBytes; + } } } - } #endif // _WIN32 - if (ExpectedRowBytes == CurrentRowBytes) - { - check(ExpectedRowBytes == CurrentRowBytes); - TRACE_CPUPROFILER_EVENT_SCOPE_STR("Buffer Copy"); - Buffer.copy_from(Offset, boost::asio::buffer(LockedData, Size)); - } - - { - // send - TRACE_CPUPROFILER_EVENT_SCOPE_STR("Sending buffer"); - if(Buffer.data()) + if (ExpectedRowBytes == CurrentRowBytes) { - // serialize data - carla::Buffer BufferReady(std::move(carla::sensor::SensorRegistry::Serialize(Sensor, std::move(Buffer)))); - carla::SharedBufferView BufView = carla::BufferView::CreateFrom(std::move(BufferReady)); - - // ROS2 - #if defined(WITH_ROS2) - auto ROS2 = carla::ros2::ROS2::GetInstance(); - if (ROS2->IsEnabled()) - { - TRACE_CPUPROFILER_EVENT_SCOPE_STR("ROS2 Send PixelReader"); - auto StreamId = carla::streaming::detail::token_type(Sensor.GetToken()).get_stream_id(); - auto Res = std::async(std::launch::async, [&Sensor, ROS2, &Stream, StreamId, BufView]() - { - // get resolution of camera - int W = -1, H = -1; - float Fov = -1.0f; - auto WidthOpt = Sensor.GetAttribute("image_size_x"); - if (WidthOpt.has_value()) - W = FCString::Atoi(*WidthOpt->Value); - auto HeightOpt = Sensor.GetAttribute("image_size_y"); - if (HeightOpt.has_value()) - H = FCString::Atoi(*HeightOpt->Value); - auto FovOpt = Sensor.GetAttribute("fov"); - if (FovOpt.has_value()) - Fov = FCString::Atof(*FovOpt->Value); - // send data to ROS2 - AActor* ParentActor = Sensor.GetAttachParentActor(); - if (ParentActor) - { - FTransform LocalTransformRelativeToParent = Sensor.GetActorTransform().GetRelativeTransform(ParentActor->GetActorTransform()); - ROS2->ProcessDataFromCamera(Stream.GetSensorType(), StreamId, LocalTransformRelativeToParent, W, H, Fov, BufView, &Sensor); - } - else - { - ROS2->ProcessDataFromCamera(Stream.GetSensorType(), StreamId, Stream.GetSensorTransform(), W, H, Fov, BufView, &Sensor); - } - }); - } - #endif - - // network - SCOPE_CYCLE_COUNTER(STAT_CarlaSensorStreamSend); - TRACE_CPUPROFILER_EVENT_SCOPE_STR("Stream Send"); - Stream.Send(Sensor, BufView); + check(ExpectedRowBytes == CurrentRowBytes); + TRACE_CPUPROFILER_EVENT_SCOPE_STR("Buffer Copy"); + Buffer.copy_from(Offset, boost::asio::buffer(LockedData, Size)); } - } - }; + + { + // send + TRACE_CPUPROFILER_EVENT_SCOPE_STR("Sending buffer"); + if (Buffer.data()) + { + // serialize data + carla::Buffer BufferReady(std::move(carla::sensor::SensorRegistry::Serialize(Sensor, std::move(Buffer)))); + carla::SharedBufferView BufView = carla::BufferView::CreateFrom(std::move(BufferReady)); + + // ROS2 +#if defined(WITH_ROS2) + auto ROS2 = carla::ros2::ROS2::GetInstance(); + if (ROS2->IsEnabled()) + { + TRACE_CPUPROFILER_EVENT_SCOPE_STR("ROS2 Send PixelReader"); + auto StreamId = carla::streaming::detail::token_type(Sensor.GetToken()).get_stream_id(); + auto Res = std::async(std::launch::async, [&Sensor, ROS2, &Stream, StreamId, BufView]() + { + // get resolution of camera + int W = -1, H = -1; + float Fov = -1.0f; + auto WidthOpt = Sensor.GetAttribute("image_size_x"); + if (WidthOpt.has_value()) + W = FCString::Atoi(*WidthOpt->Value); + auto HeightOpt = Sensor.GetAttribute("image_size_y"); + if (HeightOpt.has_value()) + H = FCString::Atoi(*HeightOpt->Value); + auto FovOpt = Sensor.GetAttribute("fov"); + if (FovOpt.has_value()) + Fov = FCString::Atof(*FovOpt->Value); + // send data to ROS2 + AActor* ParentActor = Sensor.GetAttachParentActor(); + if (ParentActor) + { + FTransform LocalTransformRelativeToParent = Sensor.GetActorTransform().GetRelativeTransform(ParentActor->GetActorTransform()); + ROS2->ProcessDataFromCamera(Stream.GetSensorType(), StreamId, LocalTransformRelativeToParent, W, H, Fov, BufView, &Sensor); + } + else + { + ROS2->ProcessDataFromCamera(Stream.GetSensorType(), StreamId, Stream.GetSensorTransform(), W, H, Fov, BufView, &Sensor); + } + }); + } +#endif + + // network + SCOPE_CYCLE_COUNTER(STAT_CarlaSensorStreamSend); + TRACE_CPUPROFILER_EVENT_SCOPE_STR("Stream Send"); + Stream.Send(Sensor, BufView); + } + } + }; WritePixelsToBuffer( - *Sensor.CaptureRenderTarget, - carla::sensor::SensorRegistry::get::type::header_offset, - InRHICmdList, - std::move(FuncForSending)); + *Sensor.CaptureRenderTarget, + carla::sensor::SensorRegistry::get::type::header_offset, + InRHICmdList, + std::move(FuncForSending)); } } - ); + ); // Blocks until the render thread has finished all it's tasks Sensor.WaitForRenderThreadToFinish(); diff --git a/Util/BuildTools/Import.py b/Util/BuildTools/Import.py index 352727f66..f9518a0e2 100755 --- a/Util/BuildTools/Import.py +++ b/Util/BuildTools/Import.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/Util/Docker/docker_tools.py b/Util/Docker/docker_tools.py index b572490ed..0df754aa6 100755 --- a/Util/Docker/docker_tools.py +++ b/Util/Docker/docker_tools.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma # de Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/Util/Docker/docker_utils.py b/Util/Docker/docker_utils.py index 2fb9e2ca9..16219f441 100644 --- a/Util/Docker/docker_utils.py +++ b/Util/Docker/docker_utils.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma # de Barcelona (UAB). # # This work is licensed under the terms of the MIT license. diff --git a/Util/DockerUtils/dist/get_xodr_crosswalks.py b/Util/DockerUtils/dist/get_xodr_crosswalks.py index 0c33b38a2..8caa6a9b3 100644 --- a/Util/DockerUtils/dist/get_xodr_crosswalks.py +++ b/Util/DockerUtils/dist/get_xodr_crosswalks.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de +# Copyright (c) 2024 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license.