CARLA
 
载入中...
搜索中...
未找到
RayCastLidar.h
浏览该文件的文档.
1// Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
7#pragma once
8
9
12#include "Carla/Sensor/Sensor.h"
15
19
20#include "RayCastLidar.generated.h"
21
22/// 一个基于光线投射的激光雷达传感器类。
23UCLASS()
24class CARLA_API ARayCastLidar : public ARayCastSemanticLidar
25{
26 GENERATED_BODY()
27
28 using FLidarData = carla::sensor::data::LidarData;
29 using FDetection = carla::sensor::data::LidarDetection;
30
31public:
32 static FActorDefinition GetSensorDefinition();
33
34 ARayCastLidar(const FObjectInitializer &ObjectInitializer);
35 virtual void Set(const FActorDescription &Description) override;
36 virtual void Set(const FLidarDescription &LidarDescription) override;
37
38 virtual void PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaTime);
39
40private:
41 /// 计算激光点的接收强度
42 float ComputeIntensity(const FSemanticDetection& RawDetection) const;
43 FDetection ComputeDetection(const FHitResult& HitInfo, const FTransform& SensorTransf) const;
44
45 void PreprocessRays(uint32_t Channels, uint32_t MaxPointsPerChannel) override;
46 bool PostprocessDetection(FDetection& Detection) const;
47
48 void ComputeAndSaveDetections(const FTransform& SensorTransform) override;
49
50 FLidarData LidarData;
51
52 /// 启用/禁用激光雷达点的掉落效果
53 bool DropOffGenActive;
54
55 /// 激光点强度的衰减斜率,通过衰减限制和零强度衰减来计算
56 /// 点的强度保持概率为 alpha * 强度 + beta,其中
57 /// alpha = (1 - dropoff_zero_intensity) / droppoff_limit
58 /// beta = (1 - dropoff_zero_intensity)
59 float DropOffAlpha;
60 float DropOffBeta;
61};
sode override
Definition ActorData.h:280
TSharedPtr< const FActorInfo > carla::rpc::ActorState UWorld * World
一个基于光线投射的激光雷达传感器类。
carla::sensor::data::LidarData FLidarData
carla::sensor::data::LidarDetection FDetection
A ray-cast based Lidar sensor.
Helper class to store and serialize the data generated by a RawLidar.
CARLA模拟器的主命名空间。
Definition Carla.cpp:139