CARLA
 
载入中...
搜索中...
未找到
WorldObserver.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
10
11class UCarlaEpisode;
12
13/// Serializes and sends all the actors in the current UCarlaEpisode.
15{
16public:
17
18 /// Prevent this sensor to be spawned by users.
19 using not_spawnable = void;
20
21 /// Replace the Stream associated with this sensor.
23 {
24 Stream = std::move(InStream);
25 }
26
27 /// Return the token that allows subscribing to this sensor's stream.
28 auto GetToken() const
29 {
30 return Stream.GetToken();
31 }
32
33 /// Send a message to every connected client with the info about the given @a
34 /// Episode.
35 void BroadcastTick(
36 const UCarlaEpisode &Episode,
37 float DeltaSeconds,
38 bool MapChange,
39 bool PendingLightUpdate);
40
41 /// Dummy. Required for compatibility with other sensors only.
42 FTransform GetActorTransform() const
43 {
44 return {};
45 }
46
47private:
48
50};
auto GetToken() const
Return the token that allows subscribing to this stream.
Definition DataStream.h:52
Serializes and sends all the actors in the current UCarlaEpisode.
void not_spawnable
Prevent this sensor to be spawned by users.
auto GetToken() const
Return the token that allows subscribing to this sensor's stream.
FTransform GetActorTransform() const
Dummy. Required for compatibility with other sensors only.
void SetStream(FDataMultiStream InStream)
Replace the Stream associated with this sensor.
void BroadcastTick(const UCarlaEpisode &Episode, float DeltaSeconds, bool MapChange, bool PendingLightUpdate)
Send a message to every connected client with the info about the given Episode.
FDataMultiStream Stream
A simulation episode.