Make (Unreal) non-unity build available (#6190)

This lets IWYU-type errors be fixed; they are often masked by it.
Fix all detected errors of this kind. Note that Unity is on by
default, likely for performance reasons, so this does not change
that; instead, pass ARGS=--no-unity to make to try it (note that this
unfortunately will rebuild the editor too.)

Co-authored-by: anrp <anrp@tri.global>
Co-authored-by: Axel1092 <35765780+Axel1092@users.noreply.github.com>
Co-authored-by: bernat <bernatx@gmail.com>
This commit is contained in:
anrp-tri 2023-03-20 04:09:39 -07:00 committed by GitHub
parent fba921c03a
commit 4e070089c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
74 changed files with 321 additions and 69 deletions

View File

@ -9,6 +9,7 @@
* Added API function to avoid replaying the spectator
* `Client.set_replayer_ignore_spectator(bool)`
* `start_replaying.py` using flag `--move-spectator`
* Surface non-unity build mode by passing ARGS=--no-unity to make; allows IWYU-type errors to be unmasked and fixed.
* Added maps, vehicles, pedestrians and props catalogues to the documentation
* Add keyword arguments for `carla.TrafficManager` Python API functions
* Fixed bug causing the `FPixelReader::SavePixelsToDisk(PixelData, FilePath)` function to crash due to pixel array not set correctly.

View File

@ -8,9 +8,17 @@
#include <vector>
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wshadow"
#endif
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/index/rtree.hpp>
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
namespace carla {
namespace geom {

View File

@ -6,6 +6,11 @@
#pragma once
#include "carla/MsgPack.h"
#ifdef LIBCARLA_INCLUDED_FROM_UE4
#include <compiler/enable-ue4-macros.h>
#include "Vehicle/VehiclePhysicsControl.h"
#include <compiler/disable-ue4-macros.h>
#endif
namespace carla {
namespace rpc {

View File

@ -13,10 +13,17 @@
#include "carla/streaming/detail/Types.h"
#include "carla/streaming/detail/tcp/Message.h"
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wshadow"
#endif
#include <boost/asio/deadline_timer.hpp>
#include <boost/asio/io_context.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/strand.hpp>
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
#include <functional>
#include <memory>

View File

@ -3,10 +3,17 @@
#include <memory>
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wshadow"
#endif
#include "boost/geometry.hpp"
#include "boost/geometry/geometries/geometries.hpp"
#include "boost/geometry/geometries/point_xy.hpp"
#include "boost/geometry/geometries/polygon.hpp"
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
#include "carla/trafficmanager/DataStructures.h"
#include "carla/trafficmanager/Parameters.h"

View File

@ -11,9 +11,16 @@
#include <unordered_map>
#include <unordered_set>
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wshadow"
#endif
#include "boost/geometry.hpp"
#include "boost/geometry/geometries/point.hpp"
#include "boost/geometry/index/rtree.hpp"
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
#include "carla/client/Map.h"
#include "carla/client/Waypoint.h"

View File

@ -2252,4 +2252,8 @@
#pragma pop_macro("RETURN_FALSE_ON_FAIL")
#pragma pop_macro("PI")
#ifdef LIBCARLA_INCLUDED_FROM_UE4
#undef LIBCARLA_INCLUDED_FROM_UE4
#else
#error "This file does not support nesting guards (preprocessor can't do math) - instead, in LibCarla, enable macros, include Unreal header, and disable macros."
#endif

View File

@ -6,6 +6,7 @@
#pragma once
#include "Actor/ActorInfo.h"
#include "Math/DVector.h"
#include "Carla/Vehicle/AckermannControllerSettings.h"
#include "Carla/Vehicle/VehicleAckermannControl.h"

View File

@ -4,8 +4,6 @@
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
#pragma once
#include "Carla.h"
#include "Carla/Actor/ActorData.h"
#include "Carla/Actor/ActorRegistry.h"
@ -58,7 +56,7 @@ static FCarlaActor::ActorType FActorRegistry_GetActorType(const AActor *Actor)
}
}
static FString GetRelevantTagAsString(const TSet<crp::CityObjectLabel> &SemanticTags)
FString CarlaGetRelevantTagAsString(const TSet<crp::CityObjectLabel> &SemanticTags)
{
for (auto &&Tag : SemanticTags)
{
@ -156,7 +154,7 @@ TSharedPtr<FCarlaActor> FActorRegistry::MakeCarlaActor(
if (Info->Description.Id.IsEmpty())
{
// This is a fake actor, let's fake the id based on their semantic tags.
Info->Description.Id = TEXT("static.") + GetRelevantTagAsString(Info->SemanticTags);
Info->Description.Id = TEXT("static.") + CarlaGetRelevantTagAsString(Info->SemanticTags);
}
Info->SerializedData.id = Id;

View File

@ -4,8 +4,6 @@
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
#pragma once
#include "Carla.h"
#include "Carla/Actor/ActorSpawnResult.h"

View File

@ -9,6 +9,7 @@
#if WITH_EDITOR
#include "FileHelpers.h"
#endif
#include "Misc/FileHelper.h"
#include "JsonObject.h"
#include "JsonSerializer.h"
#include "UObject/ConstructorHelpers.h"

View File

@ -6,6 +6,8 @@
#include "MoveAssetsCommandlet.h"
#include "SSTags.h"
UMoveAssetsCommandlet::UMoveAssetsCommandlet()
{
IsClient = false;
@ -15,42 +17,6 @@ UMoveAssetsCommandlet::UMoveAssetsCommandlet()
}
#if WITH_EDITORONLY_DATA
// NOTE: Assets imported from a map FBX will be classified for semantic
// segmentation as ROAD, ROADLINES AND TERRAIN based on the asset name
// defined in RoadRunner. These tags will be used for moving the meshes
// and for specifying the path to these meshes when spawning them in a world.
namespace SSTags {
// Carla Semantic Segmentation Folder Tags
static const FString ROAD = TEXT("Road");
static const FString ROADLINE = TEXT("RoadLine");
static const FString TERRAIN = TEXT("Terrain");
static const FString GRASS = TEXT("Terrain");
static const FString SIDEWALK = TEXT("SideWalk");
static const FString CURB = TEXT("SideWalk");
static const FString GUTTER = TEXT("SideWalk");
// RoadRunner Tags
//
// RoadRunner's mesh naming convention:
// mapName_meshType_meshSubtype_layerNumberNode
//
// meshType is a larger geographical tag (e.g. "Road", "Terrain")
// meshSubType is a denomination of the tag (e.g. "Road", "Gutter", "Ground")
static const FString R_ROAD1 = TEXT("Road_Road");
static const FString R_ROAD2 = TEXT("Roads_Road");
static const FString R_GRASS1 = TEXT("Road_Grass");
static const FString R_GRASS2 = TEXT("Roads_Grass");
static const FString R_MARKING1 = TEXT("Road_Marking");
static const FString R_MARKING2 = TEXT("Roads_Marking");
static const FString R_SIDEWALK1 = TEXT("Road_Sidewalk");
static const FString R_SIDEWALK2 = TEXT("Roads_Sidewalk");
static const FString R_CURB1 = TEXT("Road_Curb");
static const FString R_CURB2 = TEXT("Roads_Curb");
static const FString R_GUTTER1 = TEXT("Road_Gutter");
static const FString R_GUTTER2 = TEXT("Roads_Gutter");
static const FString R_TERRAIN = TEXT("Terrain");
}
FMovePackageParams UMoveAssetsCommandlet::ParseParams(const FString &InParams) const
{
TArray<FString> Tokens;

View File

@ -6,9 +6,16 @@
#include "PrepareAssetsForCookingCommandlet.h"
#include "AssetRegistry/AssetRegistryModule.h"
#include "SSTags.h"
#if WITH_EDITOR
#include "FileHelpers.h"
#endif
#include "Misc/FileHelper.h"
#include "Serialization/JsonReader.h"
#include "Serialization/JsonSerializer.h"
#include "HAL/PlatformFilemanager.h"
#include "UObject/ConstructorHelpers.h"
#include "Materials/MaterialInstanceConstant.h"

View File

@ -10,6 +10,7 @@
#include "Commandlets/Commandlet.h"
#include "Runtime/Engine/Classes/Engine/ObjectLibrary.h"
#include "Runtime/Engine/Classes/Engine/StaticMeshActor.h"
#include "AssetRegistry/AssetRegistryModule.h"
#include "PrepareAssetsForCookingCommandlet.generated.h"
// undef this API to avoid conflict with UE 4.26

View File

@ -0,0 +1,48 @@
// Copyright (c) 2023 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 <https://opensource.org/licenses/MIT>.
#include "Containers/UnrealString.h"
#pragma once
#if WITH_EDITORONLY_DATA
// NOTE: Assets imported from a map FBX will be classified for semantic
// segmentation as ROAD, ROADLINES AND TERRAIN based on the asset name
// defined in RoadRunner. These tags will be used for moving the meshes
// and for specifying the path to these meshes when spawning them in a world.
namespace SSTags {
// Carla Semantic Segmentation Folder Tags
static const FString ROAD = TEXT("Road");
static const FString ROADLINE = TEXT("RoadLine");
static const FString TERRAIN = TEXT("Terrain");
static const FString GRASS = TEXT("Terrain");
static const FString SIDEWALK = TEXT("SideWalk");
static const FString CURB = TEXT("SideWalk");
static const FString GUTTER = TEXT("SideWalk");
// RoadRunner Tags
//
// RoadRunner's mesh naming convention:
// mapName_meshType_meshSubtype_layerNumberNode
//
// meshType is a larger geographical tag (e.g. "Road", "Terrain")
// meshSubType is a denomination of the tag (e.g. "Road", "Gutter", "Ground")
static const FString R_ROAD1 = TEXT("Road_Road");
static const FString R_ROAD2 = TEXT("Roads_Road");
static const FString R_GRASS1 = TEXT("Road_Grass");
static const FString R_GRASS2 = TEXT("Roads_Grass");
static const FString R_MARKING1 = TEXT("Road_Marking");
static const FString R_MARKING2 = TEXT("Roads_Marking");
static const FString R_SIDEWALK1 = TEXT("Road_Sidewalk");
static const FString R_SIDEWALK2 = TEXT("Roads_Sidewalk");
static const FString R_CURB1 = TEXT("Road_Curb");
static const FString R_CURB2 = TEXT("Roads_Curb");
static const FString R_GUTTER1 = TEXT("Road_Gutter");
static const FString R_GUTTER2 = TEXT("Roads_Gutter");
static const FString R_TERRAIN = TEXT("Terrain");
}
#endif

View File

@ -9,6 +9,7 @@
#include "Carla/Game/CarlaEpisode.h"
#include "Carla/Game/CarlaStaticDelegates.h"
#include "Carla/Game/CarlaStatics.h"
#include "Carla/Lights/CarlaLightSubsystem.h"
#include "Carla/Recorder/CarlaRecorder.h"
#include "Carla/Settings/CarlaSettings.h"

View File

@ -11,6 +11,7 @@
#include "Carla/Server/CarlaServer.h"
#include "Carla/Settings/EpisodeSettings.h"
#include "Carla/Util/NonCopyable.h"
#include "Carla/Game/FrameData.h"
#include "Misc/CoreDelegates.h"
@ -24,7 +25,6 @@
#include <mutex>
class UCarlaSettings;
class FFrameData;
struct FEpisodeSettings;
class FCarlaEngine : private NonCopyable
@ -125,3 +125,6 @@ private:
std::vector<FFrameData> FramesToProcess;
std::mutex FrameToProcessMutex;
};
// Note: this has a circular dependency with FCarlaEngine; it must be included late.
#include "Sensor/AsyncDataStreamImpl.h"

View File

@ -6,6 +6,7 @@
#include "Carla.h"
#include "Carla/Game/CarlaEpisode.h"
#include "Carla/Game/CarlaStatics.h"
#include <compiler/disable-ue4-macros.h>
#include <carla/opendrive/OpenDriveParser.h>
@ -17,6 +18,7 @@
#include "Carla/Util/RandomEngine.h"
#include "Carla/Vehicle/VehicleSpawnPoint.h"
#include "Carla/Game/CarlaStatics.h"
#include "Carla/Game/CarlaStaticDelegates.h"
#include "Carla/MapGen/LargeMapManager.h"
#include "Engine/StaticMeshActor.h"
@ -262,8 +264,6 @@ carla::rpc::Actor UCarlaEpisode::SerializeActor(FCarlaActor *CarlaActor) const
return Actor;
}
static FString GetRelevantTagAsString(const TSet<crp::CityObjectLabel> &SemanticTags);
carla::rpc::Actor UCarlaEpisode::SerializeActor(AActor* Actor) const
{
FCarlaActor* CarlaActor = FindCarlaActor(Actor);
@ -279,7 +279,7 @@ carla::rpc::Actor UCarlaEpisode::SerializeActor(AActor* Actor) const
TSet<crp::CityObjectLabel> SemanticTags;
ATagger::GetTagsOfTaggedActor(*Actor, SemanticTags);
FActorDescription Description;
Description.Id = TEXT("static.") + GetRelevantTagAsString(SemanticTags);
Description.Id = TEXT("static.") + CarlaGetRelevantTagAsString(SemanticTags);
SerializedActor.description = Description;
SerializedActor.semantic_tags.reserve(SemanticTags.Num());
for (auto &&Tag : SemanticTags)

View File

@ -392,3 +392,5 @@ private:
FSensorManager SensorManager;
};
FString CarlaGetRelevantTagAsString(const TSet<crp::CityObjectLabel> &SemanticTags);

View File

@ -7,11 +7,17 @@
#include "Carla.h"
#include "Carla/Game/CarlaGameModeBase.h"
#include "Carla/Game/CarlaHUD.h"
#include "Carla/Game/CarlaStatics.h"
#include "Carla/Game/CarlaStaticDelegates.h"
#include "Carla/Lights/CarlaLight.h"
#include "Engine/DecalActor.h"
#include "Engine/LevelStreaming.h"
#include "Engine/LocalPlayer.h"
#include "Materials/MaterialInstanceDynamic.h"
#include "Engine/StaticMeshActor.h"
#include "Vehicle/VehicleSpawnPoint.h"
#include "Util/BoundingBoxCalculator.h"
#include "EngineUtils.h"
#include <compiler/disable-ue4-macros.h>
#include "carla/opendrive/OpenDriveParser.h"

View File

@ -6,6 +6,8 @@
#include "CarlaHUD.h"
#include "GameFramework/PlayerController.h"
void ACarlaHUD::DrawHUD()
{
Super::DrawHUD();

View File

@ -21,6 +21,7 @@
// We can fix that by just undefining the function that conflicts with the name of the Windows API in Unicode.
#undef DrawText
#include "Carla.h"
#include "Containers/Array.h"
#include "GameFramework/HUD.h"
#include "WheeledVehicleMovementComponent.h"

View File

@ -8,7 +8,16 @@
#include "Carla/Game/CarlaEpisode.h"
#include "Carla/Actor/CarlaActor.h"
#include "Carla/Game/CarlaEngine.h"
#include "Carla/Game/CarlaEpisode.h"
#include "Carla/Traffic/TrafficLightController.h"
#include "Carla/Traffic/TrafficLightGroup.h"
#include "Carla/MapGen/LargeMapManager.h"
#include "Carla/Game/CarlaStatics.h"
#include "Carla/Settings/CarlaSettings.h"
#include "Carla/Lights/CarlaLightSubsystem.h"
#include <compiler/disable-ue4-macros.h>
#include "carla/rpc/VehicleLightState.h"
#include <compiler/enable-ue4-macros.h>
void FFrameData::GetFrameData(UCarlaEpisode *ThisEpisode, bool bAdditionalData, bool bIncludeActorsAgain)

View File

@ -25,8 +25,15 @@
#include "Carla/Recorder/CarlaRecorderInfo.h"
#include "Carla/Recorder/CarlaRecorderPosition.h"
#include "Carla/Recorder/CarlaRecorderFrameCounter.h"
#include "Carla/Recorder/CarlaRecorderState.h"
#include "Carla/Actor/ActorDescription.h"
#include "Carla/Lights/CarlaLight.h"
#include "Carla/Traffic/TrafficLightBase.h"
#include "Carla/Traffic/TrafficSignBase.h"
#include <sstream>
#include <unordered_map>
class UCarlaEpisode;
class FCarlaActor;

View File

@ -1,5 +1,6 @@
#include "Carla.h"
#include "TaggedComponent.h"
#include "ConstructorHelpers.h"
#include "Rendering/SkeletalMeshRenderData.h"
#include "SkeletalRenderPublic.h"

View File

@ -7,6 +7,7 @@
#include "Carla.h"
#include "Tagger.h"
#include "TaggedComponent.h"
#include "Vehicle/CarlaWheeledVehicle.h"
#include "Components/SkeletalMeshComponent.h"
#include "Components/StaticMeshComponent.h"

View File

@ -5,6 +5,10 @@
#include "LargeMapManager.h"
#include "Engine/WorldComposition.h"
#include "Engine/ObjectLibrary.h"
#include "Game/CarlaStatics.h"
#include "Actor/ActorRegistry.h"
#include "Game/CarlaEpisode.h"
#include "Engine/EngineTypes.h"
#include "Components/PrimitiveComponent.h"
#include "Landscape.h"

View File

@ -7,6 +7,7 @@
#include "Carla.h"
#include "Carla/OpenDrive/OpenDrive.h"
#include "Carla/Game/CarlaGameModeBase.h"
#include "Misc/FileHelper.h"
#include "Carla/Game/CarlaStatics.h"
#include "GenericPlatform/GenericPlatformProcess.h"

View File

@ -12,6 +12,11 @@
#include "UObject/ConstructorHelpers.h"
#include "DrawDebugHelpers.h"
#include "ConstructorHelpers.h"
#include "Materials/MaterialExpressionTextureSample.h"
#include "DrawDebugHelpers.h"
#include <compiler/disable-ue4-macros.h>
#include <carla/geom/Math.h>
#include <carla/opendrive/OpenDriveParser.h>

View File

@ -4,6 +4,7 @@
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
#include <fstream>
#include <vector>
#include "UnrealString.h"

View File

@ -4,8 +4,12 @@
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
#include "CarlaRecorderQuery.h"
#include "CarlaRecorderHelpers.h"
#include "CarlaRecorder.h"
#include <ctime>
#include <sstream>
#include <string>

View File

@ -16,6 +16,7 @@
#include "CarlaRecorderLightScene.h"
#include "CarlaRecorderLightVehicle.h"
#include "CarlaRecorderAnimWalker.h"
#include "CarlaRecorderAnimVehicle.h"
#include "CarlaRecorderCollision.h"
#include "CarlaRecorderEventAdd.h"
#include "CarlaRecorderEventDel.h"

View File

@ -9,10 +9,13 @@
#include "CarlaRecorderEventAdd.h"
#include "CarlaRecorderPosition.h"
#include "CarlaRecorderState.h"
#include "CarlaRecorderAnimBiker.h"
#include "CarlaRecorderAnimWalker.h"
#include "CarlaRecorderAnimVehicle.h"
#include "CarlaRecorderAnimVehicleWheels.h"
#include "CarlaRecorderLightVehicle.h"
#include "CarlaRecorderLightScene.h"
#include "CarlaRecorderWalkerBones.h"
#include <unordered_map>

View File

@ -4,6 +4,12 @@
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
// Note: AsyncDataStream.h has a circular dependency with Game/CarlaEngine.h.
// You should not have to include this file directly (CarlaEngine.h includes it
// at the appropriate place.)
#pragma once
#include "Carla/Game/CarlaEngine.h"
#include "Carla/Sensor/AsyncDataStream.h"

View File

@ -12,6 +12,7 @@
#include "Carla.h"
#include "Carla/Util/RandomEngine.h"
#include "Carla/Sensor/DVSCamera.h"
#include "Actor/ActorBlueprintFunctionLibrary.h"
static float FColorToGrayScaleFloat(FColor Color)
{

View File

@ -7,6 +7,7 @@
#pragma once
#include "Carla/Sensor/SceneCaptureSensor.h"
#include "Sensor/ShaderBasedSensor.h"
#include <carla/sensor/data/DVSEvent.h>
#include "DVSCamera.generated.h"

View File

@ -7,6 +7,8 @@
#include "Carla.h"
#include "Carla/Sensor/DepthCamera.h"
#include "Carla/Actor/ActorBlueprintFunctionLibrary.h"
#include "Carla/Sensor/PixelReader.h"
FActorDefinition ADepthCamera::GetSensorDefinition()

View File

@ -5,6 +5,7 @@
// For a copy, see <https://opensource.org/licenses/MIT>.
#include "Carla.h"
#include "Carla/Actor/ActorBlueprintFunctionLibrary.h"
#include "Carla/Sensor/GnssSensor.h"
#include "Carla/Game/CarlaEpisode.h"
#include "Carla/Game/CarlaStatics.h"

View File

@ -6,6 +6,7 @@
#include "Carla/Sensor/ImageUtil.h"
#include "Runtime/RHI/Public/RHISurfaceDataConversion.h"
#include "Carla/Carla.h"

View File

@ -7,6 +7,7 @@
#include "Carla.h"
#include "Carla/Sensor/InstanceSegmentationCamera.h"
#include "Carla/Game/TaggedComponent.h"
#include "Carla/Actor/ActorBlueprintFunctionLibrary.h"
#include "Carla/Sensor/PixelReader.h"

View File

@ -5,6 +5,7 @@
#include "Carla.h"
#include "Carla/Sensor/LaneInvasionSensor.h"
#include "Carla/Actor/ActorBlueprintFunctionLibrary.h"
FActorDefinition ALaneInvasionSensor::GetSensorDefinition()
{

View File

@ -9,6 +9,8 @@
#include "Carla/Sensor/PixelReader.h"
#include "Carla/Actor/ActorBlueprintFunctionLibrary.h"
FActorDefinition ANormalsCamera::GetSensorDefinition()
{
return UActorBlueprintFunctionLibrary::MakeNormalsCameraDefinition();

View File

@ -2,6 +2,8 @@
#include "Carla/Sensor/OpticalFlowCamera.h"
#include "HAL/IConsoleManager.h"
#include "Carla/Actor/ActorBlueprintFunctionLibrary.h"
#include "Carla/Sensor/PixelReader.h"
FActorDefinition AOpticalFlowCamera::GetSensorDefinition()

View File

@ -5,6 +5,8 @@
#include "Carla.h"
#include "Carla/Sensor/RssSensor.h"
#include "Actor/ActorBlueprintFunctionLibrary.h"
#include "Engine/CollisionProfile.h"
#include "StaticMeshResources.h"
FActorDefinition ARssSensor::GetSensorDefinition()

View File

@ -9,6 +9,8 @@
#include "Carla/Game/CarlaEngine.h"
#include <chrono>
#include "Actor/ActorBlueprintFunctionLibrary.h"
#include "Runtime/RenderCore/Public/RenderingThread.h"
FActorDefinition ASceneCaptureCamera::GetSensorDefinition()

View File

@ -7,6 +7,7 @@
#pragma once
#include "Carla/Actor/ActorDefinition.h"
#include "Actor/ActorBlueprintFunctionLibrary.h"
#include "Carla/Sensor/PixelReader.h"
#include "Carla/Sensor/ShaderBasedSensor.h"

View File

@ -7,6 +7,7 @@
#include "Carla.h"
#include "Carla/Sensor/SceneCaptureSensor.h"
#include "Carla/Game/CarlaStatics.h"
#include "Actor/ActorBlueprintFunctionLibrary.h"
#include <mutex>
#include <atomic>

View File

@ -7,6 +7,8 @@
#include "Carla.h"
#include "Carla/Sensor/SemanticSegmentationCamera.h"
#include "Actor/ActorBlueprintFunctionLibrary.h"
#include "Carla/Sensor/PixelReader.h"
FActorDefinition ASemanticSegmentationCamera::GetSensorDefinition()

View File

@ -12,6 +12,8 @@
#include "Carla/Actor/ActorBlueprintFunctionLibrary.h"
#include "Carla/Game/CarlaStatics.h"
#include "Engine/CollisionProfile.h"
ASensor::ASensor(const FObjectInitializer &ObjectInitializer)
: Super(ObjectInitializer)
{

View File

@ -10,6 +10,8 @@
#include "Carla/Sensor/DataStream.h"
#include "Carla/Util/RandomEngine.h"
#include "Carla/Game/CarlaEngine.h"
#include "GameFramework/Actor.h"
#include "Sensor.generated.h"

View File

@ -9,6 +9,8 @@
#include "ConstructorHelpers.h"
#include "Materials/MaterialInstanceDynamic.h"
#include "Components/SceneCaptureComponent2D.h"
#include "Actor/ActorBlueprintFunctionLibrary.h"
bool AShaderBasedSensor::AddPostProcessingMaterial(const FString &Path)
{

View File

@ -7,6 +7,9 @@
#include "Carla.h"
#include "Carla/Sensor/WorldObserver.h"
#include "Carla/Actor/ActorData.h"
#include "Carla/Actor/ActorRegistry.h"
#include "Carla/Game/CarlaEpisode.h"
#include "Carla/Game/CarlaEngine.h"
#include "Carla/Traffic/TrafficLightBase.h"
#include "Carla/Traffic/TrafficLightComponent.h"

View File

@ -19,6 +19,7 @@
#include "Carla/Walker/WalkerBase.h"
#include "GameFramework/CharacterMovementComponent.h"
#include "Carla/Game/Tagger.h"
#include "Carla/Game/CarlaStatics.h"
#include "Carla/Vehicle/MovementComponents/CarSimManagerComponent.h"
#include "Carla/Vehicle/MovementComponents/ChronoMovementComponent.h"
#include "Carla/Lights/CarlaLightSubsystem.h"
@ -167,7 +168,7 @@ carla::rpc::ResponseError RespondError(
const ECarlaServerResponse& Error,
const FString& ExtraInfo = "")
{
return RespondError(FuncName, GetStringError(Error), ExtraInfo);
return RespondError(FuncName, CarlaGetStringError(Error), ExtraInfo);
}
class ServerBinder

View File

@ -6,7 +6,7 @@
#include "CarlaServerResponse.h"
FString GetStringError(ECarlaServerResponse Response)
FString CarlaGetStringError(ECarlaServerResponse Response)
{
switch (Response)
{

View File

@ -24,4 +24,4 @@ enum class ECarlaServerResponse
FunctionNotAvailiableWhenDormant
};
FString GetStringError(ECarlaServerResponse Response);
FString CarlaGetStringError(ECarlaServerResponse Response);

View File

@ -1,4 +1,5 @@
#include "Carla.h"
#include "Game/CarlaGameInstance.h"
#include "Carla/Settings/CarlaSettingsDelegate.h"
#include "Carla/Game/CarlaGameInstance.h"

View File

@ -8,6 +8,7 @@
#include "Carla/Game/CarlaStatics.h"
#include "Carla/MapGen/LargeMapManager.h"
#include "Carla/Vehicle/CarlaWheeledVehicle.h"
#include "Game/CarlaStatics.h"
#include "Carla/Vehicle/WheeledVehicleAIController.h"
#include <compiler/disable-ue4-macros.h>

View File

@ -15,6 +15,10 @@
#include "Carla/MapGen/LargeMapManager.h"
#include "carla/road/element/RoadInfoSignal.h"
#include <compiler/disable-ue4-macros.h>
#include <carla/road/element/RoadInfoSignal.h>
#include <compiler/enable-ue4-macros.h>
UTrafficLightComponent::UTrafficLightComponent()
: Super()
{

View File

@ -10,9 +10,9 @@
#include "Kismet/BlueprintFunctionLibrary.h"
#include "BoundingBoxCalculator.generated.h"
#include "GameFramework/Actor.h"
class AActor;
#include "BoundingBoxCalculator.generated.h"
UCLASS()
class CARLA_API UBoundingBoxCalculator : public UBlueprintFunctionLibrary

View File

@ -6,6 +6,8 @@
#pragma once
#include "GameFramework/Actor.h"
#include "Carla/Util/BoundingBox.h"
#include "Carla/Vehicle/CarlaWheeledVehicle.h"
#include "Carla/Traffic/TrafficLightBase.h"
@ -13,8 +15,6 @@
#include "ObjectRegister.generated.h"
class AActor;
UCLASS()
class CARLA_API UObjectRegister : public UObject
{

View File

@ -8,6 +8,8 @@
#include "Kismet/BlueprintFunctionLibrary.h"
#include "GameFramework/Actor.h"
#include <compiler/disable-ue4-macros.h>
#include "carla/rpc/ObjectLabel.h"
#include "carla/rpc/LabelledPoint.h"
@ -18,8 +20,6 @@
#include "RayTracer.generated.h"
class AActor;
UCLASS()
class CARLA_API URayTracer : public UBlueprintFunctionLibrary
{

View File

@ -6,6 +6,7 @@
#include "BaseVegetationActor.h"
#include "Carla/Carla.h"
void ABaseVegetationActor::BeginPlay()

View File

@ -11,12 +11,16 @@
#include "DrawDebugHelpers.h"
#include "Kismet/KismetMathLibrary.h"
#include "BaseVegetationActor.h"
#include "Vehicle/CarlaWheeledVehicle.h"
#include <unordered_set>
#include <vector>
#include "carla/rpc/String.h"
#include <cmath>
#include <sstream>
#include <compiler/disable-ue4-macros.h>
#include "carla/rpc/String.h"
#include <compiler/enable-ue4-macros.h>
#define SPRINGVEGETATIONLOGS 0
#define SOLVERLOGS 0
#define COLLISIONLOGS 0

View File

@ -8,6 +8,8 @@
#include "ProceduralFoliageComponent.h"
#include "Carla/Vegetation/VegetationManager.h"
#include "Carla/Vegetation/SpringBasedVegetationComponent.h"
#include "Carla/Game/CarlaStatics.h"
#include "Game/TaggedComponent.h"
static FString GetVersionFromFString(const FString& String)

View File

@ -10,6 +10,7 @@
#include "ProceduralFoliageVolume.h"
#include "Components/InstancedStaticMeshComponent.h"
#include "Materials/MaterialInstanceDynamic.h"
#include "InstancedFoliageActor.h"
#include "Containers/Array.h"
#include "Containers/Map.h"

View File

@ -9,11 +9,14 @@
#include "CustomTerrainPhysicsComponent.h"
#include "Runtime/Core/Public/Async/ParallelFor.h"
#include "Engine/CollisionProfile.h"
#include "Engine/StaticMeshActor.h"
#include "StaticMeshResources.h"
#include "CollisionQueryParams.h"
#include "Carla/MapGen/LargeMapManager.h"
#include "Carla/Game/CarlaStatics.h"
#include "Carla/MapGen/SoilTypeManager.h"
#include "carla/rpc/String.h"
#include "Carla/Actor/ActorBlueprintFunctionLibrary.h"
#include "HAL/PlatformFilemanager.h"
#include "HAL/RunnableThread.h"
#include "Misc/Paths.h"
@ -30,6 +33,8 @@
#include "GenericPlatform/GenericPlatformProcess.h"
#include "Materials/MaterialParameterCollection.h"
#include "Materials/MaterialParameterCollectionInstance.h"
#include "Materials/MaterialInterface.h"
#include "Materials/MaterialInstance.h"
// #include <carla/pytorch/pytorch.h>
#include "Components/SkinnedMeshComponent.h"
@ -40,7 +45,6 @@
#include "Carla/Game/CarlaStatics.h"
#include "carla/rpc/String.h"
#include "HAL/PlatformFilemanager.h"
#include "HAL/RunnableThread.h"
#include "Misc/Paths.h"
@ -65,6 +69,11 @@
#include <thread>
#include <chrono>
#include <compiler/disable-ue4-macros.h>
#include "carla/rpc/String.h"
#include <compiler/enable-ue4-macros.h>
constexpr float MToCM = 100.f;
constexpr float CMToM = 0.01f;
@ -2284,13 +2293,13 @@ void UCustomTerrainPhysicsComponent::AddForceToSingleWheel( USkeletalMeshCompone
{
FVector WheelBottomLocation = WheelPosition - FVector(0,0, 0.337);
float OriginalHeight = SparseMap.GetHeight(WheelPosition);
float FloorHeight = OriginalHeight - UEFrameToSI(TerrainDepth);
float NewFloorHeight = OriginalHeight - UEFrameToSI(TerrainDepth);
if( WheelNormalForce.Size() == 0 ){
WheelNormalForce = FVector::UpVector;
}
float ForceFactor = ( WheelBottomLocation.Z - OriginalHeight ) / ( FloorHeight - OriginalHeight );
float ForceFactor = ( WheelBottomLocation.Z - OriginalHeight ) / ( NewFloorHeight - OriginalHeight );
if( ForceFactor < 0){
ForceFactor = 0;
}
@ -2423,9 +2432,9 @@ void UCustomTerrainPhysicsComponent::ApplyMeanAccelerationToVehicle(
}
}
TArray<FVector> UCustomTerrainPhysicsComponent::GetParticlesInRadius(FVector Position, float Radius)
TArray<FVector> UCustomTerrainPhysicsComponent::GetParticlesInRadius(FVector Position, float InRadius)
{
std::vector<FParticle*> Particles = SparseMap.GetParticlesInRadius(UEFrameToSI(Position), Radius*CMToM);
std::vector<FParticle*> Particles = SparseMap.GetParticlesInRadius(UEFrameToSI(Position), InRadius*CMToM);
TArray<FVector> ParticlePositions;
for(FParticle* Particle : Particles)
{
@ -2434,9 +2443,9 @@ TArray<FVector> UCustomTerrainPhysicsComponent::GetParticlesInRadius(FVector Pos
return ParticlePositions;
}
TArray<FVector> UCustomTerrainPhysicsComponent::GetParticlesInTileRadius(FVector Position, float Radius)
TArray<FVector> UCustomTerrainPhysicsComponent::GetParticlesInTileRadius(FVector Position, float InRadius)
{
std::vector<FParticle*> Particles = SparseMap.GetParticlesInTileRadius(UEFrameToSI(Position), Radius*CMToM);
std::vector<FParticle*> Particles = SparseMap.GetParticlesInTileRadius(UEFrameToSI(Position), InRadius*CMToM);
TArray<FVector> ParticlePositions;
for(FParticle* Particle : Particles)
{

View File

@ -8,6 +8,7 @@
#include "Components/ActorComponent.h"
#include "Components/PrimitiveComponent.h"
#include "Engine/StaticMeshActor.h"
#include "Misc/ScopeLock.h"
#include "Carla/Math/DVector.h"

View File

@ -13,12 +13,21 @@
#ifdef WITH_CHRONO
#include "compiler/disable-ue4-macros.h"
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wshadow"
#endif
#include "chrono/physics/ChSystemNSC.h"
#include "chrono_vehicle/ChVehicleModelData.h"
#include "chrono_vehicle/ChTerrain.h"
#include "chrono_vehicle/driver/ChDataDriver.h"
#include "chrono_vehicle/wheeled_vehicle/vehicle/WheeledVehicle.h"
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
#include "compiler/enable-ue4-macros.h"
#endif

View File

@ -11,6 +11,7 @@
#include "Components/PoseableMeshComponent.h"
#include "Components/PrimitiveComponent.h"
#include "Containers/Map.h"
#include "GameFramework/Character.h"
#include "GameFramework/CharacterMovementComponent.h"
#include "GameFramework/Pawn.h"

View File

@ -2,6 +2,8 @@
using UnrealBuildTool;
using System.Collections.Generic;
using System;
using System.IO;
public class CarlaUE4Target : TargetRules
{
@ -9,5 +11,25 @@ public class CarlaUE4Target : TargetRules
{
Type = TargetType.Game;
ExtraModuleNames.Add("CarlaUE4");
string ConfigDir = Path.GetDirectoryName(ProjectFile.ToString()) + "/Config/";
string OptionalModulesFile = Path.Combine(ConfigDir, "OptionalModules.ini");
string[] text = System.IO.File.ReadAllLines(OptionalModulesFile);
bool UnityOn = true;
foreach (string line in text) {
if (line.Contains("Unity OFF"))
{
UnityOn = false;
}
}
if (!UnityOn) {
Console.WriteLine("Disabling unity");
bUseUnityBuild = false;
bForceUnityBuild = false;
bUseAdaptiveUnityBuild = false;
}
}
}

View File

@ -2,6 +2,8 @@
using UnrealBuildTool;
using System.Collections.Generic;
using System;
using System.IO;
public class CarlaUE4EditorTarget : TargetRules
{
@ -9,5 +11,25 @@ public class CarlaUE4EditorTarget : TargetRules
{
Type = TargetType.Editor;
ExtraModuleNames.Add("CarlaUE4");
string ConfigDir = Path.GetDirectoryName(ProjectFile.ToString()) + "/Config/";
string OptionalModulesFile = Path.Combine(ConfigDir, "OptionalModules.ini");
string[] text = System.IO.File.ReadAllLines(OptionalModulesFile);
bool UnityOn = true;
foreach (string line in text) {
if (line.Contains("Unity OFF"))
{
UnityOn = false;
}
}
if (!UnityOn) {
Console.WriteLine("Disabling unity");
bUseUnityBuild = false;
bForceUnityBuild = false;
bUseAdaptiveUnityBuild = false;
}
}
}

View File

@ -19,8 +19,11 @@ set LAUNCH_UE4_EDITOR=false
set REMOVE_INTERMEDIATE=false
set USE_CARSIM=false
set USE_CHRONO=false
set USE_UNITY=true
set CARSIM_STATE="CarSim OFF"
set CHRONO_STATE="Chrono OFF"
set UNITY_STATE="Unity ON"
set AT_LEAST_WRITE_OPTIONALMODULES=false
set EDITOR_FLAGS=""
:arg-parse
@ -45,6 +48,12 @@ if not "%1"=="" (
if "%1"=="--chrono" (
set USE_CHRONO=true
)
if "%1"=="--no-unity" (
set USE_UNITY=false
)
if "%1"=="--at-least-write-optionalmodules" (
set AT_LEAST_WRITE_OPTIONALMODULES=true
)
if "%1"=="-h" (
goto help
)
@ -60,7 +69,9 @@ set EDITOR_FLAGS=%EDITOR_FLAGS:"=%
if %REMOVE_INTERMEDIATE% == false (
if %LAUNCH_UE4_EDITOR% == false (
if %BUILD_UE4_EDITOR% == false (
goto help
if %AT_LEAST_WRITE_OPTIONALMODULES% == false (
goto help
)
)
)
)
@ -147,8 +158,12 @@ if %USE_CHRONO% == true (
) else (
set CHRONO_STATE="Chrono OFF"
)
set OPTIONAL_MODULES_TEXT=%CARSIM_STATE% %CHRONO_STATE% %OMNIVERSE_PLUGIN_INSTALLED%
if %USE_UNITY% == true (
set UNITY_STATE="Unity ON"
) else (
set UNITY_STATE="Unity OFF"
)
set OPTIONAL_MODULES_TEXT=%CARSIM_STATE% %CHRONO_STATE% %OMNIVERSE_PLUGIN_INSTALLED% %UNITY_STATE%
echo %OPTIONAL_MODULES_TEXT% > "%ROOT_PATH%Unreal/CarlaUE4/Config/OptionalModules.ini"

View File

@ -15,13 +15,16 @@ LAUNCH_UE4_EDITOR=false
USE_CARSIM=false
USE_CHRONO=false
USE_PYTORCH=false
USE_UNITY=true
EDITOR_FLAGS=""
USE_HOUDINI=false
GDB=
RHI="-vulkan"
OPTS=`getopt -o h --long help,build,rebuild,launch,clean,hard-clean,gdb,opengl,carsim,pytorch,chrono,editor-flags: -n 'parse-options' -- "$@"`
OPTS=`getopt -o h --long help,build,rebuild,launch,clean,hard-clean,gdb,opengl,carsim,pytorch,chrono,no-unity,editor-flags: -n 'parse-options' -- "$@"`
eval set -- "$OPTS"
@ -62,6 +65,9 @@ while [[ $# -gt 0 ]]; do
--pytorch )
USE_PYTORCH=true;
shift ;;
--no-unity )
USE_UNITY=false
shift ;;
--with-houdini )
USE_HOUDINI=true;
shift ;;
@ -166,6 +172,11 @@ if ${BUILD_CARLAUE4} ; then
else
OPTIONAL_MODULES_TEXT="Pytorch OFF"$'\n'"${OPTIONAL_MODULES_TEXT}"
fi
if ${USE_UNITY} ; then
OPTIONAL_MODULES_TEXT="Unity ON"$'\n'"${OPTIONAL_MODULES_TEXT}"
else
OPTIONAL_MODULES_TEXT="Unity OFF"$'\n'"${OPTIONAL_MODULES_TEXT}"
fi
echo ${OPTIONAL_MODULES_TEXT} > ${PWD}/Config/OptionalModules.ini
if [ ! -f Makefile ]; then

View File

@ -26,6 +26,7 @@ launch-only:
@"${CARLA_BUILD_TOOLS_FOLDER}/BuildCarlaUE4.bat" --launch $(ARGS)
package: PythonAPI
@"${CARLA_BUILD_TOOLS_FOLDER}/BuildCarlaUE4.bat" --at-least-write-optionalmodules $(ARGS)
@"${CARLA_BUILD_TOOLS_FOLDER}/Package.bat" --ue-version 4.26 $(ARGS)
.PHONY: docs