From 9e94feb3a52e6f5ba01d8a0e579e5cd3c008a507 Mon Sep 17 00:00:00 2001 From: AreopagX <49414432+AreopagX@users.noreply.github.com> Date: Thu, 29 Feb 2024 19:15:58 +0100 Subject: [PATCH 1/4] navigation information is now loaded when changing maps --- CHANGELOG.md | 1 + LibCarla/source/carla/client/detail/Simulator.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd6a7be18..138f015a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ## Latest Changes + * Fixed a bug that caused navigation information not to be loaded when switching maps * Prevent from segfault on failing SignalReference identification when loading OpenDrive files * Added vehicle doors to the recorder * Added functions to get actor' components transform diff --git a/LibCarla/source/carla/client/detail/Simulator.cpp b/LibCarla/source/carla/client/detail/Simulator.cpp index 8b4089a88..5083dd378 100644 --- a/LibCarla/source/carla/client/detail/Simulator.cpp +++ b/LibCarla/source/carla/client/detail/Simulator.cpp @@ -88,6 +88,12 @@ namespace detail { const auto id = GetCurrentEpisode().GetId(); _client.LoadEpisode(std::move(map_name), reset_settings, map_layers); + // delete the pointer to _episode so that the Navigation information + // will be loaded for the correct map + assert(_episode.use_count() == 1); + _episode.reset(); + GetReadyCurrentEpisode(); + // We are waiting 50ms for the server to reload the episode. // If in this time we have not detected a change of episode, we try again // 'number_of_attempts' times. From 4d09f0a6608a716e422ca5866e25ff128e33aaa2 Mon Sep 17 00:00:00 2001 From: Jorge Virgos Date: Thu, 12 Sep 2024 12:07:54 +0200 Subject: [PATCH 2/4] 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. --- LibCarla/source/carla/streaming/detail/tcp/Client.cpp | 9 +-------- .../source/carla/streaming/detail/tcp/ServerSession.cpp | 8 ++------ 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/LibCarla/source/carla/streaming/detail/tcp/Client.cpp b/LibCarla/source/carla/streaming/detail/tcp/Client.cpp index e3982f614..47f9e4c25 100644 --- a/LibCarla/source/carla/streaming/detail/tcp/Client.cpp +++ b/LibCarla/source/carla/streaming/detail/tcp/Client.cpp @@ -15,7 +15,6 @@ #include #include #include -#include #include #include @@ -86,7 +85,6 @@ namespace tcp { void Client::Connect() { auto self = shared_from_this(); - boost::asio::post(_strand, [this, self]() { if (_done) { return; } @@ -139,18 +137,15 @@ namespace tcp { log_debug("streaming client: connecting to", ep); _socket.async_connect(ep, boost::asio::bind_executor(_strand, handle_connect)); - }); } void Client::Stop() { _connection_timer.cancel(); auto self = shared_from_this(); - boost::asio::post(_strand, [this, self]() { _done = true; if (_socket.is_open()) { _socket.close(); } - }); } void Client::Reconnect() { @@ -165,7 +160,6 @@ namespace tcp { void Client::ReadData() { auto self = shared_from_this(); - boost::asio::post(_strand, [this, self]() { if (_done) { return; } @@ -182,7 +176,7 @@ namespace tcp { // Move the buffer to the callback function and start reading the next // piece of data. // log_debug("streaming client: success reading data, calling the callback"); - boost::asio::post(_strand, [self, message]() { self->_callback(message->pop()); }); + self->_callback(message->pop()); ReadData(); } else { // As usual, if anything fails start over from the very top. @@ -219,7 +213,6 @@ namespace tcp { _socket, message->size_as_buffer(), boost::asio::bind_executor(_strand, handle_read_header)); - }); } } // namespace tcp diff --git a/LibCarla/source/carla/streaming/detail/tcp/ServerSession.cpp b/LibCarla/source/carla/streaming/detail/tcp/ServerSession.cpp index a726fbf1c..8851f1fa5 100644 --- a/LibCarla/source/carla/streaming/detail/tcp/ServerSession.cpp +++ b/LibCarla/source/carla/streaming/detail/tcp/ServerSession.cpp @@ -79,7 +79,6 @@ namespace tcp { DEBUG_ASSERT(message != nullptr); DEBUG_ASSERT(!message->empty()); auto self = shared_from_this(); - boost::asio::post(_strand, [=]() { if (!_socket.is_open()) { return; } @@ -111,11 +110,8 @@ namespace tcp { log_debug("session", _session_id, ": sending message of", message->size(), "bytes"); _deadline.expires_from_now(_timeout); - boost::asio::async_write( - _socket, - message->GetBufferSequence(), - handle_sent); - }); + boost::asio::async_write(_socket, message->GetBufferSequence(), + boost::asio::bind_executor(_strand, handle_sent)); } void ServerSession::Close() { From c7339367b9bf3cb7c1b461760db522d66383c2c6 Mon Sep 17 00:00:00 2001 From: Sergio Paniego Blanco Date: Fri, 13 Sep 2024 21:07:25 +0200 Subject: [PATCH 3/4] Fixed typo in CityScapes palette (#8137) --- Docs/ref_sensors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/ref_sensors.md b/Docs/ref_sensors.md index 142798920..d346f338b 100644 --- a/Docs/ref_sensors.md +++ b/Docs/ref_sensors.md @@ -736,7 +736,7 @@ The following tags are currently available (Note, tags changed from version 0.9. | `14` | Car | `(0, 0, 142)` | Cars, vans | | `15` | Truck | `(0, 0, 70)` | Trucks | | `16` | Bus | `(0, 60, 100)` | Busses | -| `17` | Train | `(0, 60, 100)` | Trains | +| `17` | Train | `(0, 80, 100)` | Trains | | `18` | Motorcycle | `(0, 0, 230)` | Motorcycle, Motorbike | | `19` | Bicycle | `(119, 11, 32)` | Bicylces | | `20` | Static | `(110, 190, 160)` | Elements in the scene and props that are immovable.
E.g. fire hydrants, fixed benches, fountains, bus stops, etc. | From 92a6e71c6bd453d5d0ac20029410f0a89aaa1419 Mon Sep 17 00:00:00 2001 From: Ylmdrin <150919430+Ylmdrin@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:53:29 +0200 Subject: [PATCH 4/4] Correcting makefile typo to avoid override warning for target "downloadplugins" (#8167) The downloadplugins target is already defined below (line 162). --- Util/BuildTools/Linux.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Util/BuildTools/Linux.mk b/Util/BuildTools/Linux.mk index 8e64f7689..5484207d5 100644 --- a/Util/BuildTools/Linux.mk +++ b/Util/BuildTools/Linux.mk @@ -138,7 +138,7 @@ LibCarla.client.rss.release: setup ad-rss plugins: @${CARLA_BUILD_TOOLS_FOLDER}/Plugins.sh $(ARGS) -setup downloadplugins: +setup: downloadplugins @${CARLA_BUILD_TOOLS_FOLDER}/Setup.sh $(ARGS) ad-rss: