CARLA
 
载入中...
搜索中...
未找到
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
12#include "ObstacleDetectionSensor.generated.h"
13
14class UCarlaEpisode;
15
16/// A sensor to register collisions.
17UCLASS()
18class CARLA_API AObstacleDetectionSensor : public ASensor
19{
20 GENERATED_BODY()
21
22public:
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
32private:
33
34 UFUNCTION()
35 void OnObstacleDetectionEvent(
36 AActor *Actor,
37 AActor *OtherActor,
38 float Distance,
39 const FHitResult &Hit);
40
41private:
42
43 float Distance;
44
45 float HitRadius;
46
47 bool bOnlyDynamics = false;
48
49 bool bDebugLineTrace = false;
50};
A sensor to register collisions.
A simulation episode.
A definition of a Carla Actor with all the variation and attributes.
A description of a Carla Actor with all its variation.