A ray-cast based Lidar sensor. 更多...
#include <RayCastLidar.h>
Public 成员函数 | |
ARayCastLidar (const FObjectInitializer &ObjectInitializer) | |
virtual void | PostPhysTick (UWorld *World, ELevelTick TickType, float DeltaTime) |
virtual void | Set (const FActorDescription &Description) override |
virtual void | Set (const FLidarDescription &LidarDescription) override |
Public 成员函数 继承自 ARayCastSemanticLidar | |
ARayCastSemanticLidar (const FObjectInitializer &ObjectInitializer) | |
Public 成员函数 继承自 ASensor | |
ASensor (const FObjectInitializer &ObjectInitializer) | |
virtual void | BeginPlay () |
boost::optional< FActorAttribute > | GetAttribute (const FString Name) |
const UCarlaEpisode & | GetEpisode () const |
URandomEngine * | GetRandomEngine () |
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 () |
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) |
void | SetSeed (int32 InSeed) |
void | Tick (const float DeltaTime) final |
静态 Public 成员函数 | |
static FActorDefinition | GetSensorDefinition () |
静态 Public 成员函数 继承自 ARayCastSemanticLidar | |
static FActorDefinition | GetSensorDefinition () |
Private 类型 | |
using | FDetection = carla::sensor::data::LidarDetection |
using | FLidarData = carla::sensor::data::LidarData |
Private 成员函数 | |
void | ComputeAndSaveDetections (const FTransform &SensorTransform) override |
This method uses all the saved FHitResults, compute the RawDetections and then send it to the LidarData structure. | |
FDetection | ComputeDetection (const FHitResult &HitInfo, const FTransform &SensorTransf) const |
float | ComputeIntensity (const FSemanticDetection &RawDetection) const |
Compute the received intensity of the point | |
bool | PostprocessDetection (FDetection &Detection) const |
void | PreprocessRays (uint32_t Channels, uint32_t MaxPointsPerChannel) override |
Method that allow to preprocess if the rays will be traced. | |
Private 属性 | |
float | DropOffAlpha |
Slope for the intensity dropoff of lidar points, it is calculated throught the dropoff limit and the dropoff at zero intensity The points is kept with a probality alpha*Intensity + beta where alpha = (1 - dropoff_zero_intensity) / droppoff_limit beta = (1 - dropoff_zero_intensity) | |
float | DropOffBeta |
bool | DropOffGenActive |
Enable/Disable general dropoff of lidar points | |
FLidarData | LidarData |
额外继承的成员函数 | |
Protected 类型 继承自 ARayCastSemanticLidar | |
using | FSemanticDetection = carla::sensor::data::SemanticLidarDetection |
using | FSemanticLidarData = carla::sensor::data::SemanticLidarData |
Protected 成员函数 继承自 ARayCastSemanticLidar | |
void | ComputeRawDetection (const FHitResult &HitInfo, const FTransform &SensorTransf, FSemanticDetection &Detection) const |
Compute all raw detection information | |
void | CreateLasers () |
Creates a Laser for each channel. | |
void | ResetRecordedHits (uint32_t Channels, uint32_t MaxPointsPerChannel) |
Clear the recorded data structure | |
bool | ShootLaser (const float VerticalAngle, float HorizontalAngle, FHitResult &HitResult, FCollisionQueryParams &TraceParams) const |
Shoot a laser ray-trace, return whether the laser hit something. | |
void | SimulateLidar (const float DeltaTime) |
Updates LidarMeasurement with the points read in DeltaTime. | |
void | WritePointAsync (uint32_t Channel, FHitResult &Detection) |
Saving the hits the raycast returns per channel | |
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 属性 继承自 ARayCastSemanticLidar | |
FLidarDescription | Description |
TArray< float > | LaserAngles |
std::vector< uint32_t > | PointsPerChannel |
std::vector< std::vector< bool > > | RayPreprocessCondition |
std::vector< std::vector< FHitResult > > | RecordedHits |
Protected 属性 继承自 ASensor | |
bool | bIsActive = false |
URandomEngine * | RandomEngine = nullptr |
Random Engine used to provide noise for sensor output. | |
int32 | Seed = 123456789 |
Seed of the pseudo-random engine. | |
A ray-cast based Lidar sensor.
在文件 RayCastLidar.h 第 24 行定义.
|
private |
在文件 RayCastLidar.h 第 29 行定义.
|
private |
在文件 RayCastLidar.h 第 28 行定义.
ARayCastLidar::ARayCastLidar | ( | const FObjectInitializer & | ObjectInitializer | ) |
在文件 RayCastLidar.cpp 第 30 行定义.
引用了 ARayCastSemanticLidar::Description, ASensor::RandomEngine, FLidarDescription::RandomSeed , 以及 ASensor::SetSeed().
|
overrideprivatevirtual |
This method uses all the saved FHitResults, compute the RawDetections and then send it to the LidarData structure.
在文件 RayCastLidar.cpp 第 149 行定义.
引用了 FLidarDescription::Channels, ComputeDetection(), ARayCastSemanticLidar::Description, LidarData, ARayCastSemanticLidar::PointsPerChannel, PostprocessDetection(), ARayCastSemanticLidar::RecordedHits, carla::sensor::data::LidarData::ResetMemory(), carla::sensor::data::SemanticLidarData::WriteChannelCount() , 以及 carla::sensor::data::LidarData::WritePointSync().
|
private |
在文件 RayCastLidar.cpp 第 106 行定义.
引用了 FLidarDescription::AtmospAttenRate, ARayCastSemanticLidar::Description, carla::sensor::data::LidarDetection::intensity, carla::geom::Vector3D::Length() , 以及 carla::sensor::data::LidarDetection::point.
被这些函数引用 ComputeAndSaveDetections().
|
private |
Compute the received intensity of the point
在文件 RayCastLidar.cpp 第 93 行定义.
引用了 FLidarDescription::AtmospAttenRate, ARayCastSemanticLidar::Description, carla::geom::Vector3D::Length() , 以及 carla::sensor::data::SemanticLidarDetection::point.
|
static |
|
virtual |
在文件 RayCastLidar.cpp 第 58 行定义.
引用了 carla::streaming::detail::token_type::get_stream_id(), ASensor::GetDataStream(), carla::ros2::ROS2::GetInstance(), ASensor::GetToken(), LidarData, PostPhysTick() , 以及 ARayCastSemanticLidar::SimulateLidar().
被这些函数引用 PostPhysTick().
|
private |
在文件 RayCastLidar.cpp 第 134 行定义.
引用了 ARayCastSemanticLidar::Description, DropOffAlpha, DropOffBeta, FLidarDescription::DropOffIntensityLimit, URandomEngine::GetNormalDistribution(), URandomEngine::GetUniformFloat(), carla::sensor::data::LidarDetection::intensity, carla::geom::Vector3D::MakeUnitVector(), FLidarDescription::NoiseStdDev, carla::sensor::data::LidarDetection::point , 以及 ASensor::RandomEngine.
被这些函数引用 ComputeAndSaveDetections().
|
overrideprivatevirtual |
Method that allow to preprocess if the rays will be traced.
在文件 RayCastLidar.cpp 第 124 行定义.
引用了 ARayCastSemanticLidar::Description, DropOffGenActive, FLidarDescription::DropOffGenRate, URandomEngine::GetUniformFloat(), ASensor::RandomEngine , 以及 ARayCastSemanticLidar::RayPreprocessCondition.
|
overridevirtual |
在文件 RayCastLidar.cpp 第 37 行定义.
引用了 ASensor::Set(), Set() , 以及 UActorBlueprintFunctionLibrary::SetLidar().
被这些函数引用 Set().
|
overridevirtual |
在文件 RayCastLidar.cpp 第 45 行定义.
引用了 FLidarDescription::Channels, ARayCastSemanticLidar::CreateLasers(), ARayCastSemanticLidar::Description, DropOffAlpha, FLidarDescription::DropOffAtZeroIntensity, DropOffBeta, DropOffGenActive, FLidarDescription::DropOffGenRate, FLidarDescription::DropOffIntensityLimit, LidarData , 以及 ARayCastSemanticLidar::PointsPerChannel.
|
private |
Slope for the intensity dropoff of lidar points, it is calculated throught the dropoff limit and the dropoff at zero intensity The points is kept with a probality alpha*Intensity + beta where alpha = (1 - dropoff_zero_intensity) / droppoff_limit beta = (1 - dropoff_zero_intensity)
在文件 RayCastLidar.h 第 60 行定义.
被这些函数引用 PostprocessDetection() , 以及 Set().
|
private |
在文件 RayCastLidar.h 第 61 行定义.
被这些函数引用 PostprocessDetection() , 以及 Set().
|
private |
Enable/Disable general dropoff of lidar points
在文件 RayCastLidar.h 第 53 行定义.
被这些函数引用 PreprocessRays() , 以及 Set().
|
private |
在文件 RayCastLidar.h 第 50 行定义.
被这些函数引用 ComputeAndSaveDetections(), PostPhysTick() , 以及 Set().