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