8#include "CoreMinimal.h"
9#include "Templates/SharedPointer.h"
10#include "Engine/HitResult.h"
15#include "ROSIntegration/Public/sensor_msgs/PointCloud2.h"
17#include "Radar.generated.h"
19class UNiagaraComponent;
31 ARadar(
const FObjectInitializer& ObjectInitializer);
49 UFUNCTION(BlueprintCallable)
56 UFUNCTION(BlueprintCallable)
57 void SetVisualizeParticles(
bool Visualize);
63 UFUNCTION(BlueprintCallable, BlueprintPure)
66 return RadarParameters;
74 return StructToString(RadarParameters);
79 void BeginPlay()
override;
81 virtual void Tick(
float DeltaTime)
override;
83 virtual void EndPlay(
const EEndPlayReason::Type EndPlayReason)
override;
88 UNiagaraComponent* NiagaraComponent;
90 bool VisualizeParticles = false;
93 TArray<FVector> HitLocations;
101 void CalculateCurrentVelocity(const
float DeltaTime);
103 void SimulateRadar(
float DeltaTime);
105 float CalculateRelativeVelocity(const FHitResult& OutHit, const FVector& RadarLocation, const FVector ActorVelocity);
107 FVector CurrentVelocity;
110 FVector PrevLocation;
134 UWorld* World =
nullptr;
136 bool RadarParametersChanged =
false;
virtual ESensorTypes GetSensorType() const override
std::vector< RayData > Rays
TSharedPtr< ROSMessages::sensor_msgs::PointCloud2 > RadarMessage
std::vector< FRadarDetection > detections
virtual FString GetParametersAsString() const override
FVector2D AzimuthAndElevation