#include <Parameters.h>
Public Member Functions | |
bool | GetAutoLaneChange (const ActorId &actor_id) const |
Method to query auto lane change rule for a vehicle. More... | |
bool | GetCollisionDetection (const ActorId &reference_actor_id, const ActorId &other_actor_id) const |
Method to query collision avoidance rule between a pair of vehicles. More... | |
Path | GetCustomPath (const ActorId &actor_id) const |
Method to get a custom path. More... | |
float | GetDistanceToLeadingVehicle (const ActorId &actor_id) const |
Method to query distance to leading vehicle for a given vehicle. More... | |
ChangeLaneInfo | GetForceLaneChange (const ActorId &actor_id) |
Method to query lane change command for a vehicle. More... | |
bool | GetHybridPhysicsMode () const |
Method to retrieve hybrid physics mode. More... | |
float | GetHybridPhysicsRadius () const |
Method to retrieve hybrid physics radius. More... | |
Route | GetImportedRoute (const ActorId &actor_id) const |
Method to get a custom route. More... | |
float | GetKeepRightPercentage (const ActorId &actor_id) |
Method to query percentage probability of keep right rule for a vehicle. More... | |
float | GetLaneOffset (const ActorId &actor_id) const |
Method to query lane offset for a vehicle. More... | |
float | GetLowerBoundaryRespawnDormantVehicles () const |
Method to retrieve minimum distance from hero vehicle when respawning vehicles. More... | |
bool | GetOSMMode () const |
Method to get Open Street Map mode. More... | |
float | GetPercentageIgnoreVehicles (const ActorId &actor_id) const |
Method to get % to ignore any vehicle. More... | |
float | GetPercentageIgnoreWalkers (const ActorId &actor_id) const |
Method to get % to ignore any walker. More... | |
float | GetPercentageRunningLight (const ActorId &actor_id) const |
Method to get % to run any traffic light. More... | |
float | GetPercentageRunningSign (const ActorId &actor_id) const |
Method to get % to run any traffic light. More... | |
float | GetRandomLeftLaneChangePercentage (const ActorId &actor_id) |
Method to query percentage probability of a random right lane change for a vehicle. More... | |
float | GetRandomRightLaneChangePercentage (const ActorId &actor_id) |
Method to query percentage probability of a random left lane change for a vehicle. More... | |
bool | GetRespawnDormantVehicles () const |
Method to retrieve if we are automatically respawning vehicles. More... | |
bool | GetSynchronousMode () const |
Method to get synchronous mode. More... | |
double | GetSynchronousModeTimeOutInMiliSecond () const |
Get synchronous mode time out. More... | |
bool | GetUpdateVehicleLights (const ActorId &actor_id) const |
Method to get if the vehicle lights should be updates automatically. More... | |
bool | GetUploadPath (const ActorId &actor_id) const |
Method to get if we are uploading a path. More... | |
bool | GetUploadRoute (const ActorId &actor_id) const |
Method to get if we are uploading a route. More... | |
float | GetUpperBoundaryRespawnDormantVehicles () const |
Method to retrieve maximum distance from hero vehicle when respawning vehicles. More... | |
float | GetVehicleTargetVelocity (const ActorId &actor_id, const float speed_limit) const |
Method to query target velocity for a vehicle. More... | |
Parameters () | |
void | RemoveImportedRoute (const ActorId &actor_id, const bool remove_path) |
Method to remove a route. More... | |
void | RemoveUploadPath (const ActorId &actor_id, const bool remove_path) |
Method to remove a list of points. More... | |
void | SetAutoLaneChange (const ActorPtr &actor, const bool enable) |
Enable/disable automatic lane change on a vehicle. More... | |
void | SetBoundariesRespawnDormantVehicles (const float lower_bound, const float upper_bound) |
Method to set boundaries for respawning vehicles. More... | |
void | SetCollisionDetection (const ActorPtr &reference_actor, const ActorPtr &other_actor, const bool detect_collision) |
Method to set collision detection rules between vehicles. More... | |
void | SetCustomPath (const ActorPtr &actor, const Path path, const bool empty_buffer) |
Method to set our own imported path. More... | |
void | SetDesiredSpeed (const ActorPtr &actor, const float value) |
Set a vehicle's exact desired velocity. More... | |
void | SetDistanceToLeadingVehicle (const ActorPtr &actor, const float distance) |
Method to specify how much distance a vehicle should maintain to the leading vehicle. More... | |
void | SetForceLaneChange (const ActorPtr &actor, const bool direction) |
Method to force lane change on a vehicle. More... | |
void | SetGlobalDistanceToLeadingVehicle (const float dist) |
Method to set the distance to leading vehicle for all registered vehicles. More... | |
void | SetGlobalLaneOffset (float const offset) |
Method to set a global lane offset displacement from the center line. More... | |
void | SetGlobalPercentageSpeedDifference (float const percentage) |
Set a global % decrease in velocity with respect to the speed limit. More... | |
void | SetHybridPhysicsMode (const bool mode_switch) |
Method to set hybrid physics mode. More... | |
void | SetHybridPhysicsRadius (const float radius) |
Method to set hybrid physics radius. More... | |
void | SetImportedRoute (const ActorPtr &actor, const Route route, const bool empty_buffer) |
Method to set our own imported route. More... | |
void | SetKeepRightPercentage (const ActorPtr &actor, const float percentage) |
Method to set % to keep on the right lane. More... | |
void | SetLaneOffset (const ActorPtr &actor, const float offset) |
Method to set a lane offset displacement from the center line. More... | |
void | SetMaxBoundaries (const float lower, const float upper) |
Method to set limits for boundaries when respawning vehicles. More... | |
void | SetOSMMode (const bool mode_switch) |
Method to set Open Street Map mode. More... | |
void | SetPercentageIgnoreVehicles (const ActorPtr &actor, const float perc) |
Method to set % to ignore any vehicle. More... | |
void | SetPercentageIgnoreWalkers (const ActorPtr &actor, const float perc) |
Method to set % to ignore any vehicle. More... | |
void | SetPercentageRunningLight (const ActorPtr &actor, const float perc) |
Method to set % to run any traffic light. More... | |
void | SetPercentageRunningSign (const ActorPtr &actor, const float perc) |
Method to set % to run any traffic sign. More... | |
void | SetPercentageSpeedDifference (const ActorPtr &actor, const float percentage) |
Set a vehicle's % decrease in velocity with respect to the speed limit. More... | |
void | SetRandomLeftLaneChangePercentage (const ActorPtr &actor, const float percentage) |
Method to set % to randomly do a left lane change. More... | |
void | SetRandomRightLaneChangePercentage (const ActorPtr &actor, const float percentage) |
Method to set % to randomly do a right lane change. More... | |
void | SetRespawnDormantVehicles (const bool mode_switch) |
Method to set if we are automatically respawning vehicles. More... | |
void | SetSynchronousMode (const bool mode_switch=true) |
Method to set synchronous mode. More... | |
void | SetSynchronousModeTimeOutInMiliSecond (const double time) |
Set Synchronous mode time out. More... | |
void | SetUpdateVehicleLights (const ActorPtr &actor, const bool do_update) |
Method to set the automatic vehicle light state update flag. More... | |
void | UpdateImportedRoute (const ActorId &actor_id, const Route route) |
Method to update an already set route. More... | |
void | UpdateUploadPath (const ActorId &actor_id, const Path path) |
Method to update an already set list of points. More... | |
~Parameters () | |
Public Attributes | |
std::chrono::duration< double, std::milli > | synchronous_time_out |
Synchronous mode time out variable. More... | |
Private Attributes | |
AtomicMap< ActorId, bool > | auto_lane_change |
Map containing auto lane change commands. More... | |
AtomicMap< ActorId, bool > | auto_update_vehicle_lights |
Map containing the automatic vehicle lights update flag. More... | |
AtomicMap< ActorId, Path > | custom_path |
Structure to hold all custom paths. More... | |
AtomicMap< ActorId, Route > | custom_route |
Structure to hold all custom routes. More... | |
std::atomic< float > | distance_margin {2.0} |
Distance margin. More... | |
AtomicMap< ActorId, float > | distance_to_leading_vehicle |
Map containing distance to leading vehicle command. More... | |
AtomicMap< ActorId, float > | exact_desired_speed |
Target velocity map for individual vehicles, based on a desired velocity. More... | |
AtomicMap< ActorId, ChangeLaneInfo > | force_lane_change |
Map containing force lane change commands. More... | |
float | global_lane_offset = 0 |
Global lane offset. More... | |
float | global_percentage_difference_from_limit = 0 |
Global target velocity limit % difference. More... | |
std::atomic< bool > | hybrid_physics_mode {false} |
Hybrid physics mode switch. More... | |
std::atomic< float > | hybrid_physics_radius {70.0} |
Hybrid physics radius. More... | |
AtomicMap< ActorId, std::shared_ptr< AtomicActorSet > > | ignore_collision |
Map containing a set of actors to be ignored during collision detection. More... | |
AtomicMap< ActorId, float > | lane_offset |
Lane offset map for individual vehicles. More... | |
float | max_upper_bound |
Maximum possible distance to respawn vehicles with respect to the hero vehicle. More... | |
float | min_lower_bound |
Minimum possible distance to respawn vehicles with respect to the hero vehicle. More... | |
std::atomic< bool > | osm_mode {true} |
Parameter specifying Open Street Map mode. More... | |
AtomicMap< ActorId, float > | perc_ignore_vehicles |
Map containing % of ignoring vehicles. More... | |
AtomicMap< ActorId, float > | perc_ignore_walkers |
Map containing % of ignoring walkers. More... | |
AtomicMap< ActorId, float > | perc_keep_right |
Map containing % of keep right rule. More... | |
AtomicMap< ActorId, float > | perc_random_left |
Map containing % of random left lane change. More... | |
AtomicMap< ActorId, float > | perc_random_right |
Map containing % of random right lane change. More... | |
AtomicMap< ActorId, float > | perc_run_traffic_light |
Map containing % of running a traffic light. More... | |
AtomicMap< ActorId, float > | perc_run_traffic_sign |
Map containing % of running a traffic sign. More... | |
AtomicMap< ActorId, float > | percentage_difference_from_speed_limit |
Target velocity map for individual vehicles, based on a % diffrerence from speed limit. More... | |
std::atomic< bool > | respawn_dormant_vehicles {false} |
Automatic respawn mode switch. More... | |
std::atomic< float > | respawn_lower_bound {100.0} |
Minimum distance to respawn vehicles with respect to the hero vehicle. More... | |
std::atomic< float > | respawn_upper_bound {1000.0} |
Maximum distance to respawn vehicles with respect to the hero vehicle. More... | |
std::atomic< bool > | synchronous_mode {false} |
Synchronous mode switch. More... | |
AtomicMap< ActorId, bool > | upload_path |
Parameter specifying if importing a custom path. More... | |
AtomicMap< ActorId, bool > | upload_route |
Parameter specifying if importing a custom route. More... | |
Definition at line 37 of file Parameters.h.
carla::traffic_manager::Parameters::Parameters | ( | ) |
Set default synchronous mode time out.
Definition at line 13 of file Parameters.cpp.
References synchronous_time_out.
carla::traffic_manager::Parameters::~Parameters | ( | ) |
Definition at line 19 of file Parameters.cpp.
bool carla::traffic_manager::Parameters::GetAutoLaneChange | ( | const ActorId & | actor_id | ) | const |
Method to query auto lane change rule for a vehicle.
Definition at line 334 of file Parameters.cpp.
References auto_lane_change, carla::traffic_manager::AtomicMap< Key, Value >::Contains(), and carla::traffic_manager::AtomicMap< Key, Value >::GetValue().
Referenced by carla::traffic_manager::LocalizationStage::Update().
bool carla::traffic_manager::Parameters::GetCollisionDetection | ( | const ActorId & | reference_actor_id, |
const ActorId & | other_actor_id | ||
) | const |
Method to query collision avoidance rule between a pair of vehicles.
Definition at line 276 of file Parameters.cpp.
References ignore_collision.
Referenced by carla::traffic_manager::CollisionStage::Update().
Method to get a custom path.
Definition at line 448 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::Contains(), custom_path, and carla::traffic_manager::AtomicMap< Key, Value >::GetValue().
Referenced by carla::traffic_manager::LocalizationStage::Update().
float carla::traffic_manager::Parameters::GetDistanceToLeadingVehicle | ( | const ActorId & | actor_id | ) | const |
Method to query distance to leading vehicle for a given vehicle.
Definition at line 345 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::Contains(), distance_margin, distance_to_leading_vehicle, and carla::traffic_manager::AtomicMap< Key, Value >::GetValue().
Referenced by carla::traffic_manager::CollisionStage::GetGeodesicBoundary(), carla::traffic_manager::CollisionStage::NegotiateCollision(), and carla::traffic_manager::CollisionStage::Update().
ChangeLaneInfo carla::traffic_manager::Parameters::GetForceLaneChange | ( | const ActorId & | actor_id | ) |
Method to query lane change command for a vehicle.
Definition at line 288 of file Parameters.cpp.
References force_lane_change.
Referenced by carla::traffic_manager::LocalizationStage::Update().
bool carla::traffic_manager::Parameters::GetHybridPhysicsMode | ( | ) | const |
Method to retrieve hybrid physics mode.
Definition at line 411 of file Parameters.cpp.
References hybrid_physics_mode.
Referenced by carla::traffic_manager::TrafficManagerLocal::Run(), and carla::traffic_manager::ALSM::Update().
float carla::traffic_manager::Parameters::GetHybridPhysicsRadius | ( | ) | const |
Method to retrieve hybrid physics radius.
Definition at line 240 of file Parameters.cpp.
References hybrid_physics_radius.
Referenced by carla::traffic_manager::ALSM::UpdateRegisteredActorsData().
Method to get a custom route.
Definition at line 471 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::Contains(), custom_route, and carla::traffic_manager::AtomicMap< Key, Value >::GetValue().
Referenced by carla::traffic_manager::LocalizationStage::Update().
float carla::traffic_manager::Parameters::GetKeepRightPercentage | ( | const ActorId & | actor_id | ) |
Method to query percentage probability of keep right rule for a vehicle.
Definition at line 301 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::Contains(), carla::traffic_manager::AtomicMap< Key, Value >::GetValue(), and perc_keep_right.
Referenced by carla::traffic_manager::LocalizationStage::Update().
float carla::traffic_manager::Parameters::GetLaneOffset | ( | const ActorId & | actor_id | ) | const |
Method to query lane offset for a vehicle.
Definition at line 266 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::Contains(), carla::traffic_manager::AtomicMap< Key, Value >::GetValue(), global_lane_offset, and lane_offset.
Referenced by carla::traffic_manager::MotionPlanStage::Update().
float carla::traffic_manager::Parameters::GetLowerBoundaryRespawnDormantVehicles | ( | ) | const |
Method to retrieve minimum distance from hero vehicle when respawning vehicles.
Definition at line 421 of file Parameters.cpp.
References respawn_lower_bound.
Referenced by carla::traffic_manager::MotionPlanStage::Update().
bool carla::traffic_manager::Parameters::GetOSMMode | ( | ) | const |
Method to get Open Street Map mode.
Definition at line 432 of file Parameters.cpp.
References osm_mode.
Referenced by carla::traffic_manager::LocalizationStage::ImportPath(), carla::traffic_manager::LocalizationStage::ImportRoute(), carla::traffic_manager::LocalizationStage::Update(), and carla::traffic_manager::ALSM::Update().
float carla::traffic_manager::Parameters::GetPercentageIgnoreVehicles | ( | const ActorId & | actor_id | ) | const |
Method to get % to ignore any vehicle.
Definition at line 400 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::Contains(), carla::traffic_manager::AtomicMap< Key, Value >::GetValue(), and perc_ignore_vehicles.
Referenced by carla::traffic_manager::CollisionStage::Update().
float carla::traffic_manager::Parameters::GetPercentageIgnoreWalkers | ( | const ActorId & | actor_id | ) | const |
Method to get % to ignore any walker.
Definition at line 379 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::Contains(), carla::traffic_manager::AtomicMap< Key, Value >::GetValue(), and perc_ignore_walkers.
Referenced by carla::traffic_manager::CollisionStage::Update().
float carla::traffic_manager::Parameters::GetPercentageRunningLight | ( | const ActorId & | actor_id | ) | const |
Method to get % to run any traffic light.
Definition at line 357 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::Contains(), carla::traffic_manager::AtomicMap< Key, Value >::GetValue(), and perc_run_traffic_light.
Referenced by carla::traffic_manager::TrafficLightStage::Update().
float carla::traffic_manager::Parameters::GetPercentageRunningSign | ( | const ActorId & | actor_id | ) | const |
Method to get % to run any traffic light.
Definition at line 368 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::Contains(), carla::traffic_manager::AtomicMap< Key, Value >::GetValue(), and perc_run_traffic_sign.
Referenced by carla::traffic_manager::TrafficLightStage::Update().
float carla::traffic_manager::Parameters::GetRandomLeftLaneChangePercentage | ( | const ActorId & | actor_id | ) |
Method to query percentage probability of a random right lane change for a vehicle.
Definition at line 312 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::Contains(), carla::traffic_manager::AtomicMap< Key, Value >::GetValue(), and perc_random_left.
Referenced by carla::traffic_manager::LocalizationStage::Update().
float carla::traffic_manager::Parameters::GetRandomRightLaneChangePercentage | ( | const ActorId & | actor_id | ) |
Method to query percentage probability of a random left lane change for a vehicle.
Definition at line 323 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::Contains(), carla::traffic_manager::AtomicMap< Key, Value >::GetValue(), and perc_random_right.
Referenced by carla::traffic_manager::LocalizationStage::Update().
bool carla::traffic_manager::Parameters::GetRespawnDormantVehicles | ( | ) | const |
Method to retrieve if we are automatically respawning vehicles.
Definition at line 416 of file Parameters.cpp.
References respawn_dormant_vehicles.
Referenced by carla::traffic_manager::MotionPlanStage::Update(), and carla::traffic_manager::ALSM::UpdateRegisteredActorsData().
bool carla::traffic_manager::Parameters::GetSynchronousMode | ( | ) | const |
Method to get synchronous mode.
Definition at line 245 of file Parameters.cpp.
References synchronous_mode.
Referenced by carla::traffic_manager::TrafficManagerLocal::Run(), carla::traffic_manager::TrafficManagerLocal::SetSynchronousMode(), carla::traffic_manager::TrafficManagerLocal::Stop(), carla::traffic_manager::TrafficManagerLocal::SynchronousTick(), and carla::traffic_manager::MotionPlanStage::Update().
double carla::traffic_manager::Parameters::GetSynchronousModeTimeOutInMiliSecond | ( | ) | const |
Get synchronous mode time out.
Definition at line 249 of file Parameters.cpp.
References synchronous_time_out.
bool carla::traffic_manager::Parameters::GetUpdateVehicleLights | ( | const ActorId & | actor_id | ) | const |
Method to get if the vehicle lights should be updates automatically.
Definition at line 390 of file Parameters.cpp.
References auto_update_vehicle_lights, carla::traffic_manager::AtomicMap< Key, Value >::Contains(), and carla::traffic_manager::AtomicMap< Key, Value >::GetValue().
Referenced by carla::traffic_manager::VehicleLightStage::Update().
bool carla::traffic_manager::Parameters::GetUploadPath | ( | const ActorId & | actor_id | ) | const |
Method to get if we are uploading a path.
Definition at line 437 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::Contains(), carla::traffic_manager::AtomicMap< Key, Value >::GetValue(), and upload_path.
Referenced by carla::traffic_manager::LocalizationStage::ImportPath().
bool carla::traffic_manager::Parameters::GetUploadRoute | ( | const ActorId & | actor_id | ) | const |
Method to get if we are uploading a route.
Definition at line 460 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::Contains(), carla::traffic_manager::AtomicMap< Key, Value >::GetValue(), and upload_route.
Referenced by carla::traffic_manager::LocalizationStage::ImportRoute().
float carla::traffic_manager::Parameters::GetUpperBoundaryRespawnDormantVehicles | ( | ) | const |
Method to retrieve maximum distance from hero vehicle when respawning vehicles.
Definition at line 426 of file Parameters.cpp.
References respawn_upper_bound.
Referenced by carla::traffic_manager::MotionPlanStage::Update().
float carla::traffic_manager::Parameters::GetVehicleTargetVelocity | ( | const ActorId & | actor_id, |
const float | speed_limit | ||
) | const |
Method to query target velocity for a vehicle.
Definition at line 253 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::Contains(), exact_desired_speed, carla::traffic_manager::AtomicMap< Key, Value >::GetValue(), global_percentage_difference_from_limit, and percentage_difference_from_speed_limit.
Referenced by carla::traffic_manager::MotionPlanStage::GetLandmarkTargetVelocity(), and carla::traffic_manager::MotionPlanStage::Update().
void carla::traffic_manager::Parameters::RemoveImportedRoute | ( | const ActorId & | actor_id, |
const bool | remove_path | ||
) |
Method to remove a route.
Definition at line 224 of file Parameters.cpp.
References custom_route, carla::traffic_manager::AtomicMap< Key, Value >::RemoveEntry(), and upload_route.
Referenced by carla::traffic_manager::LocalizationStage::ImportRoute(), and carla::traffic_manager::TrafficManagerLocal::RemoveImportedRoute().
void carla::traffic_manager::Parameters::RemoveUploadPath | ( | const ActorId & | actor_id, |
const bool | remove_path | ||
) |
Method to remove a list of points.
Definition at line 203 of file Parameters.cpp.
References custom_path, carla::traffic_manager::AtomicMap< Key, Value >::RemoveEntry(), and upload_path.
Referenced by carla::traffic_manager::LocalizationStage::ImportPath(), and carla::traffic_manager::TrafficManagerLocal::RemoveUploadPath().
void carla::traffic_manager::Parameters::SetAutoLaneChange | ( | const ActorPtr & | actor, |
const bool | enable | ||
) |
Enable/disable automatic lane change on a vehicle.
Definition at line 133 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::AddEntry(), and auto_lane_change.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetAutoLaneChange().
void carla::traffic_manager::Parameters::SetBoundariesRespawnDormantVehicles | ( | const float | lower_bound, |
const float | upper_bound | ||
) |
Method to set boundaries for respawning vehicles.
Definition at line 38 of file Parameters.cpp.
References max_upper_bound, min_lower_bound, respawn_lower_bound, and respawn_upper_bound.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetBoundariesRespawnDormantVehicles().
void carla::traffic_manager::Parameters::SetCollisionDetection | ( | const ActorPtr & | reference_actor, |
const ActorPtr & | other_actor, | ||
const bool | detect_collision | ||
) |
Method to set collision detection rules between vehicles.
Definition at line 75 of file Parameters.cpp.
References ignore_collision.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetCollisionDetection().
void carla::traffic_manager::Parameters::SetCustomPath | ( | const ActorPtr & | actor, |
const Path | path, | ||
const bool | empty_buffer | ||
) |
Method to set our own imported path.
Definition at line 196 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::AddEntry(), custom_path, and upload_path.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetCustomPath().
void carla::traffic_manager::Parameters::SetDesiredSpeed | ( | const ActorPtr & | actor, |
const float | value | ||
) |
Set a vehicle's exact desired velocity.
Definition at line 57 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::AddEntry(), carla::traffic_manager::AtomicMap< Key, Value >::Contains(), exact_desired_speed, percentage_difference_from_speed_limit, and carla::traffic_manager::AtomicMap< Key, Value >::RemoveEntry().
Referenced by carla::traffic_manager::TrafficManagerLocal::SetDesiredSpeed().
void carla::traffic_manager::Parameters::SetDistanceToLeadingVehicle | ( | const ActorPtr & | actor, |
const float | distance | ||
) |
Method to specify how much distance a vehicle should maintain to the leading vehicle.
Definition at line 139 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::AddEntry(), and distance_to_leading_vehicle.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetDistanceToLeadingVehicle().
void carla::traffic_manager::Parameters::SetForceLaneChange | ( | const ActorPtr & | actor, |
const bool | direction | ||
) |
Method to force lane change on a vehicle.
Direction flag can be set to true for left and false for right.
Definition at line 101 of file Parameters.cpp.
References force_lane_change.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetForceLaneChange().
void carla::traffic_manager::Parameters::SetGlobalDistanceToLeadingVehicle | ( | const float | dist | ) |
Method to set the distance to leading vehicle for all registered vehicles.
Definition at line 154 of file Parameters.cpp.
References distance_margin.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetGlobalDistanceToLeadingVehicle().
void carla::traffic_manager::Parameters::SetGlobalLaneOffset | ( | float const | offset | ) |
Method to set a global lane offset displacement from the center line.
Positive values imply a right offset while negative ones mean a left one.
Definition at line 71 of file Parameters.cpp.
References global_lane_offset.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetGlobalLaneOffset().
void carla::traffic_manager::Parameters::SetGlobalPercentageSpeedDifference | ( | float const | percentage | ) |
Set a global % decrease in velocity with respect to the speed limit.
If less than 0, it's a % increase.
Definition at line 66 of file Parameters.cpp.
References global_percentage_difference_from_limit, and min().
Referenced by carla::traffic_manager::TrafficManagerLocal::SetGlobalPercentageSpeedDifference(), and carla::traffic_manager::TrafficManagerLocal::TrafficManagerLocal().
void carla::traffic_manager::Parameters::SetHybridPhysicsMode | ( | const bool | mode_switch | ) |
Method to set hybrid physics mode.
Definition at line 23 of file Parameters.cpp.
References hybrid_physics_mode.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetHybridPhysicsMode().
void carla::traffic_manager::Parameters::SetHybridPhysicsRadius | ( | const float | radius | ) |
Method to set hybrid physics radius.
Definition at line 187 of file Parameters.cpp.
References hybrid_physics_radius.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetHybridPhysicsRadius().
void carla::traffic_manager::Parameters::SetImportedRoute | ( | const ActorPtr & | actor, |
const Route | route, | ||
const bool | empty_buffer | ||
) |
Method to set our own imported route.
Definition at line 217 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::AddEntry(), custom_route, and upload_route.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetImportedRoute().
void carla::traffic_manager::Parameters::SetKeepRightPercentage | ( | const ActorPtr & | actor, |
const float | percentage | ||
) |
Method to set % to keep on the right lane.
Definition at line 108 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::AddEntry(), and perc_keep_right.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetKeepRightPercentage().
void carla::traffic_manager::Parameters::SetLaneOffset | ( | const ActorPtr & | actor, |
const float | offset | ||
) |
Method to set a lane offset displacement from the center line.
Positive values imply a right offset while negative ones mean a left one.
Definition at line 52 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::AddEntry(), and lane_offset.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetLaneOffset().
void carla::traffic_manager::Parameters::SetMaxBoundaries | ( | const float | lower, |
const float | upper | ||
) |
Method to set limits for boundaries when respawning vehicles.
Definition at line 33 of file Parameters.cpp.
References max_upper_bound, and min_lower_bound.
Referenced by carla::traffic_manager::TrafficManagerLocal::Run(), and carla::traffic_manager::TrafficManagerLocal::SetMaxBoundaries().
void carla::traffic_manager::Parameters::SetOSMMode | ( | const bool | mode_switch | ) |
Method to set Open Street Map mode.
Definition at line 192 of file Parameters.cpp.
References osm_mode.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetOSMMode().
void carla::traffic_manager::Parameters::SetPercentageIgnoreVehicles | ( | const ActorPtr & | actor, |
const float | perc | ||
) |
Method to set % to ignore any vehicle.
Definition at line 173 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::AddEntry(), carla::geom::Math::Clamp(), and perc_ignore_vehicles.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetPercentageIgnoreVehicles().
void carla::traffic_manager::Parameters::SetPercentageIgnoreWalkers | ( | const ActorPtr & | actor, |
const float | perc | ||
) |
Method to set % to ignore any vehicle.
Definition at line 180 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::AddEntry(), carla::geom::Math::Clamp(), and perc_ignore_walkers.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetPercentageIgnoreWalkers().
void carla::traffic_manager::Parameters::SetPercentageRunningLight | ( | const ActorPtr & | actor, |
const float | perc | ||
) |
Method to set % to run any traffic light.
Definition at line 159 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::AddEntry(), carla::geom::Math::Clamp(), and perc_run_traffic_light.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetPercentageRunningLight().
void carla::traffic_manager::Parameters::SetPercentageRunningSign | ( | const ActorPtr & | actor, |
const float | perc | ||
) |
Method to set % to run any traffic sign.
Definition at line 166 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::AddEntry(), carla::geom::Math::Clamp(), and perc_run_traffic_sign.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetPercentageRunningSign().
void carla::traffic_manager::Parameters::SetPercentageSpeedDifference | ( | const ActorPtr & | actor, |
const float | percentage | ||
) |
Set a vehicle's % decrease in velocity with respect to the speed limit.
If less than 0, it's a % increase.
Definition at line 43 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::AddEntry(), carla::traffic_manager::AtomicMap< Key, Value >::Contains(), exact_desired_speed, min(), percentage_difference_from_speed_limit, and carla::traffic_manager::AtomicMap< Key, Value >::RemoveEntry().
Referenced by carla::traffic_manager::TrafficManagerLocal::SetPercentageSpeedDifference().
void carla::traffic_manager::Parameters::SetRandomLeftLaneChangePercentage | ( | const ActorPtr & | actor, |
const float | percentage | ||
) |
Method to set % to randomly do a left lane change.
Definition at line 114 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::AddEntry(), and perc_random_left.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetRandomLeftLaneChangePercentage().
void carla::traffic_manager::Parameters::SetRandomRightLaneChangePercentage | ( | const ActorPtr & | actor, |
const float | percentage | ||
) |
Method to set % to randomly do a right lane change.
Definition at line 120 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::AddEntry(), and perc_random_right.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetRandomRightLaneChangePercentage().
void carla::traffic_manager::Parameters::SetRespawnDormantVehicles | ( | const bool | mode_switch | ) |
Method to set if we are automatically respawning vehicles.
Definition at line 28 of file Parameters.cpp.
References respawn_dormant_vehicles.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetRespawnDormantVehicles().
void carla::traffic_manager::Parameters::SetSynchronousMode | ( | const bool | mode_switch = true | ) |
Method to set synchronous mode.
Definition at line 146 of file Parameters.cpp.
References synchronous_mode.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetSynchronousMode().
void carla::traffic_manager::Parameters::SetSynchronousModeTimeOutInMiliSecond | ( | const double | time | ) |
Set Synchronous mode time out.
Definition at line 150 of file Parameters.cpp.
References synchronous_time_out.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetSynchronousModeTimeOutInMiliSecond().
void carla::traffic_manager::Parameters::SetUpdateVehicleLights | ( | const ActorPtr & | actor, |
const bool | do_update | ||
) |
Method to set the automatic vehicle light state update flag.
Definition at line 127 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::AddEntry(), and auto_update_vehicle_lights.
Referenced by carla::traffic_manager::TrafficManagerLocal::SetUpdateVehicleLights().
void carla::traffic_manager::Parameters::UpdateImportedRoute | ( | const ActorId & | actor_id, |
const Route | route | ||
) |
Method to update an already set route.
Definition at line 232 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::AddEntry(), custom_route, and carla::traffic_manager::AtomicMap< Key, Value >::RemoveEntry().
Referenced by carla::traffic_manager::LocalizationStage::ImportRoute(), and carla::traffic_manager::TrafficManagerLocal::UpdateImportedRoute().
void carla::traffic_manager::Parameters::UpdateUploadPath | ( | const ActorId & | actor_id, |
const Path | path | ||
) |
Method to update an already set list of points.
Definition at line 211 of file Parameters.cpp.
References carla::traffic_manager::AtomicMap< Key, Value >::AddEntry(), custom_path, and carla::traffic_manager::AtomicMap< Key, Value >::RemoveEntry().
Referenced by carla::traffic_manager::LocalizationStage::ImportPath(), and carla::traffic_manager::TrafficManagerLocal::UpdateUploadPath().
Map containing auto lane change commands.
Definition at line 57 of file Parameters.h.
Referenced by GetAutoLaneChange(), and SetAutoLaneChange().
Map containing the automatic vehicle lights update flag.
Definition at line 73 of file Parameters.h.
Referenced by GetUpdateVehicleLights(), and SetUpdateVehicleLights().
Structure to hold all custom paths.
Definition at line 97 of file Parameters.h.
Referenced by GetCustomPath(), RemoveUploadPath(), SetCustomPath(), and UpdateUploadPath().
Structure to hold all custom routes.
Definition at line 101 of file Parameters.h.
Referenced by GetImportedRoute(), RemoveImportedRoute(), SetImportedRoute(), and UpdateImportedRoute().
|
private |
Distance margin.
Definition at line 77 of file Parameters.h.
Referenced by GetDistanceToLeadingVehicle(), and SetGlobalDistanceToLeadingVehicle().
Map containing distance to leading vehicle command.
Definition at line 53 of file Parameters.h.
Referenced by GetDistanceToLeadingVehicle(), and SetDistanceToLeadingVehicle().
Target velocity map for individual vehicles, based on a desired velocity.
Definition at line 45 of file Parameters.h.
Referenced by GetVehicleTargetVelocity(), SetDesiredSpeed(), and SetPercentageSpeedDifference().
|
private |
Map containing force lane change commands.
Definition at line 55 of file Parameters.h.
Referenced by GetForceLaneChange(), and SetForceLaneChange().
|
private |
Global lane offset.
Definition at line 49 of file Parameters.h.
Referenced by GetLaneOffset(), and SetGlobalLaneOffset().
|
private |
Global target velocity limit % difference.
Definition at line 47 of file Parameters.h.
Referenced by GetVehicleTargetVelocity(), and SetGlobalPercentageSpeedDifference().
|
private |
Hybrid physics mode switch.
Definition at line 79 of file Parameters.h.
Referenced by GetHybridPhysicsMode(), and SetHybridPhysicsMode().
|
private |
Hybrid physics radius.
Definition at line 91 of file Parameters.h.
Referenced by GetHybridPhysicsRadius(), and SetHybridPhysicsRadius().
|
private |
Map containing a set of actors to be ignored during collision detection.
Definition at line 51 of file Parameters.h.
Referenced by GetCollisionDetection(), and SetCollisionDetection().
Lane offset map for individual vehicles.
Definition at line 43 of file Parameters.h.
Referenced by GetLaneOffset(), and SetLaneOffset().
|
private |
Maximum possible distance to respawn vehicles with respect to the hero vehicle.
Definition at line 89 of file Parameters.h.
Referenced by SetBoundariesRespawnDormantVehicles(), and SetMaxBoundaries().
|
private |
Minimum possible distance to respawn vehicles with respect to the hero vehicle.
Definition at line 87 of file Parameters.h.
Referenced by SetBoundariesRespawnDormantVehicles(), and SetMaxBoundaries().
|
private |
Parameter specifying Open Street Map mode.
Definition at line 93 of file Parameters.h.
Referenced by GetOSMMode(), and SetOSMMode().
Map containing % of ignoring vehicles.
Definition at line 65 of file Parameters.h.
Referenced by GetPercentageIgnoreVehicles(), and SetPercentageIgnoreVehicles().
Map containing % of ignoring walkers.
Definition at line 63 of file Parameters.h.
Referenced by GetPercentageIgnoreWalkers(), and SetPercentageIgnoreWalkers().
Map containing % of keep right rule.
Definition at line 67 of file Parameters.h.
Referenced by GetKeepRightPercentage(), and SetKeepRightPercentage().
Map containing % of random left lane change.
Definition at line 69 of file Parameters.h.
Referenced by GetRandomLeftLaneChangePercentage(), and SetRandomLeftLaneChangePercentage().
Map containing % of random right lane change.
Definition at line 71 of file Parameters.h.
Referenced by GetRandomRightLaneChangePercentage(), and SetRandomRightLaneChangePercentage().
Map containing % of running a traffic light.
Definition at line 59 of file Parameters.h.
Referenced by GetPercentageRunningLight(), and SetPercentageRunningLight().
Map containing % of running a traffic sign.
Definition at line 61 of file Parameters.h.
Referenced by GetPercentageRunningSign(), and SetPercentageRunningSign().
|
private |
Target velocity map for individual vehicles, based on a % diffrerence from speed limit.
Definition at line 41 of file Parameters.h.
Referenced by GetVehicleTargetVelocity(), SetDesiredSpeed(), and SetPercentageSpeedDifference().
|
private |
Automatic respawn mode switch.
Definition at line 81 of file Parameters.h.
Referenced by GetRespawnDormantVehicles(), and SetRespawnDormantVehicles().
|
private |
Minimum distance to respawn vehicles with respect to the hero vehicle.
Definition at line 83 of file Parameters.h.
Referenced by GetLowerBoundaryRespawnDormantVehicles(), and SetBoundariesRespawnDormantVehicles().
|
private |
Maximum distance to respawn vehicles with respect to the hero vehicle.
Definition at line 85 of file Parameters.h.
Referenced by GetUpperBoundaryRespawnDormantVehicles(), and SetBoundariesRespawnDormantVehicles().
|
private |
Synchronous mode switch.
Definition at line 75 of file Parameters.h.
Referenced by GetSynchronousMode(), and SetSynchronousMode().
std::chrono::duration<double, std::milli> carla::traffic_manager::Parameters::synchronous_time_out |
Synchronous mode time out variable.
Definition at line 295 of file Parameters.h.
Referenced by GetSynchronousModeTimeOutInMiliSecond(), Parameters(), and SetSynchronousModeTimeOutInMiliSecond().
Parameter specifying if importing a custom path.
Definition at line 95 of file Parameters.h.
Referenced by GetUploadPath(), RemoveUploadPath(), and SetCustomPath().
Parameter specifying if importing a custom route.
Definition at line 99 of file Parameters.h.
Referenced by GetUploadRoute(), RemoveImportedRoute(), and SetImportedRoute().