From 94df1fbe9b9ab006349d185bf94a48249ef12d2d Mon Sep 17 00:00:00 2001 From: Aaron Date: Thu, 7 Mar 2024 12:03:16 +0100 Subject: [PATCH] Trimed whitespaces --- LibCarla/source/carla/client/detail/Simulator.h | 6 +++--- PythonAPI/carla/source/libcarla/World.cpp | 2 ++ .../Plugins/Carla/Source/Carla/Game/CarlaGameModeBase.h | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/LibCarla/source/carla/client/detail/Simulator.h b/LibCarla/source/carla/client/detail/Simulator.h index e4c2bcb7b..28813f6af 100644 --- a/LibCarla/source/carla/client/detail/Simulator.h +++ b/LibCarla/source/carla/client/detail/Simulator.h @@ -250,7 +250,7 @@ namespace detail { } uint64_t SetEpisodeSettings(const rpc::EpisodeSettings &settings); - + rpc::WeatherParameters GetWeatherParameters() { return _client.GetWeatherParameters(); } @@ -266,7 +266,7 @@ namespace detail { void SetIMUISensorGravity(float NewIMUISensorGravity) { _client.SetIMUISensorGravity(NewIMUISensorGravity); } - + rpc::VehiclePhysicsControl GetVehiclePhysicsControl(const Vehicle &vehicle) const { return _client.GetVehiclePhysicsControl(vehicle.GetId()); } @@ -469,7 +469,7 @@ namespace detail { std::vector GetActorBoneNames(const Actor &actor) { return _client.GetActorBoneNames(actor.GetId()); - } + } std::vector GetActorSocketWorldTransforms(const Actor &actor) { return _client.GetActorSocketWorldTransforms(actor.GetId()); diff --git a/PythonAPI/carla/source/libcarla/World.cpp b/PythonAPI/carla/source/libcarla/World.cpp index 0c59ebf32..f980285ac 100644 --- a/PythonAPI/carla/source/libcarla/World.cpp +++ b/PythonAPI/carla/source/libcarla/World.cpp @@ -321,6 +321,8 @@ void export_world() { .def("apply_settings", &ApplySettings, (arg("settings"), arg("seconds")=0.0)) .def("get_weather", CONST_CALL_WITHOUT_GIL(cc::World, GetWeather)) .def("set_weather", &cc::World::SetWeather) + .def("get_imui_sensor_gravity", CONST_CALL_WITHOUT_GIL(cc::World, GetIMUISensorGravity)) + .def("set_imui_sensor_gravity", &cc::World::SetIMUISensorGravity, (arg("NewIMUISensorGravity")) ) .def("get_snapshot", &cc::World::GetSnapshot) .def("get_actor", CONST_CALL_WITHOUT_GIL_1(cc::World, GetActor, carla::ActorId), (arg("actor_id"))) .def("get_actors", CONST_CALL_WITHOUT_GIL(cc::World, GetActors)) diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaGameModeBase.h b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaGameModeBase.h index 4b6ea68d4..c42a7c56b 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaGameModeBase.h +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Game/CarlaGameModeBase.h @@ -111,11 +111,11 @@ public: const carla::rpc::MaterialParameter& TextureParam); TArray GetNamesOfAllActors(); - + // Gravitational acceleration. Default is earth one, which is approximately 9.81 m/s^2 UPROPERTY(BlueprintReadOnly, EditAnywhere, Category="Sensor Gravity") float IMUISensorGravity = 9.81f; - + protected: void InitGame(const FString &MapName, const FString &Options, FString &ErrorMessage) override; @@ -182,7 +182,7 @@ private: UPROPERTY() ALargeMapManager* LMManager = nullptr; - + FDelegateHandle OnEpisodeSettingsChangeHandle; boost::optional Map;