8#include "CoreMinimal.h"
9#include "EngineMinimal.h"
10#include "Kismet/BlueprintFunctionLibrary.h"
11#include "JsonObjectConverter.h"
12#include "Dom/JsonObject.h"
13#include "JsonUtilities.h"
19#include "SimulatorJsonExporter.generated.h"
52 UFUNCTION(BlueprintCallable, Category =
"ROS JSON Utilities")
53 static FString ExportInstancedActorsToJSON(FString FileName,
const TArray<AInstancedActor*>& Actors);
64 UFUNCTION(BlueprintCallable, Category =
"ROS JSON Utilities")
65 static FString ExportVehicleAndSensorsToJSON(FString FileName,
AVehicle*
Vehicle,
bool OverrideTransform =
false,
const FTransform&
Transform = FTransform());
73 UFUNCTION(BlueprintCallable, Category =
"ROS JSON Utilities")
74 static FString ExportWeatherToJSON(
const FString& FileName,
const FWeatherParameters& WeatherParameters);
82 UFUNCTION(BlueprintCallable, Category =
"ROS JSON Utilities")
83 static FString ExportWalkerToJSON(
const FString& FileName,
AWalker*
Walker);
92 UFUNCTION(BlueprintCallable, Category =
"ROS JSON Utilities")
93 static FString ExportSensorToJSON(
const FString& FileName,
ASensor* Sensor);
97 static TArray<TSharedPtr<FJsonValue>> ParseLidars(
const TArray<ALidar*>& Lidars);
99 static TArray<TSharedPtr<FJsonValue>> ParseCameras(
const TArray<ACamera*>& Cameras);
101 static TArray<TSharedPtr<FJsonValue>> ParseDepthCameras(
const TArray<ADepthCamera*>& DepthCameras);
103 static TArray<TSharedPtr<FJsonValue>> ParseThermalCameras(
const TArray<AThermalCamera*>& ThermalCameras);
105 static TArray<TSharedPtr<FJsonValue>> ParseDVSCameras(
const TArray<ADVSCamera*>& DVSCameras);
107 static TArray<TSharedPtr<FJsonValue>> ParseRadars(
const TArray<ARadar*>& Radars);
109 static TSharedPtr<FJsonObject> CreateSensorJSONObject(
const ASensor* SensorPtr, FString SensorName);
111 static TSharedPtr<FJsonObject> CameraParametersToJSONObject(
const FCameraBaseParameters& Parameters);
113 static void SetSpawnPoint(TSharedPtr<FJsonObject>& ObjectEntry,
const FVector& Location,
const FRotator& Rotation,
const FVector& Scale);
121 static FString CreateUniqueFilePath(FString FileName);