CARLA
载入中...
搜索中...
未找到
Unreal
CarlaUE4
Plugins
Carla
Source
Carla
Sensor
ObstacleDetectionSensor.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
#include "
Carla/Sensor/Sensor.h
"
10
#include "
Carla/Actor/ActorDefinition.h
"
11
#include "
Carla/Actor/ActorDescription.h
"
12
#include "ObstacleDetectionSensor.generated.h"
13
14
class
UCarlaEpisode
;
15
16
/// A sensor to register collisions.
17
UCLASS()
18
class CARLA_API
AObstacleDetectionSensor
: public
ASensor
19
{
20
GENERATED_BODY()
21
22
public
:
23
24
static
FActorDefinition
GetSensorDefinition();
25
26
AObstacleDetectionSensor
(
const
FObjectInitializer &ObjectInitializer);
27
28
void
Set(
const
FActorDescription
&Description)
override
;
29
30
virtual
void
PostPhysTick(UWorld *World, ELevelTick TickType,
float
DeltaSeconds)
override
;
31
32
private
:
33
34
UFUNCTION()
35
void
OnObstacleDetectionEvent(
36
AActor
*Actor,
37
AActor
*OtherActor,
38
float
Distance,
39
const
FHitResult &Hit);
40
41
private
:
42
43
float
Distance
;
44
45
float
HitRadius
;
46
47
bool
bOnlyDynamics =
false
;
48
49
bool
bDebugLineTrace =
false
;
50
};
ActorDefinition.h
ActorDescription.h
Sensor.h
AActor
AObstacleDetectionSensor
A sensor to register collisions.
Definition
ObstacleDetectionSensor.h:19
AObstacleDetectionSensor::HitRadius
float HitRadius
Definition
ObstacleDetectionSensor.h:45
AObstacleDetectionSensor::Distance
float Distance
Definition
ObstacleDetectionSensor.h:43
ASensor
Base class for sensors.
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/Sensor.h:24
UCarlaEpisode
A simulation episode.
Definition
CarlaEpisode.h:39
FActorDefinition
A definition of a Carla Actor with all the variation and attributes.
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Actor/ActorDefinition.h:18
FActorDescription
A description of a Carla Actor with all its variation.
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Actor/ActorDescription.h:16
制作者
1.10.0