CARLA
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
AObstacleDetectionSensor Class Reference

A sensor to register collisions. More...

#include <ObstacleDetectionSensor.h>

+ Inheritance diagram for AObstacleDetectionSensor:
+ Collaboration diagram for AObstacleDetectionSensor:

Public Member Functions

 AObstacleDetectionSensor (const FObjectInitializer &ObjectInitializer)
 
virtual void PostPhysTick (UWorld *World, ELevelTick TickType, float DeltaSeconds) override
 
void Set (const FActorDescription &Description) override
 
- Public Member Functions inherited from ASensor
 ASensor (const FObjectInitializer &ObjectInitializer)
 
virtual void BeginPlay ()
 
URandomEngineGetRandomEngine ()
 
int32 GetSeed () const
 
auto GetToken () const
 Return the token that allows subscribing to this sensor's stream. More...
 
FDataStream MoveDataStream ()
 
virtual void PrePhysTick (float DeltaSeconds)
 
void SetDataStream (FDataStream InStream)
 Replace the FDataStream associated with this sensor. More...
 
void SetEpisode (const UCarlaEpisode &InEpisode)
 
void SetSeed (int32 InSeed)
 
void Tick (const float DeltaTime) final
 

Static Public Member Functions

static FActorDefinition GetSensorDefinition ()
 

Private Member Functions

void OnObstacleDetectionEvent (AActor *Actor, AActor *OtherActor, float Distance, const FHitResult &Hit)
 

Private Attributes

bool bDebugLineTrace = false
 
bool bOnlyDynamics = false
 
float Distance
 
float HitRadius
 

Additional Inherited Members

- Protected Member Functions inherited from ASensor
void EndPlay (EEndPlayReason::Type EndPlayReason) override
 
template<typename SensorT >
FAsyncDataStream GetDataStream (const SensorT &Self)
 Return the FDataStream associated with this sensor. More...
 
const UCarlaEpisodeGetEpisode () const
 
void PostActorCreated () override
 
- Protected Attributes inherited from ASensor
URandomEngineRandomEngine = nullptr
 Random Engine used to provide noise for sensor output. More...
 
int32 Seed = 123456789
 Seed of the pseudo-random engine. More...
 

Detailed Description

A sensor to register collisions.

Definition at line 18 of file ObstacleDetectionSensor.h.

Constructor & Destructor Documentation

◆ AObstacleDetectionSensor()

AObstacleDetectionSensor::AObstacleDetectionSensor ( const FObjectInitializer &  ObjectInitializer)

Definition at line 16 of file ObstacleDetectionSensor.cpp.

Member Function Documentation

◆ GetSensorDefinition()

FActorDefinition AObstacleDetectionSensor::GetSensorDefinition ( )
static

Definition at line 22 of file ObstacleDetectionSensor.cpp.

References UActorBlueprintFunctionLibrary::MakeObstacleDetectorDefinitions().

+ Here is the call graph for this function:

◆ OnObstacleDetectionEvent()

void AObstacleDetectionSensor::OnObstacleDetectionEvent ( AActor Actor,
AActor OtherActor,
float  Distance,
const FHitResult &  Hit 
)
private

Definition at line 129 of file ObstacleDetectionSensor.cpp.

References ASensor::Episode, ASensor::GetDataStream(), ASensor::GetEpisode(), FAsyncDataStreamTmpl< T >::Send(), and UCarlaEpisode::SerializeActor().

Referenced by PostPhysTick().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PostPhysTick()

void AObstacleDetectionSensor::PostPhysTick ( UWorld *  World,
ELevelTick  TickType,
float  DeltaSeconds 
)
overridevirtual

Reimplemented from ASensor.

Definition at line 53 of file ObstacleDetectionSensor.cpp.

References bDebugLineTrace, bOnlyDynamics, Distance, HitRadius, and OnObstacleDetectionEvent().

+ Here is the call graph for this function:

◆ Set()

void AObstacleDetectionSensor::Set ( const FActorDescription Description)
overridevirtual

Reimplemented from ASensor.

Definition at line 29 of file ObstacleDetectionSensor.cpp.

References bDebugLineTrace, bOnlyDynamics, Distance, HitRadius, UActorBlueprintFunctionLibrary::RetrieveActorAttributeToBool(), UActorBlueprintFunctionLibrary::RetrieveActorAttributeToFloat(), and FActorDescription::Variations.

+ Here is the call graph for this function:

Member Data Documentation

◆ bDebugLineTrace

bool AObstacleDetectionSensor::bDebugLineTrace = false
private

Definition at line 49 of file ObstacleDetectionSensor.h.

Referenced by PostPhysTick(), and Set().

◆ bOnlyDynamics

bool AObstacleDetectionSensor::bOnlyDynamics = false
private

Definition at line 47 of file ObstacleDetectionSensor.h.

Referenced by PostPhysTick(), and Set().

◆ Distance

float AObstacleDetectionSensor::Distance
private

Definition at line 43 of file ObstacleDetectionSensor.h.

Referenced by PostPhysTick(), and Set().

◆ HitRadius

float AObstacleDetectionSensor::HitRadius
private

Definition at line 45 of file ObstacleDetectionSensor.h.

Referenced by PostPhysTick(), and Set().


The documentation for this class was generated from the following files: