CARLA
WorldObserver.h
Go to the documentation of this file.
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 
11 class UCarlaEpisode;
12 
13 /// Serializes and sends all the actors in the current UCarlaEpisode.
15 {
16 public:
17 
18  /// Prevent this sensor to be spawned by users.
19  using not_spawnable = void;
20 
21  /// Replace the Stream associated with this sensor.
22  void SetStream(FDataMultiStream InStream)
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 
47 private:
48 
50 };
FDataMultiStream Stream
Definition: WorldObserver.h:49
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.
Serializes and sends all the actors in the current UCarlaEpisode.
Definition: WorldObserver.h:14
void SetStream(FDataMultiStream InStream)
Replace the Stream associated with this sensor.
Definition: WorldObserver.h:22
auto GetToken() const
Return the token that allows subscribing to this sensor&#39;s stream.
Definition: WorldObserver.h:28
A simulation episode.
Definition: CarlaEpisode.h:36
auto GetToken() const
Return the token that allows subscribing to this stream.
Definition: DataStream.h:47
void not_spawnable
Prevent this sensor to be spawned by users.
Definition: WorldObserver.h:19
FTransform GetActorTransform() const
Dummy. Required for compatibility with other sensors only.
Definition: WorldObserver.h:42