CARLA
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | Private 属性 | 所有成员列表
ACollisionSensor类 参考

A sensor to register collisions. 更多...

#include <CollisionSensor.h>

+ 类 ACollisionSensor 继承关系图:
+ ACollisionSensor 的协作图:

Public 成员函数

 ACollisionSensor (const FObjectInitializer &ObjectInitializer)
 
void OnActorCollisionEvent (AActor *Actor, AActor *OtherActor, FVector NormalImpulse, const FHitResult &Hit)
 
void OnCollisionEvent (AActor *Actor, AActor *OtherActor, FVector NormalImpulse, const FHitResult &Hit)
 
void OnComponentCollisionEvent (UPrimitiveComponent *HitComp, AActor *OtherActor, UPrimitiveComponent *OtherComp, FVector NormalImpulse, const FHitResult &Hit)
 
virtual void PrePhysTick (float DeltaSeconds) override
 
void SetOwner (AActor *NewOwner) override
 
- Public 成员函数 继承自 ASensor
 ASensor (const FObjectInitializer &ObjectInitializer)
 
virtual void BeginPlay ()
 
boost::optional< FActorAttributeGetAttribute (const FString Name)
 
const UCarlaEpisodeGetEpisode () const
 
URandomEngineGetRandomEngine ()
 
int32 GetSeed () const
 
auto GetToken () const
 Return the token that allows subscribing to this sensor's stream.
 
bool IsStreamReady ()
 
FDataStream MoveDataStream ()
 
virtual void OnFirstClientConnected ()
 
virtual void OnLastClientDisconnected ()
 
virtual void PostPhysTick (UWorld *World, ELevelTick TickType, float DeltaSeconds)
 
void PostPhysTickInternal (UWorld *World, ELevelTick TickType, float DeltaSeconds)
 
virtual void Set (const FActorDescription &Description)
 
void SetDataStream (FDataStream InStream)
 Replace the FDataStream associated with this sensor.
 
void SetEpisode (const UCarlaEpisode &InEpisode)
 
void SetSeed (int32 InSeed)
 
void Tick (const float DeltaTime) final
 

静态 Public 成员函数

static FActorDefinition GetSensorDefinition ()
 

Private 属性

std::vector< std::tuple< uint64_t, AActor *, AActor * > > CollisionRegistry
 Registry that saves all collisions.
 

额外继承的成员函数

- Protected 成员函数 继承自 ASensor
void EndPlay (EEndPlayReason::Type EndPlayReason) override
 
template<typename SensorT >
FAsyncDataStream GetDataStream (const SensorT &Self)
 Return the FDataStream associated with this sensor.
 
void PostActorCreated () override
 
- Protected 属性 继承自 ASensor
bool bIsActive = false
 
URandomEngineRandomEngine = nullptr
 Random Engine used to provide noise for sensor output.
 
int32 Seed = 123456789
 Seed of the pseudo-random engine.
 

详细描述

A sensor to register collisions.

在文件 CollisionSensor.h19 行定义.

构造及析构函数说明

◆ ACollisionSensor()

ACollisionSensor::ACollisionSensor ( const FObjectInitializer & ObjectInitializer)

在文件 CollisionSensor.cpp20 行定义.

成员函数说明

◆ GetSensorDefinition()

FActorDefinition ACollisionSensor::GetSensorDefinition ( )
static

在文件 CollisionSensor.cpp26 行定义.

引用了 UActorBlueprintFunctionLibrary::MakeGenericSensorDefinition().

+ 函数调用图:

◆ OnActorCollisionEvent()

void ACollisionSensor::OnActorCollisionEvent ( AActor * Actor,
AActor * OtherActor,
FVector NormalImpulse,
const FHitResult & Hit )

在文件 CollisionSensor.cpp153 行定义.

引用了 OnCollisionEvent().

被这些函数引用 SetOwner().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ OnCollisionEvent()

void ACollisionSensor::OnCollisionEvent ( AActor * Actor,
AActor * OtherActor,
FVector NormalImpulse,
const FHitResult & Hit )

在文件 CollisionSensor.cpp80 行定义.

引用了 Collision, CollisionRegistry, carla::streaming::detail::token_type::get_stream_id(), ASensor::GetDataStream(), ASensor::GetEpisode(), FCarlaEngine::GetFrameCounter(), carla::ros2::ROS2::GetInstance(), ASensor::GetToken(), IsValid() , 以及 FAsyncDataStreamTmpl< T >::SerializeAndSend().

被这些函数引用 OnActorCollisionEvent() , 以及 OnComponentCollisionEvent().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ OnComponentCollisionEvent()

void ACollisionSensor::OnComponentCollisionEvent ( UPrimitiveComponent * HitComp,
AActor * OtherActor,
UPrimitiveComponent * OtherComp,
FVector NormalImpulse,
const FHitResult & Hit )

在文件 CollisionSensor.cpp162 行定义.

引用了 OnCollisionEvent().

被这些函数引用 SetOwner().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ PrePhysTick()

void ACollisionSensor::PrePhysTick ( float DeltaSeconds)
overridevirtual

重载 ASensor .

在文件 CollisionSensor.cpp64 行定义.

引用了 CollisionRegistry , 以及 FCarlaEngine::GetFrameCounter().

+ 函数调用图:

◆ SetOwner()

void ACollisionSensor::SetOwner ( AActor * NewOwner)
override
待办事项
Deregister previous owner if there was one.

在文件 CollisionSensor.cpp33 行定义.

引用了 IsValid(), OnActorCollisionEvent(), OnComponentCollisionEvent() , 以及 Vehicle.

+ 函数调用图:

类成员变量说明

◆ CollisionRegistry

std::vector<std::tuple<uint64_t, AActor*, AActor*> > ACollisionSensor::CollisionRegistry
private

Registry that saves all collisions.

Used to avoid sending the same collision more than once per frame, as the collision sensor uses the PhysX substepping tick. Helps with sensor usage and stream overload.

在文件 CollisionSensor.h57 行定义.

被这些函数引用 OnCollisionEvent() , 以及 PrePhysTick().


该类的文档由以下文件生成: