CARLA
Toggle main menu visibility
Loading...
Searching...
No Matches
LibCarla
source
carla
rss
LibCarla/source/carla/rss/RssSensor.cpp
Go to the documentation of this file.
1
// Copyright (c) 2019-2020 Intel Corporation
2
//
3
// This work is licensed under the terms of the MIT license.
4
// For a copy, see <https://opensource.org/licenses/MIT>.
5
6
#include "
carla/rss/RssSensor.h
"
7
8
#include <ad/map/access/Operation.hpp>
9
#include <ad/rss/state/ProperResponse.hpp>
10
#include <ad/rss/world/Velocity.hpp>
11
#include <exception>
12
#include <fstream>
13
14
#include "
carla/Logging.h
"
15
#include "
carla/client/Map.h
"
16
#include "
carla/client/Sensor.h
"
17
#include "
carla/client/Vehicle.h
"
18
#include "
carla/client/detail/Simulator.h
"
19
#include "
carla/rss/RssCheck.h
"
20
#include "
carla/sensor/data/RssResponse.h
"
21
22
namespace
carla
{
23
namespace
client
{
24
25
std::atomic_uint
RssSensor::_global_map_initialization_counter_
{0u};
26
27
RssSensor::RssSensor
(
ActorInitializer
init) :
Sensor
(
std
::move(init)),
_on_tick_register_id
(0u),
_drop_route
(false) {}
28
29
RssSensor::~RssSensor
() {
30
// ensure there is no processing anymore
31
if
(
IsListening
()) {
32
Stop
();
33
}
34
}
35
36
void
RssSensor::RegisterActorConstellationCallback
(
ActorConstellationCallbackFunctionType
callback) {
37
if
(
IsListening
()) {
38
log_error(
GetDisplayId
(),
39
": registering of the actor constellation callback has to be done before start listening. Register has "
40
"no effect."
);
41
return
;
42
}
43
_rss_actor_constellation_callback
= callback;
44
}
45
46
void
RssSensor::Listen
(
CallbackFunctionType
callback) {
47
if
(
IsListening
()) {
48
log_error(
GetDisplayId
(),
": already listening"
);
49
return
;
50
}
51
52
if
(
GetParent
() ==
nullptr
) {
53
throw_exception
(std::runtime_error(
GetDisplayId
() +
": not attached to actor"
));
54
return
;
55
}
56
57
auto
vehicle = std::dynamic_pointer_cast<carla::client::Vehicle>(
GetParent
());
58
if
(vehicle ==
nullptr
) {
59
throw_exception
(std::runtime_error(
GetDisplayId
() +
": parent is not a vehicle"
));
60
return
;
61
}
62
63
// get maximum steering angle
64
float
max_steer_angle_deg = 0.f;
65
for
(
auto
const
&wheel : vehicle->GetPhysicsControl().GetWheels()) {
66
max_steer_angle_deg = std::max(max_steer_angle_deg, wheel.max_steer_angle);
67
}
68
auto
max_steering_angle = max_steer_angle_deg *
static_cast<
float
>
(M_PI) / 180.0f;
69
70
auto
map =
GetWorld
().
GetMap
();
71
DEBUG_ASSERT
(map !=
nullptr
);
72
std::string
const
open_drive_content = map->GetOpenDrive();
73
74
auto
mapInitializationResult = ::ad::map::access::initFromOpenDriveContent(
75
open_drive_content, 0.2, ::ad::map::intersection::IntersectionType::TrafficLight,
76
::ad::map::landmark::TrafficLightType::LEFT_STRAIGHT_RED_YELLOW_GREEN);
77
78
if
(!mapInitializationResult) {
79
log_error(
GetDisplayId
(),
": Initialization of map failed"
);
80
return
;
81
}
82
83
_global_map_initialization_counter_
++;
84
85
if
(
_rss_actor_constellation_callback
==
nullptr
) {
86
_rss_check
= std::make_shared<::carla::rss::RssCheck>(max_steering_angle);
87
}
else
{
88
_rss_check
=
89
std::make_shared<::carla::rss::RssCheck>(max_steering_angle,
_rss_actor_constellation_callback
,
GetParent
());
90
}
91
92
auto
self = std::static_pointer_cast<RssSensor>(shared_from_this());
93
94
_last_processed_frame
=0u;
95
log_debug(
GetDisplayId
(),
": subscribing to tick event"
);
96
_on_tick_register_id
=
GetEpisode
().
Lock
()->RegisterOnTickEvent(
97
[ cb = std::move(callback), weak_self =
WeakPtr<RssSensor>
(self) ](
const
auto
&snapshot) {
98
auto
self = weak_self.lock();
99
if
(self !=
nullptr
) {
100
self->TickRssSensor(snapshot.GetTimestamp(), cb);
101
}
102
});
103
}
104
105
void
RssSensor::Stop
() {
106
if
(!
IsListening
()) {
107
log_error(
GetDisplayId
(),
": not listening at all"
);
108
return
;
109
}
110
111
log_debug(
GetDisplayId
(),
": unsubscribing from tick event"
);
112
GetEpisode
().
Lock
()->RemoveOnTickEvent(
_on_tick_register_id
);
113
_on_tick_register_id
= 0u;
114
115
if
(
bool
(
_rss_check
) ) {
116
_rss_check
->GetLogger()->info(
"RssSensor stopping"
);
117
}
118
// don't remove the braces since they protect the scoped_lock
119
{
120
// ensure there is no processing anymore when deleting rss_check object
121
const
std::scoped_lock<std::mutex> lock(
_processing_lock
);
122
123
if
(
bool
(
_rss_check
) ) {
124
_rss_check
->GetLogger()->info(
"RssSensor delete checker"
);
125
}
126
_rss_check
.reset();
127
auto
const
map_initialization_counter_value =
_global_map_initialization_counter_
--;
128
if
(map_initialization_counter_value == 0u) {
129
// last one stop listening is cleaning up the map
130
::ad::map::access::cleanup();
131
}
132
}
133
}
134
135
void
RssSensor::SetLogLevel
(
const
uint8_t &log_level) {
136
if
(!
bool
(
_rss_check
)) {
137
log_error(
GetDisplayId
(),
": not yet listening. SetLogLevel has no effect."
);
138
return
;
139
}
140
141
if
(log_level < spdlog::level::n_levels) {
142
_rss_check
->SetLogLevel(spdlog::level::level_enum(log_level));
143
}
144
}
145
146
void
RssSensor::SetMapLogLevel
(
const
uint8_t &map_log_level) {
147
if
(!
bool
(
_rss_check
)) {
148
log_error(
GetDisplayId
(),
": not yet listening. SetMapLogLevel has no effect."
);
149
return
;
150
}
151
152
if
(map_log_level < spdlog::level::n_levels) {
153
_rss_check
->SetMapLogLevel(spdlog::level::level_enum(map_log_level));
154
}
155
}
156
157
const ::ad::rss::world::RssDynamics &
RssSensor::GetEgoVehicleDynamics
()
const
{
158
static
auto
default_vehicle_dynamics =
rss::RssCheck::GetDefaultVehicleDynamics
();
159
if
(!
bool
(
_rss_check
)) {
160
log_error(
GetDisplayId
(),
": not yet listening. GetEgoVehicleDynamics has no effect."
);
161
return
default_vehicle_dynamics;
162
}
163
164
if
(
bool
(
_rss_actor_constellation_callback
)) {
165
log_error(
GetDisplayId
(),
": Actor constellation callback registered. GetEgoVehicleDynamics has no effect."
);
166
return
default_vehicle_dynamics;
167
}
168
169
return
_rss_check
->GetDefaultActorConstellationCallbackEgoVehicleDynamics();
170
}
171
172
void
RssSensor::SetEgoVehicleDynamics
(const ::ad::rss::world::RssDynamics &ego_dynamics) {
173
if
(!
bool
(
_rss_check
)) {
174
log_error(
GetDisplayId
(),
": not yet listening. SetEgoVehicleDynamics has no effect."
);
175
return
;
176
}
177
178
if
(
bool
(
_rss_actor_constellation_callback
)) {
179
log_error(
GetDisplayId
(),
": Actor constellation callback registered. SetEgoVehicleDynamics has no effect."
);
180
return
;
181
}
182
183
_rss_check
->SetDefaultActorConstellationCallbackEgoVehicleDynamics(ego_dynamics);
184
}
185
186
const ::ad::rss::world::RssDynamics &
RssSensor::GetOtherVehicleDynamics
()
const
{
187
static
auto
default_vehicle_dynamics =
rss::RssCheck::GetDefaultVehicleDynamics
();
188
if
(!
bool
(
_rss_check
)) {
189
log_error(
GetDisplayId
(),
": not yet listening. GetOtherVehicleDynamics has no effect."
);
190
return
default_vehicle_dynamics;
191
}
192
193
if
(
bool
(
_rss_actor_constellation_callback
)) {
194
log_error(
GetDisplayId
(),
": Actor constellation callback registered. GetOtherVehicleDynamics has no effect."
);
195
return
default_vehicle_dynamics;
196
}
197
198
return
_rss_check
->GetDefaultActorConstellationCallbackOtherVehicleDynamics();
199
}
200
201
void
RssSensor::SetOtherVehicleDynamics
(const ::ad::rss::world::RssDynamics &other_vehicle_dynamics) {
202
if
(!
bool
(
_rss_check
)) {
203
log_error(
GetDisplayId
(),
": not yet listening. SetOtherVehicleDynamics has no effect."
);
204
return
;
205
}
206
207
if
(
bool
(
_rss_actor_constellation_callback
)) {
208
log_error(
GetDisplayId
(),
": Actor constellation callback registered. SetOtherVehicleDynamics has no effect."
);
209
return
;
210
}
211
212
_rss_check
->SetDefaultActorConstellationCallbackOtherVehicleDynamics(other_vehicle_dynamics);
213
}
214
215
const ::ad::rss::world::RssDynamics &
RssSensor::GetPedestrianDynamics
()
const
{
216
static
auto
default_pedestrian_dynamics =
rss::RssCheck::GetDefaultPedestrianDynamics
();
217
if
(!
bool
(
_rss_check
)) {
218
log_error(
GetDisplayId
(),
": not yet listening. GetPedestrianDynamics has no effect."
);
219
return
default_pedestrian_dynamics;
220
}
221
222
if
(
bool
(
_rss_actor_constellation_callback
)) {
223
log_error(
GetDisplayId
(),
": Actor constellation callback registered. GetPedestrianDynamics has no effect."
);
224
return
default_pedestrian_dynamics;
225
}
226
227
return
_rss_check
->GetDefaultActorConstellationCallbackPedestrianDynamics();
228
}
229
230
void
RssSensor::SetPedestrianDynamics
(const ::ad::rss::world::RssDynamics &pedestrian_dynamics) {
231
if
(!
bool
(
_rss_check
)) {
232
log_error(
GetDisplayId
(),
": not yet listening. SetPedestrianDynamics has no effect."
);
233
return
;
234
}
235
236
if
(
bool
(
_rss_actor_constellation_callback
)) {
237
log_error(
GetDisplayId
(),
": Actor constellation callback registered. SetPedestrianDynamics has no effect."
);
238
return
;
239
}
240
241
_rss_check
->SetDefaultActorConstellationCallbackPedestrianDynamics(pedestrian_dynamics);
242
}
243
244
const ::carla::rss::RoadBoundariesMode &
RssSensor::GetRoadBoundariesMode
()
const
{
245
if
(!
bool
(
_rss_check
)) {
246
log_error(
GetDisplayId
(),
": not yet listening. GetRoadBoundariesMode has no effect."
);
247
static
auto
default_road_boundaries_mode =
rss::RssCheck::GetDefaultRoadBoundariesMode
();
248
return
default_road_boundaries_mode;
249
}
250
251
return
_rss_check
->GetRoadBoundariesMode();
252
}
253
254
void
RssSensor::SetRoadBoundariesMode
(const ::carla::rss::RoadBoundariesMode &road_boundaries_mode) {
255
if
(!
bool
(
_rss_check
)) {
256
log_error(
GetDisplayId
(),
": not yet listening. SetRoadBoundariesMode has no effect."
);
257
return
;
258
}
259
260
_rss_check
->SetRoadBoundariesMode(road_boundaries_mode);
261
}
262
263
void
RssSensor::AppendRoutingTarget
(const ::carla::geom::Transform &routing_target) {
264
if
(!
bool
(
_rss_check
)) {
265
log_error(
GetDisplayId
(),
": not yet listening. AppendRoutingTarget has no effect."
);
266
return
;
267
}
268
269
_rss_check
->AppendRoutingTarget(routing_target);
270
}
271
272
const
std::vector<::carla::geom::Transform>
RssSensor::GetRoutingTargets
()
const
{
273
if
(!
bool
(
_rss_check
)) {
274
log_error(
GetDisplayId
(),
": not yet listening. GetRoutingTargets has no effect."
);
275
return
std::vector<::carla::geom::Transform>();
276
}
277
278
return
_rss_check
->GetRoutingTargets();
279
}
280
281
void
RssSensor::ResetRoutingTargets
() {
282
if
(!
bool
(
_rss_check
)) {
283
log_error(
GetDisplayId
(),
": not yet listening. ResetRoutingTargets has no effect."
);
284
return
;
285
}
286
287
_rss_check
->ResetRoutingTargets();
288
}
289
290
void
RssSensor::DropRoute
() {
291
// don't execute this immediately as it might break calculations completely
292
// postpone to next sensor tick
293
_drop_route
=
true
;
294
}
295
296
void
RssSensor::TickRssSensor
(
const
client::Timestamp
×tamp,
CallbackFunctionType
callback) {
297
if
(
_processing_lock
.try_lock()) {
298
if
(!
bool
(
_rss_check
)){
299
_processing_lock
.unlock();
300
return
;
301
}
302
if
((timestamp.
frame
<
_last_processed_frame
) && ((
_last_processed_frame
- timestamp.
frame
) < 0xffffffffu)) {
303
_processing_lock
.unlock();
304
_rss_check
->GetLogger()->warn(
"RssSensor[{}] outdated tick dropped, LastProcessed={}"
, timestamp.
frame
,
_last_processed_frame
);
305
return
;
306
}
307
_last_processed_frame
= timestamp.
frame
;
308
SharedPtr<carla::client::ActorList>
actors =
GetWorld
().
GetActors
();
309
310
auto
const
settings =
GetWorld
().
GetSettings
();
311
if
( settings.synchronous_mode ) {
312
_rss_check
->GetLogger()->info(
"RssSensor[{}] sync-tick"
, timestamp.
frame
);
313
TickRssSensorThreadLocked
(timestamp, actors, callback);
314
}
315
else
{
316
// store the future to prevent the destructor of the future from blocked waiting
317
_rss_check
->GetLogger()->info(
"RssSensor[{}] async-tick"
, timestamp.
frame
);
318
_tick_future
= std::async(&
RssSensor::TickRssSensorThreadLocked
,
this
, timestamp, actors, callback);
319
}
320
}
else
{
321
if
(
bool
(
_rss_check
)){
322
_rss_check
->GetLogger()->info(
"RssSensor[{}] tick dropped"
, timestamp.
frame
);
323
}
324
}
325
}
326
327
void
RssSensor::TickRssSensorThreadLocked
(
const
client::Timestamp
×tamp,
328
SharedPtr<carla::client::ActorList>
actors,
CallbackFunctionType
callback) {
329
try
{
330
double
const
time_since_epoch_check_start_ms =
331
std::chrono::duration<double, std::milli>(std::chrono::system_clock::now().time_since_epoch()).count();
332
333
if
(
_drop_route
) {
334
_drop_route
=
false
;
335
_rss_check
->DropRoute();
336
}
337
338
// check all object<->ego pairs with RSS and calculate proper response
339
::ad::rss::state::ProperResponse response;
340
::ad::rss::state::RssStateSnapshot rss_state_snapshot;
341
::ad::rss::situation::SituationSnapshot situation_snapshot;
342
::ad::rss::world::WorldModel world_model;
343
carla::rss::EgoDynamicsOnRoute
ego_dynamics_on_route;
344
auto
const
result =
_rss_check
->CheckObjects(timestamp, actors,
GetParent
(), response, rss_state_snapshot,
345
situation_snapshot, world_model, ego_dynamics_on_route);
346
347
double
const
time_since_epoch_check_end_ms =
348
std::chrono::duration<double, std::milli>(std::chrono::system_clock::now().time_since_epoch()).count();
349
auto
const
delta_time_ms = time_since_epoch_check_end_ms - time_since_epoch_check_start_ms;
350
_rss_check
->GetLogger()->debug(
"RssSensor[{}] response: S:{}->E:{} DeltaT:{}"
, timestamp.
frame
,
351
time_since_epoch_check_start_ms, time_since_epoch_check_end_ms,
352
delta_time_ms);
353
_rss_check_timings
.push_back(delta_time_ms);
354
while
(
_rss_check_timings
.size() > 10u) {
355
_rss_check_timings
.pop_front();
356
}
357
double
agv_time=0.;
358
for
(
auto
run_time:
_rss_check_timings
) {
359
agv_time += run_time;
360
}
361
agv_time /=
_rss_check_timings
.size();
362
_rss_check
->GetLogger()->info(
"RssSensor[{}] runtime {} avg {}"
, timestamp.
frame
, delta_time_ms, agv_time);
363
_processing_lock
.unlock();
364
365
callback(MakeShared<sensor::data::RssResponse>(timestamp.
frame
, timestamp.
elapsed_seconds
,
GetTransform
(), result,
366
response, rss_state_snapshot, situation_snapshot, world_model,
367
ego_dynamics_on_route));
368
}
catch
(
const
std::exception &e) {
369
_rss_check
->GetLogger()->error(
"RssSensor[{}] tick exception"
, timestamp.
frame
);
370
_processing_lock
.unlock();
371
}
catch
(...) {
372
_rss_check
->GetLogger()->error(
"RssSensor[{}] tick exception"
, timestamp.
frame
);
373
_processing_lock
.unlock();
374
}
375
}
376
377
}
// namespace client
378
}
// namespace carla
DEBUG_ASSERT
#define DEBUG_ASSERT(predicate)
Definition
Debug.h:66
Sensor.h
RssSensor.h
Logging.h
RssCheck.h
RssResponse.h
Simulator.h
Vehicle.h
carla::client::ActorInitializer
Used to initialize Actor classes.
Definition
client/detail/ActorState.h:112
carla::client::Actor::GetTransform
geom::Transform GetTransform() const
Return the current transform of the actor.
Definition
Actor.cpp:19
carla::client::RssSensor::_last_processed_frame
std::size_t _last_processed_frame
last processed frame
Definition
LibCarla/source/carla/rss/RssSensor.h:156
carla::client::RssSensor::_tick_future
std::future< void > _tick_future
the future for the async ticking thread
Definition
LibCarla/source/carla/rss/RssSensor.h:144
carla::client::RssSensor::ResetRoutingTargets
void ResetRoutingTargets()
resets the current routing target (
Definition
LibCarla/source/carla/rss/RssSensor.cpp:281
carla::client::RssSensor::_on_tick_register_id
std::size_t _on_tick_register_id
the id got when registering for the on tick event
Definition
LibCarla/source/carla/rss/RssSensor.h:138
carla::client::RssSensor::~RssSensor
~RssSensor()
destructor
Definition
LibCarla/source/carla/rss/RssSensor.cpp:29
carla::client::RssSensor::IsListening
bool IsListening() const override
Return whether this Sensor instance is currently listening to the associated sensor in the simulator.
Definition
LibCarla/source/carla/rss/RssSensor.h:77
carla::client::RssSensor::GetOtherVehicleDynamics
const ::ad::rss::world::RssDynamics & GetOtherVehicleDynamics() const
Definition
LibCarla/source/carla/rss/RssSensor.cpp:186
carla::client::RssSensor::SetLogLevel
void SetLogLevel(const uint8_t &log_level)
sets the current log level
Definition
LibCarla/source/carla/rss/RssSensor.cpp:135
carla::client::RssSensor::SetEgoVehicleDynamics
void SetEgoVehicleDynamics(const ::ad::rss::world::RssDynamics &ego_dynamics)
sets the ego vehicle dynamics to be used by the ego vehicle (
Definition
LibCarla/source/carla/rss/RssSensor.cpp:172
carla::client::RssSensor::_rss_check
std::shared_ptr<::carla::rss::RssCheck > _rss_check
Definition
LibCarla/source/carla/rss/RssSensor.h:135
carla::client::RssSensor::DropRoute
void DropRoute()
drop the current route (
Definition
LibCarla/source/carla/rss/RssSensor.cpp:290
carla::client::RssSensor::_global_map_initialization_counter_
static std::atomic_uint _global_map_initialization_counter_
Definition
LibCarla/source/carla/rss/RssSensor.h:158
carla::client::RssSensor::SetPedestrianDynamics
void SetPedestrianDynamics(const ::ad::rss::world::RssDynamics &pedestrian_dynamics)
sets the ego vehicle dynamics to be used by pedestrians (
Definition
LibCarla/source/carla/rss/RssSensor.cpp:230
carla::client::RssSensor::RegisterActorConstellationCallback
void RegisterActorConstellationCallback(ActorConstellationCallbackFunctionType callback)
Register a callback to be executed for each actor within each measurement to be processed to decide o...
Definition
LibCarla/source/carla/rss/RssSensor.cpp:36
carla::client::RssSensor::Stop
void Stop() override
Stop listening for new measurements.
Definition
LibCarla/source/carla/rss/RssSensor.cpp:105
carla::client::RssSensor::GetPedestrianDynamics
const ::ad::rss::world::RssDynamics & GetPedestrianDynamics() const
Definition
LibCarla/source/carla/rss/RssSensor.cpp:215
carla::client::RssSensor::TickRssSensor
void TickRssSensor(const client::Timestamp ×tamp, CallbackFunctionType callback)
the acutal sensor tick callback function
Definition
LibCarla/source/carla/rss/RssSensor.cpp:296
carla::client::RssSensor::SetOtherVehicleDynamics
void SetOtherVehicleDynamics(const ::ad::rss::world::RssDynamics &other_vehicle_dynamics)
sets the ego vehicle dynamics to be used by other vehicles (
Definition
LibCarla/source/carla/rss/RssSensor.cpp:201
carla::client::RssSensor::SetMapLogLevel
void SetMapLogLevel(const uint8_t &map_log_level)
sets the current map log level
Definition
LibCarla/source/carla/rss/RssSensor.cpp:146
carla::client::RssSensor::ActorConstellationCallbackFunctionType
std::function<::carla::rss::ActorConstellationResult(carla::SharedPtr<::carla::rss::ActorConstellationData >)> ActorConstellationCallbackFunctionType
Definition
LibCarla/source/carla/rss/RssSensor.h:49
carla::client::RssSensor::_rss_check_timings
std::list< double > _rss_check_timings
some debug timings
Definition
LibCarla/source/carla/rss/RssSensor.h:147
carla::client::RssSensor::GetEgoVehicleDynamics
const ::ad::rss::world::RssDynamics & GetEgoVehicleDynamics() const
Definition
LibCarla/source/carla/rss/RssSensor.cpp:157
carla::client::RssSensor::RssSensor
RssSensor(ActorInitializer init)
constructor
Definition
LibCarla/source/carla/rss/RssSensor.cpp:27
carla::client::RssSensor::AppendRoutingTarget
void AppendRoutingTarget(const ::carla::geom::Transform &routing_target)
appends a routing target to the current routing target list (
Definition
LibCarla/source/carla/rss/RssSensor.cpp:263
carla::client::RssSensor::_processing_lock
std::mutex _processing_lock
the mutex to protect the actual RSS processing and in case it takes too long to process ever frame
Definition
LibCarla/source/carla/rss/RssSensor.h:141
carla::client::RssSensor::SetRoadBoundariesMode
void SetRoadBoundariesMode(const ::carla::rss::RoadBoundariesMode &road_boundaries_mode)
sets the current mode for respecting the road boundaries (
Definition
LibCarla/source/carla/rss/RssSensor.cpp:254
carla::client::RssSensor::_rss_actor_constellation_callback
ActorConstellationCallbackFunctionType _rss_actor_constellation_callback
Definition
LibCarla/source/carla/rss/RssSensor.h:150
carla::client::RssSensor::GetRoadBoundariesMode
const ::carla::rss::RoadBoundariesMode & GetRoadBoundariesMode() const
Definition
LibCarla/source/carla/rss/RssSensor.cpp:244
carla::client::RssSensor::GetRoutingTargets
const std::vector<::carla::geom::Transform > GetRoutingTargets() const
Definition
LibCarla/source/carla/rss/RssSensor.cpp:272
carla::client::RssSensor::Listen
void Listen(CallbackFunctionType callback) override
Register a callback to be executed each time a new measurement is received.
Definition
LibCarla/source/carla/rss/RssSensor.cpp:46
carla::client::RssSensor::_drop_route
bool _drop_route
reqired to store DropRoute() requests until next sensor tick
Definition
LibCarla/source/carla/rss/RssSensor.h:153
carla::client::RssSensor::TickRssSensorThreadLocked
void TickRssSensorThreadLocked(const client::Timestamp ×tamp, SharedPtr< carla::client::ActorList > actors, CallbackFunctionType callback)
Definition
LibCarla/source/carla/rss/RssSensor.cpp:327
carla::client::Sensor
Definition
LibCarla/source/carla/client/Sensor.h:17
carla::client::Sensor::CallbackFunctionType
std::function< void(SharedPtr< sensor::SensorData >)> CallbackFunctionType
Definition
LibCarla/source/carla/client/Sensor.h:20
carla::client::Timestamp
Definition
Timestamp.h:14
carla::client::Timestamp::frame
std::size_t frame
Number of frames elapsed since the simulator was launched.
Definition
Timestamp.h:30
carla::client::Timestamp::elapsed_seconds
double elapsed_seconds
Simulated seconds elapsed since the beginning of the current episode.
Definition
Timestamp.h:33
carla::client::World::GetActors
SharedPtr< ActorList > GetActors() const
Return a list with all the actors currently present in the world.
Definition
World.cpp:126
carla::client::World::GetMap
SharedPtr< Map > GetMap() const
Return the map that describes this world.
Definition
World.cpp:26
carla::client::World::GetSettings
rpc::EpisodeSettings GetSettings() const
Definition
World.cpp:54
carla::client::detail::ActorState::GetEpisode
EpisodeProxy & GetEpisode()
Definition
client/detail/ActorState.h:85
carla::client::detail::ActorState::GetParent
SharedPtr< Actor > GetParent() const
Definition
ActorState.cpp:31
carla::client::detail::ActorState::GetDisplayId
const std::string & GetDisplayId() const
Definition
client/detail/ActorState.h:35
carla::client::detail::ActorState::GetWorld
World GetWorld() const
Definition
client/detail/ActorState.h:49
carla::client::detail::EpisodeProxyImpl::Lock
SharedPtrType Lock() const
Same as TryLock but never return nullptr.
Definition
EpisodeProxy.cpp:39
carla::rss::RssCheck::GetDefaultVehicleDynamics
::ad::rss::world::RssDynamics GetDefaultVehicleDynamics()
Definition
RssCheck.cpp:88
carla::rss::RssCheck::GetDefaultRoadBoundariesMode
static RoadBoundariesMode GetDefaultRoadBoundariesMode()
Definition
RssCheck.h:217
carla::rss::RssCheck::GetDefaultPedestrianDynamics
::ad::rss::world::RssDynamics GetDefaultPedestrianDynamics()
Definition
RssCheck.cpp:107
Map.h
carla::client
Definition
BasicAgent.h:24
carla
This file contains definitions of common data structures used in traffic manager.
Definition
SignComponent.h:21
carla::WeakPtr
std::weak_ptr< T > WeakPtr
Definition
Memory.h:18
carla::SharedPtr
std::shared_ptr< T > SharedPtr
Definition
Memory.h:15
carla::throw_exception
void throw_exception(const ExceptionT &e)
Templated on the static type so the thrown object keeps its dynamic type: taking a const std::excepti...
Definition
Exception.h:44
std
Definition
CarlaRecorderCollision.h:31
carla::rss::EgoDynamicsOnRoute
struct defining the ego vehicles current dynamics in respect to the current route
Definition
RssCheck.h:40
Generated by
1.18.0