CARLA
Parameters.cpp
Go to the documentation of this file.
1 // Copyright (c) 2020 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 
9 
10 namespace carla {
11 namespace traffic_manager {
12 
14 
15  /// Set default synchronous mode time out.
16  synchronous_time_out = std::chrono::duration<int, std::milli>(10);
17 }
18 
20 
21 //////////////////////////////////// SETTERS //////////////////////////////////
22 
23 void Parameters::SetHybridPhysicsMode(const bool mode_switch) {
24 
25  hybrid_physics_mode.store(mode_switch);
26 }
27 
28 void Parameters::SetRespawnDormantVehicles(const bool mode_switch) {
29 
30  respawn_dormant_vehicles.store(mode_switch);
31 }
32 
33 void Parameters::SetMaxBoundaries(const float lower, const float upper) {
34  min_lower_bound = lower;
35  max_upper_bound = upper;
36 }
37 
38 void Parameters::SetBoundariesRespawnDormantVehicles(const float lower_bound, const float upper_bound) {
39  respawn_lower_bound = min_lower_bound > lower_bound ? min_lower_bound : lower_bound;
40  respawn_upper_bound = max_upper_bound < upper_bound ? max_upper_bound : upper_bound;
41 }
42 
43 void Parameters::SetPercentageSpeedDifference(const ActorPtr &actor, const float percentage) {
44 
45  float new_percentage = std::min(100.0f, percentage);
46  percentage_difference_from_speed_limit.AddEntry({actor->GetId(), new_percentage});
47 }
48 
49 void Parameters::SetGlobalPercentageSpeedDifference(const float percentage) {
50  float new_percentage = std::min(100.0f, percentage);
52 }
53 
54 void Parameters::SetCollisionDetection(const ActorPtr &reference_actor, const ActorPtr &other_actor, const bool detect_collision) {
55  const ActorId reference_id = reference_actor->GetId();
56  const ActorId other_id = other_actor->GetId();
57 
58  if (detect_collision) {
59  if (ignore_collision.Contains(reference_id)) {
60  std::shared_ptr<AtomicActorSet> actor_set = ignore_collision.GetValue(reference_id);
61  if (actor_set->Contains(other_id)) {
62  actor_set->Remove({other_id});
63  }
64  }
65  } else {
66  if (ignore_collision.Contains(reference_id)) {
67  std::shared_ptr<AtomicActorSet> actor_set = ignore_collision.GetValue(reference_id);
68  if (!actor_set->Contains(other_id)) {
69  actor_set->Insert({other_actor});
70  }
71  } else {
72  std::shared_ptr<AtomicActorSet> actor_set = std::make_shared<AtomicActorSet>();
73  actor_set->Insert({other_actor});
74  auto entry = std::make_pair(reference_id, actor_set);
75  ignore_collision.AddEntry(entry);
76  }
77  }
78 }
79 
80 void Parameters::SetForceLaneChange(const ActorPtr &actor, const bool direction) {
81 
82  const ChangeLaneInfo lane_change_info = {true, direction};
83  const auto entry = std::make_pair(actor->GetId(), lane_change_info);
84  force_lane_change.AddEntry(entry);
85 }
86 
87 void Parameters::SetKeepRightPercentage(const ActorPtr &actor, const float percentage) {
88 
89  const auto entry = std::make_pair(actor->GetId(), percentage);
91 }
92 
93 void Parameters::SetRandomLeftLaneChangePercentage(const ActorPtr &actor, const float percentage) {
94 
95  const auto entry = std::make_pair(actor->GetId(), percentage);
97 }
98 
99 void Parameters::SetRandomRightLaneChangePercentage(const ActorPtr &actor, const float percentage) {
100 
101  const auto entry = std::make_pair(actor->GetId(), percentage);
103 
104 }
105 
106 void Parameters::SetUpdateVehicleLights(const ActorPtr &actor, const bool do_update) {
107 
108  const auto entry = std::make_pair(actor->GetId(), do_update);
110 }
111 
112 void Parameters::SetAutoLaneChange(const ActorPtr &actor, const bool enable) {
113 
114  const auto entry = std::make_pair(actor->GetId(), enable);
115  auto_lane_change.AddEntry(entry);
116 }
117 
118 void Parameters::SetDistanceToLeadingVehicle(const ActorPtr &actor, const float distance) {
119 
120  float new_distance = std::max(0.0f, distance);
121  const auto entry = std::make_pair(actor->GetId(), new_distance);
123 }
124 
125 void Parameters::SetSynchronousMode(const bool mode_switch) {
126  synchronous_mode.store(mode_switch);
127 }
128 
130  synchronous_time_out = std::chrono::duration<double, std::milli>(time);
131 }
132 
134 
135  distance_margin.store(dist);
136 }
137 
138 void Parameters::SetPercentageRunningLight(const ActorPtr &actor, const float perc) {
139 
140  float new_perc = cg::Math::Clamp(perc, 0.0f, 100.0f);
141  const auto entry = std::make_pair(actor->GetId(), new_perc);
143 }
144 
145 void Parameters::SetPercentageRunningSign(const ActorPtr &actor, const float perc) {
146 
147  float new_perc = cg::Math::Clamp(perc, 0.0f, 100.0f);
148  const auto entry = std::make_pair(actor->GetId(), new_perc);
150 }
151 
152 void Parameters::SetPercentageIgnoreVehicles(const ActorPtr &actor, const float perc) {
153 
154  float new_perc = cg::Math::Clamp(perc, 0.0f, 100.0f);
155  const auto entry = std::make_pair(actor->GetId(), new_perc);
157 }
158 
159 void Parameters::SetPercentageIgnoreWalkers(const ActorPtr &actor, const float perc) {
160 
161  float new_perc = cg::Math::Clamp(perc,0.0f,100.0f);
162  const auto entry = std::make_pair(actor->GetId(), new_perc);
164 }
165 
166 void Parameters::SetHybridPhysicsRadius(const float radius) {
167  float new_radius = std::max(radius, 0.0f);
168  hybrid_physics_radius.store(new_radius);
169 }
170 
171 void Parameters::SetOSMMode(const bool mode_switch) {
172  osm_mode.store(mode_switch);
173 }
174 
175 void Parameters::SetCustomPath(const ActorPtr &actor, const Path path, const bool empty_buffer) {
176  const auto entry = std::make_pair(actor->GetId(), path);
177  custom_path.AddEntry(entry);
178  const auto entry2 = std::make_pair(actor->GetId(), empty_buffer);
179  upload_path.AddEntry(entry2);
180 }
181 
182 void Parameters::RemoveUploadPath(const ActorId &actor_id, const bool remove_path) {
183  if (!remove_path) {
184  upload_path.RemoveEntry(actor_id);
185  } else {
186  custom_path.RemoveEntry(actor_id);
187  }
188 }
189 
190 void Parameters::UpdateUploadPath(const ActorId &actor_id, const Path path) {
191  custom_path.RemoveEntry(actor_id);
192  const auto entry = std::make_pair(actor_id, path);
193  custom_path.AddEntry(entry);
194 }
195 
196 void Parameters::SetImportedRoute(const ActorPtr &actor, const Route route, const bool empty_buffer) {
197  const auto entry = std::make_pair(actor->GetId(), route);
198  custom_route.AddEntry(entry);
199  const auto entry2 = std::make_pair(actor->GetId(), empty_buffer);
200  upload_route.AddEntry(entry2);
201 }
202 
203 void Parameters::RemoveImportedRoute(const ActorId &actor_id, const bool remove_path) {
204  if (!remove_path) {
205  upload_route.RemoveEntry(actor_id);
206  } else {
207  custom_route.RemoveEntry(actor_id);
208  }
209 }
210 
211 void Parameters::UpdateImportedRoute(const ActorId &actor_id, const Route route) {
212  custom_route.RemoveEntry(actor_id);
213  const auto entry = std::make_pair(actor_id, route);
214  custom_route.AddEntry(entry);
215 }
216 
217 //////////////////////////////////// GETTERS //////////////////////////////////
218 
220 
221  return hybrid_physics_radius.load();
222 }
223 
225  return synchronous_mode.load();
226 }
227 
229  return synchronous_time_out.count();
230 }
231 
232 float Parameters::GetVehicleTargetVelocity(const ActorId &actor_id, const float speed_limit) const {
233 
234  float percentage_difference = global_percentage_difference_from_limit;
235 
237  percentage_difference = percentage_difference_from_speed_limit.GetValue(actor_id);
238  }
239 
240  return speed_limit * (1.0f - percentage_difference / 100.0f);
241 }
242 
243 bool Parameters::GetCollisionDetection(const ActorId &reference_actor_id, const ActorId &other_actor_id) const {
244 
245  bool avoid_collision = true;
246 
247  if (ignore_collision.Contains(reference_actor_id) &&
248  ignore_collision.GetValue(reference_actor_id)->Contains(other_actor_id)) {
249  avoid_collision = false;
250  }
251 
252  return avoid_collision;
253 }
254 
256 
257  ChangeLaneInfo change_lane_info {false, false};
258 
259  if (force_lane_change.Contains(actor_id)) {
260  change_lane_info = force_lane_change.GetValue(actor_id);
261  }
262 
263  force_lane_change.RemoveEntry(actor_id);
264 
265  return change_lane_info;
266 }
267 
269 
270  float percentage = -1.0f;
271 
272  if (perc_keep_right.Contains(actor_id)) {
273  percentage = perc_keep_right.GetValue(actor_id);
274  }
275 
276  return percentage;
277 }
278 
280 
281  float percentage = -1.0f;
282 
283  if (perc_random_left.Contains(actor_id)) {
284  percentage = perc_random_left.GetValue(actor_id);
285  }
286 
287  return percentage;
288 }
289 
291 
292  float percentage = -1.0f;
293 
294  if (perc_random_right.Contains(actor_id)) {
295  percentage = perc_random_right.GetValue(actor_id);
296  }
297 
298  return percentage;
299 }
300 
301 bool Parameters::GetAutoLaneChange(const ActorId &actor_id) const {
302 
303  bool auto_lane_change_policy = true;
304 
305  if (auto_lane_change.Contains(actor_id)) {
306  auto_lane_change_policy = auto_lane_change.GetValue(actor_id);
307  }
308 
309  return auto_lane_change_policy;
310 }
311 
312 float Parameters::GetDistanceToLeadingVehicle(const ActorId &actor_id) const {
313 
314  float specific_distance_margin = 0.0f;
315  if (distance_to_leading_vehicle.Contains(actor_id)) {
316  specific_distance_margin = distance_to_leading_vehicle.GetValue(actor_id);
317  } else {
318  specific_distance_margin = distance_margin;
319  }
320 
321  return specific_distance_margin;
322 }
323 
324 float Parameters::GetPercentageRunningLight(const ActorId &actor_id) const {
325 
326  float percentage = 0.0f;
327 
328  if (perc_run_traffic_light.Contains(actor_id)) {
329  percentage = perc_run_traffic_light.GetValue(actor_id);
330  }
331 
332  return percentage;
333 }
334 
335 float Parameters::GetPercentageRunningSign(const ActorId &actor_id) const {
336 
337  float percentage = 0.0f;
338 
339  if (perc_run_traffic_sign.Contains(actor_id)) {
340  percentage = perc_run_traffic_sign.GetValue(actor_id);
341  }
342 
343  return percentage;
344 }
345 
346 float Parameters::GetPercentageIgnoreWalkers(const ActorId &actor_id) const {
347 
348  float percentage = 0.0f;
349 
350  if (perc_ignore_walkers.Contains(actor_id)) {
351  percentage = perc_ignore_walkers.GetValue(actor_id);
352  }
353 
354  return percentage;
355 }
356 
357 bool Parameters::GetUpdateVehicleLights(const ActorId &actor_id) const {
358  bool do_update = false;
359 
360  if (auto_update_vehicle_lights.Contains(actor_id)) {
361  do_update = auto_update_vehicle_lights.GetValue(actor_id);
362  }
363 
364  return do_update;
365 }
366 
367 float Parameters::GetPercentageIgnoreVehicles(const ActorId &actor_id) const {
368 
369  float percentage = 0.0f;
370 
371  if (perc_ignore_vehicles.Contains(actor_id)) {
372  percentage = perc_ignore_vehicles.GetValue(actor_id);
373  }
374 
375  return percentage;
376 }
377 
379 
380  return hybrid_physics_mode.load();
381 }
382 
384 
385  return respawn_dormant_vehicles.load();
386 }
387 
389 
390  return respawn_lower_bound.load();
391 }
392 
394 
395  return respawn_upper_bound.load();
396 }
397 
398 
400 
401  return osm_mode.load();
402 }
403 
404 bool Parameters::GetUploadPath(const ActorId &actor_id) const {
405 
406  bool custom_path_bool = false;
407 
408  if (upload_path.Contains(actor_id)) {
409  custom_path_bool = upload_path.GetValue(actor_id);
410  }
411 
412  return custom_path_bool;
413 }
414 
415 Path Parameters::GetCustomPath(const ActorId &actor_id) const {
416 
417  Path custom_path_import;
418 
419  if (custom_path.Contains(actor_id)) {
420  custom_path_import = custom_path.GetValue(actor_id);
421  }
422 
423  return custom_path_import;
424 }
425 
426 
427 bool Parameters::GetUploadRoute(const ActorId &actor_id) const {
428 
429  bool custom_route_bool = false;
430 
431  if (upload_route.Contains(actor_id)) {
432  custom_route_bool = upload_route.GetValue(actor_id);
433  }
434 
435  return custom_route_bool;
436 }
437 
439 
440  Route custom_route_import;
441 
442  if (custom_route.Contains(actor_id)) {
443  custom_route_import = custom_route.GetValue(actor_id);
444  }
445 
446  return custom_route_import;
447 }
448 
449 
450 } // namespace traffic_manager
451 } // namespace carla
float GetPercentageRunningLight(const ActorId &actor_id) const
Method to get % to run any traffic light.
Definition: Parameters.cpp:324
void RemoveEntry(const Key &key)
Definition: AtomicMap.h:50
void SetUpdateVehicleLights(const ActorPtr &actor, const bool do_update)
Method to set the automatic vehicle light state update flag.
Definition: Parameters.cpp:106
float GetRandomRightLaneChangePercentage(const ActorId &actor_id)
Method to query percentage probability of a random left lane change for a vehicle.
Definition: Parameters.cpp:290
bool GetCollisionDetection(const ActorId &reference_actor_id, const ActorId &other_actor_id) const
Method to query collision avoidance rule between a pair of vehicles.
Definition: Parameters.cpp:243
AtomicMap< ActorId, float > perc_run_traffic_sign
Map containing % of running a traffic sign.
Definition: Parameters.h:55
std::atomic< float > respawn_lower_bound
Minimum distance to respawn vehicles with respect to the hero vehicle.
Definition: Parameters.h:77
bool GetUpdateVehicleLights(const ActorId &actor_id) const
Method to get if the vehicle lights should be updates automatically.
Definition: Parameters.cpp:357
AtomicMap< ActorId, bool > upload_route
Parameter specifying if importing a custom route.
Definition: Parameters.h:93
float GetVehicleTargetVelocity(const ActorId &actor_id, const float speed_limit) const
Method to query target velocity for a vehicle.
Definition: Parameters.cpp:232
float min_lower_bound
Minimum possible distance to respawn vehicles with respect to the hero vehicle.
Definition: Parameters.h:81
void SetCustomPath(const ActorPtr &actor, const Path path, const bool empty_buffer)
Method to set our own imported path.
Definition: Parameters.cpp:175
const Value & GetValue(const Key &key) const
Definition: AtomicMap.h:44
Route GetImportedRoute(const ActorId &actor_id) const
Method to get a custom route.
Definition: Parameters.cpp:438
std::atomic< float > hybrid_physics_radius
Hybrid physics radius.
Definition: Parameters.h:85
void SetGlobalDistanceToLeadingVehicle(const float dist)
Method to set the distance to leading vehicle for all registered vehicles.
Definition: Parameters.cpp:133
void SetDistanceToLeadingVehicle(const ActorPtr &actor, const float distance)
Method to specify how much distance a vehicle should maintain to the leading vehicle.
Definition: Parameters.cpp:118
bool GetUploadRoute(const ActorId &actor_id) const
Method to get if we are uploading a route.
Definition: Parameters.cpp:427
carla::SharedPtr< cc::Actor > ActorPtr
AtomicMap< ActorId, float > perc_random_left
Map containing % of random left lane change.
Definition: Parameters.h:63
bool GetOSMMode() const
Method to get Open Street Map mode.
Definition: Parameters.cpp:399
std::atomic< bool > osm_mode
Parameter specifying Open Street Map mode.
Definition: Parameters.h:87
bool Contains(const Key &key) const
Definition: AtomicMap.h:38
void SetAutoLaneChange(const ActorPtr &actor, const bool enable)
Enable/disable automatic lane change on a vehicle.
Definition: Parameters.cpp:112
std::vector< cg::Location > Path
static T Clamp(T a, T min=T(0), T max=T(1))
Definition: Math.h:49
AtomicMap< ActorId, bool > auto_lane_change
Map containing auto lane change commands.
Definition: Parameters.h:51
bool GetAutoLaneChange(const ActorId &actor_id) const
Method to query auto lane change rule for a vehicle.
Definition: Parameters.cpp:301
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
std::chrono::duration< double, std::milli > synchronous_time_out
Synchronous mode time out variable.
Definition: Parameters.h:275
void SetKeepRightPercentage(const ActorPtr &actor, const float percentage)
Method to set % to keep on the right lane.
Definition: Parameters.cpp:87
AtomicMap< ActorId, float > perc_run_traffic_light
Map containing % of running a traffic light.
Definition: Parameters.h:53
void SetForceLaneChange(const ActorPtr &actor, const bool direction)
Method to force lane change on a vehicle.
Definition: Parameters.cpp:80
AtomicMap< ActorId, ChangeLaneInfo > force_lane_change
Map containing force lane change commands.
Definition: Parameters.h:49
void SetMaxBoundaries(const float lower, const float upper)
Method to set limits for boundaries when respawning vehicles.
Definition: Parameters.cpp:33
float max_upper_bound
Maximum possible distance to respawn vehicles with respect to the hero vehicle.
Definition: Parameters.h:83
void SetRandomLeftLaneChangePercentage(const ActorPtr &actor, const float percentage)
Method to set % to randomly do a left lane change.
Definition: Parameters.cpp:93
void SetPercentageSpeedDifference(const ActorPtr &actor, const float percentage)
Set a vehicle&#39;s % decrease in velocity with respect to the speed limit.
Definition: Parameters.cpp:43
bool GetUploadPath(const ActorId &actor_id) const
Method to get if we are uploading a path.
Definition: Parameters.cpp:404
AtomicMap< ActorId, float > perc_keep_right
Map containing % of keep right rule.
Definition: Parameters.h:61
void UpdateUploadPath(const ActorId &actor_id, const Path path)
Method to update an already set list of points.
Definition: Parameters.cpp:190
AtomicMap< ActorId, Route > custom_route
Structure to hold all custom routes.
Definition: Parameters.h:95
bool GetRespawnDormantVehicles() const
Method to retrieve if we are automatically respawning vehicles.
Definition: Parameters.cpp:383
std::atomic< float > distance_margin
Distance margin.
Definition: Parameters.h:71
float GetKeepRightPercentage(const ActorId &actor_id)
Method to query percentage probability of keep right rule for a vehicle.
Definition: Parameters.cpp:268
AtomicMap< ActorId, float > percentage_difference_from_speed_limit
Target velocity map for individual vehicles.
Definition: Parameters.h:41
void UpdateImportedRoute(const ActorId &actor_id, const Route route)
Method to update an already set route.
Definition: Parameters.cpp:211
void SetCollisionDetection(const ActorPtr &reference_actor, const ActorPtr &other_actor, const bool detect_collision)
Method to set collision detection rules between vehicles.
Definition: Parameters.cpp:54
AtomicMap< ActorId, bool > auto_update_vehicle_lights
Map containing the automatic vehicle lights update flag.
Definition: Parameters.h:67
AtomicMap< ActorId, bool > upload_path
Parameter specifying if importing a custom path.
Definition: Parameters.h:89
AtomicMap< ActorId, Path > custom_path
Structure to hold all custom paths.
Definition: Parameters.h:91
bool GetHybridPhysicsMode() const
Method to retrieve hybrid physics mode.
Definition: Parameters.cpp:378
carla::ActorId ActorId
std::atomic< bool > hybrid_physics_mode
Hybrid physics mode switch.
Definition: Parameters.h:73
AtomicMap< ActorId, float > distance_to_leading_vehicle
Map containing distance to leading vehicle command.
Definition: Parameters.h:47
std::vector< uint8_t > Route
float GetHybridPhysicsRadius() const
Method to retrieve hybrid physics radius.
Definition: Parameters.cpp:219
bool GetSynchronousMode() const
Method to get synchronous mode.
Definition: Parameters.cpp:224
void SetPercentageIgnoreVehicles(const ActorPtr &actor, const float perc)
Method to set % to ignore any vehicle.
Definition: Parameters.cpp:152
AtomicMap< ActorId, float > perc_random_right
Map containing % of random right lane change.
Definition: Parameters.h:65
float GetPercentageIgnoreVehicles(const ActorId &actor_id) const
Method to get % to ignore any vehicle.
Definition: Parameters.cpp:367
float GetDistanceToLeadingVehicle(const ActorId &actor_id) const
Method to query distance to leading vehicle for a given vehicle.
Definition: Parameters.cpp:312
void SetGlobalPercentageSpeedDifference(float const percentage)
Set a global % decrease in velocity with respect to the speed limit.
Definition: Parameters.cpp:49
float GetPercentageRunningSign(const ActorId &actor_id) const
Method to get % to run any traffic light.
Definition: Parameters.cpp:335
AtomicMap< ActorId, float > perc_ignore_walkers
Map containing % of ignoring walkers.
Definition: Parameters.h:57
float GetUpperBoundaryRespawnDormantVehicles() const
Method to retrieve maximum distance from hero vehicle when respawning vehicles.
Definition: Parameters.cpp:393
void SetPercentageIgnoreWalkers(const ActorPtr &actor, const float perc)
Method to set % to ignore any vehicle.
Definition: Parameters.cpp:159
void AddEntry(const std::pair< Key, Value > &entry)
Definition: AtomicMap.h:27
void RemoveImportedRoute(const ActorId &actor_id, const bool remove_path)
Method to remove a route.
Definition: Parameters.cpp:203
float GetLowerBoundaryRespawnDormantVehicles() const
Method to retrieve minimum distance from hero vehicle when respawning vehicles.
Definition: Parameters.cpp:388
void SetBoundariesRespawnDormantVehicles(const float lower_bound, const float upper_bound)
Method to set boundaries for respawning vehicles.
Definition: Parameters.cpp:38
float GetPercentageIgnoreWalkers(const ActorId &actor_id) const
Method to get % to ignore any walker.
Definition: Parameters.cpp:346
void RemoveUploadPath(const ActorId &actor_id, const bool remove_path)
Method to remove a list of points.
Definition: Parameters.cpp:182
std::atomic< bool > synchronous_mode
Synchronous mode switch.
Definition: Parameters.h:69
void SetRespawnDormantVehicles(const bool mode_switch)
Method to set if we are automatically respawning vehicles.
Definition: Parameters.cpp:28
void SetSynchronousMode(const bool mode_switch=true)
Method to set synchronous mode.
Definition: Parameters.cpp:125
void SetHybridPhysicsRadius(const float radius)
Method to set hybrid physics radius.
Definition: Parameters.cpp:166
AtomicMap< ActorId, std::shared_ptr< AtomicActorSet > > ignore_collision
Map containing a set of actors to be ignored during collision detection.
Definition: Parameters.h:45
void SetPercentageRunningLight(const ActorPtr &actor, const float perc)
Method to set % to run any traffic light.
Definition: Parameters.cpp:138
float global_percentage_difference_from_limit
Global target velocity limit % difference.
Definition: Parameters.h:43
void SetPercentageRunningSign(const ActorPtr &actor, const float perc)
Method to set % to run any traffic sign.
Definition: Parameters.cpp:145
float GetRandomLeftLaneChangePercentage(const ActorId &actor_id)
Method to query percentage probability of a random right lane change for a vehicle.
Definition: Parameters.cpp:279
double GetSynchronousModeTimeOutInMiliSecond() const
Get synchronous mode time out.
Definition: Parameters.cpp:228
AtomicMap< ActorId, float > perc_ignore_vehicles
Map containing % of ignoring vehicles.
Definition: Parameters.h:59
void SetRandomRightLaneChangePercentage(const ActorPtr &actor, const float percentage)
Method to set % to randomly do a right lane change.
Definition: Parameters.cpp:99
void SetSynchronousModeTimeOutInMiliSecond(const double time)
Set Synchronous mode time out.
Definition: Parameters.cpp:129
ChangeLaneInfo GetForceLaneChange(const ActorId &actor_id)
Method to query lane change command for a vehicle.
Definition: Parameters.cpp:255
void SetHybridPhysicsMode(const bool mode_switch)
Method to set hybrid physics mode.
Definition: Parameters.cpp:23
void SetOSMMode(const bool mode_switch)
Method to set Open Street Map mode.
Definition: Parameters.cpp:171
void SetImportedRoute(const ActorPtr &actor, const Route route, const bool empty_buffer)
Method to set our own imported route.
Definition: Parameters.cpp:196
std::atomic< bool > respawn_dormant_vehicles
Automatic respawn mode switch.
Definition: Parameters.h:75
Path GetCustomPath(const ActorId &actor_id) const
Method to get a custom path.
Definition: Parameters.cpp:415
std::atomic< float > respawn_upper_bound
Maximum distance to respawn vehicles with respect to the hero vehicle.
Definition: Parameters.h:79