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/// A ray-cast based Lidar sensor.
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 /// Compute the received intensity of the point
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 /// Enable/Disable general dropoff of lidar points
53 bool DropOffGenActive;
54
55 /// Slope for the intensity dropoff of lidar points, it is calculated
56 /// throught the dropoff limit and the dropoff at zero intensity
57 /// The points is kept with a probality alpha*Intensity + beta where
58 /// alpha = (1 - dropoff_zero_intensity) / droppoff_limit
59 /// beta = (1 - dropoff_zero_intensity)
60 float DropOffAlpha;
61 float DropOffBeta;
62};
A ray-cast based Lidar sensor.
A ray-cast based Lidar sensor.
Helper class to store and serialize the data generated by a Lidar.
Definition LidarData.h:52
Helper class to store and serialize the data generated by a RawLidar.
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133
A definition of a Carla Actor with all the variation and attributes.
A description of a Carla Actor with all its variation.