CARLA
 
载入中...
搜索中...
未找到
ActorData.h
浏览该文件的文档.
1// Copyright (c) 2021 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 "Actor/ActorInfo.h"
10#include "Math/DVector.h"
19
23
24class UCarlaEpisode;
26class FCarlaActor;
27
29{
30public:
31
33
34 FQuat Rotation;
35
36 FVector Scale;
37
38 FVector Velocity;
39
40 FVector AngularVelocity = FVector(0,0,0);
41
42 bool bSimulatePhysics = false;
43
44 virtual void RecordActorData(FCarlaActor* CarlaActor, UCarlaEpisode* CarlaEpisode);
45
46 virtual void RestoreActorData(FCarlaActor* CarlaActor, UCarlaEpisode* CarlaEpisode);
47
48 virtual AActor* RespawnActor(UCarlaEpisode* CarlaEpisode, const FActorInfo& Info);
49
50 FTransform GetLocalTransform(UCarlaEpisode* CarlaEpisode) const;
51
52 virtual ~FActorData(){};
53};
54
79
80class FWalkerData : public FActorData
81{
82public:
83
85
86 bool bAlive = true;
87
88 virtual void RecordActorData(FCarlaActor* CarlaActor, UCarlaEpisode* CarlaEpisode) override;
89
90 virtual void RestoreActorData(FCarlaActor* CarlaActor, UCarlaEpisode* CarlaEpisode) override;
91};
92
94{
95public:
96 FString SignId;
97
98 TSubclassOf<AActor> Model;
99
100 TSubclassOf<UObject> SignModel;
101
102 virtual AActor* RespawnActor(UCarlaEpisode* CarlaEpisode, const FActorInfo& Info) override;
103
104 virtual void RecordActorData(FCarlaActor* CarlaActor, UCarlaEpisode* CarlaEpisode) override;
105
106 virtual void RestoreActorData(FCarlaActor* CarlaActor, UCarlaEpisode* CarlaEpisode) override;
107};
108
110{
111public:
112
114
116
117 FString SignId;
118
119 TSubclassOf<AActor> Model;
120
122
123 virtual AActor* RespawnActor(UCarlaEpisode* CarlaEpisode, const FActorInfo& Info) override;
124
125 virtual void RecordActorData(FCarlaActor* CarlaActor, UCarlaEpisode* CarlaEpisode) override;
126
127 virtual void RestoreActorData(FCarlaActor* CarlaActor, UCarlaEpisode* CarlaEpisode) override;
128
129};
130
132{
133public:
134
136
137 virtual void RecordActorData(FCarlaActor* CarlaActor, UCarlaEpisode* CarlaEpisode) override;
138
139 virtual void RestoreActorData(FCarlaActor* CarlaActor, UCarlaEpisode* CarlaEpisode) override;
140};
virtual ~FActorData()
Definition ActorData.h:52
virtual void RecordActorData(FCarlaActor *CarlaActor, UCarlaEpisode *CarlaEpisode)
Definition ActorData.cpp:30
virtual AActor * RespawnActor(UCarlaEpisode *CarlaEpisode, const FActorInfo &Info)
Definition ActorData.cpp:22
FQuat Rotation
Definition ActorData.h:34
virtual void RestoreActorData(FCarlaActor *CarlaActor, UCarlaEpisode *CarlaEpisode)
Definition ActorData.cpp:46
FVector Velocity
Definition ActorData.h:38
bool bSimulatePhysics
Definition ActorData.h:42
FTransform GetLocalTransform(UCarlaEpisode *CarlaEpisode) const
Definition ActorData.cpp:83
FVector Scale
Definition ActorData.h:36
FDVector Location
Definition ActorData.h:32
FDataStream Stream
Definition ActorData.h:135
virtual void RestoreActorData(FCarlaActor *CarlaActor, UCarlaEpisode *CarlaEpisode) override
virtual void RecordActorData(FCarlaActor *CarlaActor, UCarlaEpisode *CarlaEpisode) override
A view over an actor and its properties.
Definition CarlaActor.h:25
virtual void RestoreActorData(FCarlaActor *CarlaActor, UCarlaEpisode *CarlaEpisode) override
ETrafficLightState LightState
Definition ActorData.h:115
UTrafficLightController * Controller
Definition ActorData.h:113
virtual void RecordActorData(FCarlaActor *CarlaActor, UCarlaEpisode *CarlaEpisode) override
TSubclassOf< AActor > Model
Definition ActorData.h:119
virtual AActor * RespawnActor(UCarlaEpisode *CarlaEpisode, const FActorInfo &Info) override
virtual void RecordActorData(FCarlaActor *CarlaActor, UCarlaEpisode *CarlaEpisode) override
TSubclassOf< UObject > SignModel
Definition ActorData.h:100
virtual AActor * RespawnActor(UCarlaEpisode *CarlaEpisode, const FActorInfo &Info) override
TSubclassOf< AActor > Model
Definition ActorData.h:98
virtual void RestoreActorData(FCarlaActor *CarlaActor, UCarlaEpisode *CarlaEpisode) override
bool bAckermannControlActive
Definition ActorData.h:65
virtual void RecordActorData(FCarlaActor *CarlaActor, UCarlaEpisode *CarlaEpisode) override
Definition ActorData.cpp:89
FVehicleLightState LightState
Definition ActorData.h:69
FVehicleControl Control
Definition ActorData.h:61
float SpeedLimit
Definition ActorData.h:71
virtual void RestoreActorData(FCarlaActor *CarlaActor, UCarlaEpisode *CarlaEpisode) override
carla::rpc::VehicleFailureState FailureState
Definition ActorData.h:73
FVehicleAckermannControl AckermannControl
Definition ActorData.h:63
FAckermannControllerSettings AckermannControllerSettings
Definition ActorData.h:67
FVehiclePhysicsControl PhysicsControl
Definition ActorData.h:59
carla::rpc::WalkerControl WalkerControl
Definition ActorData.h:84
virtual void RestoreActorData(FCarlaActor *CarlaActor, UCarlaEpisode *CarlaEpisode) override
bool bAlive
Definition ActorData.h:86
virtual void RecordActorData(FCarlaActor *CarlaActor, UCarlaEpisode *CarlaEpisode) override
A simulation episode.
Maps a controller from OpenDrive.
A view over an actor and its properties.
Definition ActorInfo.h:23