CARLA
Loading...
Searching...
No Matches
AObstacleDetectionSensor Class Reference

A sensor to register collisions. More...

#include <ObstacleDetectionSensor.h>

Inheritance 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
bool AreClientsListening ()
 ASensor (const FObjectInitializer &ObjectInitializer)
virtual void BeginPlay ()
void ClearReadyToTick ()
std::optional< FActorAttribute > GetAttribute (const FString Name)
const UCarlaEpisode & GetEpisode () const
virtual void GetMirrorState (carla::multigpu::SensorState &State) const
 Multi-GPU: the runtime state this sensor starts its next tick from (noise generator, sweep angle, history).
URandomEngine * GetRandomEngine ()
float GetReadyToTickDeltaSeconds () const
int32 GetSeed () const
auto GetToken () const
 Return the token that allows subscribing to this sensor's stream.
bool IsReadyToTick () const
bool IsStreamReady ()
FDataStream MoveDataStream ()
virtual void OnFirstClientConnected ()
virtual void OnLastClientDisconnected ()
void PostPhysTickInternal (UWorld *World, ELevelTick TickType, float DeltaSeconds)
virtual void PrePhysTick (float DeltaSeconds)
void SetDataStream (FDataStream InStream)
 Replace the FDataStream associated with this sensor.
void SetEpisode (const UCarlaEpisode &InEpisode)
virtual void SetMirrorState (const carla::multigpu::SensorState &State)
void SetPrimaryTick (float DeltaSeconds)
 Multi-GPU secondary: tick in this engine frame, with the primary's delta.
void SetSavingDataToDisk (bool bSavingData)
void SetSeed (int32 InSeed)
void Tick (const float DeltaTime) final

Static Public Member Functions

static FActorDefinition GetSensorDefinition ()
Static Public Member Functions inherited from ASensor
static FSensorCaptureContext MakeCaptureContext (const ASensor &Sensor)
 Call on the game thread right after CaptureScene().

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 SensorType>
FAsyncDataStream GetDataStream (SensorType &&Self)
 Return the FDataStream associated with this sensor.
void PostActorCreated () override
Static Protected Member Functions inherited from ASensor
template<typename SensorType, typename ElementType>
static void SendDataToClient (SensorType &&Sensor, TArrayView< ElementType > SensorData, const FSensorCaptureContext &CaptureContext)
Protected Attributes inherited from ASensor
bool bIsActive = false
bool bSavingDataToDisk = false
URandomEngine * RandomEngine = nullptr
 Random Engine used to provide noise for sensor output.
int32 Seed = 123456789
 Seed of the pseudo-random engine.

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 19 of file ObstacleDetectionSensor.cpp.

Member Function Documentation

◆ GetSensorDefinition()

FActorDefinition AObstacleDetectionSensor::GetSensorDefinition ( )
static

◆ OnObstacleDetectionEvent()

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

◆ PostPhysTick()

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

Reimplemented from ASensor.

Definition at line 56 of file ObstacleDetectionSensor.cpp.

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

Referenced by PostPhysTick().

◆ Set()

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: