From 39e0fcbf1d833c456518c452d86012f6739fe33e Mon Sep 17 00:00:00 2001 From: Jacopo Bartiromo Date: Thu, 4 Nov 2021 14:09:39 +0100 Subject: [PATCH] Fixes RPC error when using update_vehicle_lights --- LibCarla/source/carla/trafficmanager/Parameters.cpp | 2 +- LibCarla/source/carla/trafficmanager/Parameters.h | 2 +- LibCarla/source/carla/trafficmanager/TrafficManager.h | 2 +- LibCarla/source/carla/trafficmanager/TrafficManagerBase.h | 2 +- LibCarla/source/carla/trafficmanager/TrafficManagerClient.h | 2 +- LibCarla/source/carla/trafficmanager/TrafficManagerLocal.cpp | 4 ++-- LibCarla/source/carla/trafficmanager/TrafficManagerLocal.h | 2 +- LibCarla/source/carla/trafficmanager/TrafficManagerRemote.h | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/LibCarla/source/carla/trafficmanager/Parameters.cpp b/LibCarla/source/carla/trafficmanager/Parameters.cpp index beb0b99eb..bc4109bde 100644 --- a/LibCarla/source/carla/trafficmanager/Parameters.cpp +++ b/LibCarla/source/carla/trafficmanager/Parameters.cpp @@ -103,7 +103,7 @@ void Parameters::SetRandomRightLaneChangePercentage(const ActorPtr &actor, const } -void Parameters::SetUpdateVehicleLightState(const ActorPtr &actor, const bool do_update) { +void Parameters::SetUpdateVehicleLights(const ActorPtr &actor, const bool do_update) { const auto entry = std::make_pair(actor->GetId(), do_update); auto_update_vehicle_lights.AddEntry(entry); diff --git a/LibCarla/source/carla/trafficmanager/Parameters.h b/LibCarla/source/carla/trafficmanager/Parameters.h index 2b9c63339..8630000ff 100644 --- a/LibCarla/source/carla/trafficmanager/Parameters.h +++ b/LibCarla/source/carla/trafficmanager/Parameters.h @@ -147,7 +147,7 @@ public: void SetRandomRightLaneChangePercentage(const ActorPtr &actor, const float percentage); /// Method to set the automatic vehicle light state update flag. - void SetUpdateVehicleLightState(const ActorPtr &actor, const bool do_update); + void SetUpdateVehicleLights(const ActorPtr &actor, const bool do_update); /// Method to set the distance to leading vehicle for all registered vehicles. void SetGlobalDistanceToLeadingVehicle(const float dist); diff --git a/LibCarla/source/carla/trafficmanager/TrafficManager.h b/LibCarla/source/carla/trafficmanager/TrafficManager.h index 3522396a6..11917f6e2 100644 --- a/LibCarla/source/carla/trafficmanager/TrafficManager.h +++ b/LibCarla/source/carla/trafficmanager/TrafficManager.h @@ -186,7 +186,7 @@ public: } } - /// Set the automatical management of the vehicle lights + /// Set the automatic management of the vehicle lights void SetUpdateVehicleLights(const ActorPtr &actor, const bool do_update){ TrafficManagerBase* tm_ptr = GetTM(_port); if(tm_ptr != nullptr){ diff --git a/LibCarla/source/carla/trafficmanager/TrafficManagerBase.h b/LibCarla/source/carla/trafficmanager/TrafficManagerBase.h index 5db030cc2..42cf7ea59 100644 --- a/LibCarla/source/carla/trafficmanager/TrafficManagerBase.h +++ b/LibCarla/source/carla/trafficmanager/TrafficManagerBase.h @@ -58,7 +58,7 @@ public: /// If less than 0, it's a % increase. virtual void SetGlobalPercentageSpeedDifference(float const percentage) = 0; - /// Method to set the automatical management of the vehicle lights + /// Method to set the automatic management of the vehicle lights virtual void SetUpdateVehicleLights(const ActorPtr &actor, const bool do_update) = 0; /// Method to set collision detection rules between vehicles. diff --git a/LibCarla/source/carla/trafficmanager/TrafficManagerClient.h b/LibCarla/source/carla/trafficmanager/TrafficManagerClient.h index 1429db7d7..40f1eb2e0 100644 --- a/LibCarla/source/carla/trafficmanager/TrafficManagerClient.h +++ b/LibCarla/source/carla/trafficmanager/TrafficManagerClient.h @@ -88,7 +88,7 @@ public: _client->call("set_global_percentage_speed_difference", percentage); } - /// Method to set the automatical management of the vehicle lights + /// Method to set the automatic management of the vehicle lights void SetUpdateVehicleLights(const carla::rpc::Actor &_actor, const bool do_update) { DEBUG_ASSERT(_client != nullptr); _client->call("update_vehicle_lights", std::move(_actor), do_update); diff --git a/LibCarla/source/carla/trafficmanager/TrafficManagerLocal.cpp b/LibCarla/source/carla/trafficmanager/TrafficManagerLocal.cpp index bbe125b3d..223d2126b 100644 --- a/LibCarla/source/carla/trafficmanager/TrafficManagerLocal.cpp +++ b/LibCarla/source/carla/trafficmanager/TrafficManagerLocal.cpp @@ -349,9 +349,9 @@ void TrafficManagerLocal::SetGlobalPercentageSpeedDifference(const float percent parameters.SetGlobalPercentageSpeedDifference(percentage); } -/// Method to set the automatical management of the vehicle lights +/// Method to set the automatic management of the vehicle lights void TrafficManagerLocal::SetUpdateVehicleLights(const ActorPtr &actor, const bool do_update) { - parameters.SetUpdateVehicleLightState(actor, do_update); + parameters.SetUpdateVehicleLights(actor, do_update); } void TrafficManagerLocal::SetCollisionDetection(const ActorPtr &reference_actor, const ActorPtr &other_actor, const bool detect_collision) { diff --git a/LibCarla/source/carla/trafficmanager/TrafficManagerLocal.h b/LibCarla/source/carla/trafficmanager/TrafficManagerLocal.h index 58fc34674..61f801a3e 100644 --- a/LibCarla/source/carla/trafficmanager/TrafficManagerLocal.h +++ b/LibCarla/source/carla/trafficmanager/TrafficManagerLocal.h @@ -166,7 +166,7 @@ public: /// If less than 0, it's a % increase. void SetGlobalPercentageSpeedDifference(float const percentage); - /// Method to set the automatical management of the vehicle lights + /// Method to set the automatic management of the vehicle lights void SetUpdateVehicleLights(const ActorPtr &actor, const bool do_update); /// Method to set collision detection rules between vehicles. diff --git a/LibCarla/source/carla/trafficmanager/TrafficManagerRemote.h b/LibCarla/source/carla/trafficmanager/TrafficManagerRemote.h index dd8a389b7..be250103f 100644 --- a/LibCarla/source/carla/trafficmanager/TrafficManagerRemote.h +++ b/LibCarla/source/carla/trafficmanager/TrafficManagerRemote.h @@ -61,7 +61,7 @@ public: /// If less than 0, it's a % increase. void SetGlobalPercentageSpeedDifference(float const percentage); - /// Method to set the automatical management of the vehicle lights + /// Method to set the automatic management of the vehicle lights void SetUpdateVehicleLights(const ActorPtr &actor, const bool do_update); /// Method to set collision detection rules between vehicles.