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/// 序列化并发送当前 UCarlaEpisode 中的所有 Actor。
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
返回允许订阅此流的令牌。
Definition: DataStream.h:52
序列化并发送当前 UCarlaEpisode 中的所有 Actor。
Definition: WorldObserver.h:15
void not_spawnable
Prevent this sensor to be spawned by users.
Definition: WorldObserver.h:19
auto GetToken() const
Return the token that allows subscribing to this sensor's stream.
Definition: WorldObserver.h:28
FTransform GetActorTransform() const
Dummy. Required for compatibility with other sensors only.
Definition: WorldObserver.h:42
void SetStream(FDataMultiStream InStream)
Replace the Stream associated with this sensor.
Definition: WorldObserver.h:22
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
Definition: WorldObserver.h:49