A ray-cast based Lidar sensor. 更多...
#include <RayCastSemanticLidar.h>
Public 成员函数 | |
ARayCastSemanticLidar (const FObjectInitializer &ObjectInitializer) | |
virtual void | Set (const FActorDescription &Description) override |
virtual void | Set (const FLidarDescription &LidarDescription) |
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 () |
Protected 类型 | |
using | FSemanticDetection = carla::sensor::data::SemanticLidarDetection |
using | FSemanticLidarData = carla::sensor::data::SemanticLidarData |
Protected 成员函数 | |
virtual void | ComputeAndSaveDetections (const FTransform &SensorTransform) |
This method uses all the saved FHitResults, compute the RawDetections and then send it to the LidarData structure. | |
void | ComputeRawDetection (const FHitResult &HitInfo, const FTransform &SensorTransf, FSemanticDetection &Detection) const |
Compute all raw detection information | |
void | CreateLasers () |
Creates a Laser for each channel. | |
virtual void | PostPhysTick (UWorld *World, ELevelTick TickType, float DeltaTime) override |
virtual void | PreprocessRays (uint32_t Channels, uint32_t MaxPointsPerChannel) |
Method that allow to preprocess if the rays will be traced. | |
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 属性 | |
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. | |
Private 属性 | |
FSemanticLidarData | SemanticLidarData |
A ray-cast based Lidar sensor.
在文件 RayCastSemanticLidar.h 第 25 行定义.
|
protected |
在文件 RayCastSemanticLidar.h 第 32 行定义.
在文件 RayCastSemanticLidar.h 第 31 行定义.
ARayCastSemanticLidar::ARayCastSemanticLidar | ( | const FObjectInitializer & | ObjectInitializer | ) |
在文件 RayCastSemanticLidar.cpp 第 30 行定义.
|
protectedvirtual |
This method uses all the saved FHitResults, compute the RawDetections and then send it to the LidarData structure.
被 ARayCastLidar 重载.
在文件 RayCastSemanticLidar.cpp 第 187 行定义.
引用了 FLidarDescription::Channels, ComputeRawDetection(), Description, PointsPerChannel, RecordedHits, carla::sensor::data::SemanticLidarData::ResetMemory(), SemanticLidarData, carla::sensor::data::SemanticLidarData::WriteChannelCount() , 以及 carla::sensor::data::SemanticLidarData::WritePointSync().
被这些函数引用 SimulateLidar().
|
protected |
Compute all raw detection information
在文件 RayCastSemanticLidar.cpp 第 204 行定义.
引用了 carla::sensor::data::SemanticLidarDetection::cos_inc_angle, FActorRegistry::FindCarlaActor(), FCarlaActor::GetActorId(), UCarlaEpisode::GetActorRegistry(), ASensor::GetEpisode(), carla::sensor::data::SemanticLidarDetection::object_idx, carla::sensor::data::SemanticLidarDetection::object_tag , 以及 carla::sensor::data::SemanticLidarDetection::point.
被这些函数引用 ComputeAndSaveDetections().
|
protected |
Creates a Laser for each channel.
在文件 RayCastSemanticLidar.cpp 第 52 行定义.
引用了 FLidarDescription::Channels, Description, LaserAngles, FLidarDescription::LowerFovLimit , 以及 FLidarDescription::UpperFovLimit.
被这些函数引用 Set() , 以及 ARayCastLidar::Set().
|
static |
在文件 RayCastSemanticLidar.cpp 第 25 行定义.
引用了 UActorBlueprintFunctionLibrary::MakeLidarDefinition().
|
overrideprotectedvirtual |
重载 ASensor .
被 ARayCastLidar 重载.
在文件 RayCastSemanticLidar.cpp 第 68 行定义.
引用了 carla::streaming::detail::token_type::get_stream_id(), ASensor::GetDataStream(), carla::ros2::ROS2::GetInstance(), ASensor::GetToken(), PostPhysTick(), SemanticLidarData , 以及 SimulateLidar().
被这些函数引用 PostPhysTick().
|
protectedvirtual |
Method that allow to preprocess if the rays will be traced.
被 ARayCastLidar 重载.
在文件 RayCastSemanticLidar.cpp 第 171 行定义.
被这些函数引用 SimulateLidar().
|
protected |
Clear the recorded data structure
在文件 RayCastSemanticLidar.cpp 第 162 行定义.
引用了 RecordedHits.
被这些函数引用 SimulateLidar().
|
overridevirtual |
重载 ASensor .
被 ARayCastLidar 重载.
在文件 RayCastSemanticLidar.cpp 第 36 行定义.
引用了 Set() , 以及 UActorBlueprintFunctionLibrary::SetLidar().
被这些函数引用 Set().
|
virtual |
被 ARayCastLidar 重载.
在文件 RayCastSemanticLidar.cpp 第 44 行定义.
引用了 FLidarDescription::Channels, CreateLasers(), Description, PointsPerChannel , 以及 SemanticLidarData.
|
protected |
Shoot a laser ray-trace, return whether the laser hit something.
在文件 RayCastSemanticLidar.cpp 第 231 行定义.
引用了 Description , 以及 FLidarDescription::Range.
被这些函数引用 SimulateLidar().
|
protected |
Updates LidarMeasurement with the points read in DeltaTime.
在文件 RayCastSemanticLidar.cpp 第 100 行定义.
引用了 FLidarDescription::Channels, ComputeAndSaveDetections(), Description, carla::sensor::data::SemanticLidarData::GetHorizontalAngle(), FLidarDescription::HorizontalFov, LaserAngles, FLidarDescription::PointsPerSecond, PreprocessRays(), RayPreprocessCondition, ResetRecordedHits(), FLidarDescription::RotationFrequency, SemanticLidarData, carla::sensor::data::SemanticLidarData::SetHorizontalAngle(), ShootLaser(), SimulateLidar(), carla::geom::Math::ToDegrees(), carla::geom::Math::ToRadians() , 以及 WritePointAsync().
被这些函数引用 ARayCastLidar::PostPhysTick(), PostPhysTick() , 以及 SimulateLidar().
|
protected |
Saving the hits the raycast returns per channel
在文件 RayCastSemanticLidar.cpp 第 181 行定义.
引用了 DEBUG_ASSERT , 以及 RecordedHits.
被这些函数引用 SimulateLidar().
|
protected |
在文件 RayCastSemanticLidar.h 第 71 行定义.
被这些函数引用 ARayCastLidar::ARayCastLidar(), ComputeAndSaveDetections(), ARayCastLidar::ComputeAndSaveDetections(), ARayCastLidar::ComputeDetection(), ARayCastLidar::ComputeIntensity(), CreateLasers(), ARayCastLidar::PostprocessDetection(), ARayCastLidar::PreprocessRays(), Set(), ARayCastLidar::Set(), ShootLaser() , 以及 SimulateLidar().
|
protected |
在文件 RayCastSemanticLidar.h 第 73 行定义.
被这些函数引用 CreateLasers() , 以及 SimulateLidar().
|
protected |
在文件 RayCastSemanticLidar.h 第 77 行定义.
被这些函数引用 ComputeAndSaveDetections(), ARayCastLidar::ComputeAndSaveDetections(), Set() , 以及 ARayCastLidar::Set().
|
protected |
在文件 RayCastSemanticLidar.h 第 76 行定义.
被这些函数引用 PreprocessRays(), ARayCastLidar::PreprocessRays() , 以及 SimulateLidar().
|
protected |
在文件 RayCastSemanticLidar.h 第 75 行定义.
被这些函数引用 ComputeAndSaveDetections(), ARayCastLidar::ComputeAndSaveDetections(), ResetRecordedHits() , 以及 WritePointAsync().
|
private |
在文件 RayCastSemanticLidar.h 第 80 行定义.
被这些函数引用 ComputeAndSaveDetections(), PostPhysTick(), Set() , 以及 SimulateLidar().