CARLA
Private Member Functions | Private Attributes | List of all members
carla::client::detail::Simulator Class Reference

Connects and controls a CARLA Simulator. More...

#include <Simulator.h>

+ Inheritance diagram for carla::client::detail::Simulator:
+ Collaboration diagram for carla::client::detail::Simulator:

Public Member Functions

Constructor
 Simulator (const std::string &host, uint16_t port, size_t worker_threads=0u, bool enable_garbage_collection=false)
 
Load a new episode
EpisodeProxy ReloadEpisode (bool reset_settings=true)
 
EpisodeProxy LoadEpisode (std::string map_name, bool reset_settings=true, rpc::MapLayer map_layers=rpc::MapLayer::All)
 
void LoadLevelLayer (rpc::MapLayer map_layers) const
 
void UnloadLevelLayer (rpc::MapLayer map_layers) const
 
EpisodeProxy LoadOpenDriveEpisode (std::string opendrive, const rpc::OpendriveGenerationParameters &params, bool reset_settings=true)
 
Access to current episode
auto GetCurrentEpisodeId ()
 
void GetReadyCurrentEpisode ()
 
EpisodeProxy GetCurrentEpisode ()
 
World snapshot
World GetWorld ()
 
WorldSnapshot GetWorldSnapshot () const
 
Map related methods
SharedPtr< MapGetCurrentMap ()
 
std::vector< std::string > GetAvailableMaps ()
 
Required files related methods
bool SetFilesBaseFolder (const std::string &path)
 
std::vector< std::string > GetRequiredFiles (const std::string &folder="", const bool download=true) const
 
void RequestFile (const std::string &name) const
 
std::vector< uint8_t > GetCacheFile (const std::string &name, const bool request_otherwise) const
 
Garbage collection policy
GarbageCollectionPolicy GetGarbageCollectionPolicy () const
 
Pure networking operations
void SetNetworkingTimeout (time_duration timeout)
 
time_duration GetNetworkingTimeout ()
 
std::string GetClientVersion ()
 
std::string GetServerVersion ()
 
Tick
WorldSnapshot WaitForTick (time_duration timeout)
 
size_t RegisterOnTickEvent (std::function< void(WorldSnapshot)> callback)
 
void RemoveOnTickEvent (size_t id)
 
uint64_t Tick (time_duration timeout)
 
Access to global objects in the episode
std ::string GetEndpoint ()
 
bool IsTrafficManagerRunning (uint16_t port) const
 Query to know if a Traffic Manager is running on port. More...
 
std::pair< std::string, uint16_t > GetTrafficManagerRunning (uint16_t port) const
 Gets a pair filled with the <IP, port> of the Trafic Manager running on port. More...
 
bool AddTrafficManagerRunning (std::pair< std::string, uint16_t > trafficManagerInfo) const
 Informs that a Traffic Manager is running on <IP, port> More...
 
void DestroyTrafficManager (uint16_t port) const
 
void AddPendingException (std::string e)
 
SharedPtr< BlueprintLibraryGetBlueprintLibrary ()
 
rpc::VehicleLightStateList GetVehiclesLightStates ()
 Returns a list of pairs where the firts element is the vehicle ID and the second one is the light state. More...
 
SharedPtr< ActorGetSpectator ()
 
rpc::EpisodeSettings GetEpisodeSettings ()
 
uint64_t SetEpisodeSettings (const rpc::EpisodeSettings &settings)
 
rpc::WeatherParameters GetWeatherParameters ()
 
void SetWeatherParameters (const rpc::WeatherParameters &weather)
 
rpc::VehiclePhysicsControl GetVehiclePhysicsControl (const Vehicle &vehicle) const
 
rpc::VehicleLightState GetVehicleLightState (const Vehicle &vehicle) const
 
std::vector< geom::BoundingBoxGetLevelBBs (uint8_t queried_tag) const
 Returns all the BBs of all the elements of the level. More...
 
std::vector< rpc::EnvironmentObjectGetEnvironmentObjects (uint8_t queried_tag) const
 
void EnableEnvironmentObjects (std::vector< uint64_t > env_objects_ids, bool enable) const
 
std::pair< bool, rpc::LabelledPointProjectPoint (geom::Location location, geom::Vector3D direction, float search_distance) const
 
std::vector< rpc::LabelledPointCastRay (geom::Location start_location, geom::Location end_location) const
 
AI
std::shared_ptr< WalkerNavigationGetNavigation ()
 
void NavigationTick ()
 
void RegisterAIController (const WalkerAIController &controller)
 
void UnregisterAIController (const WalkerAIController &controller)
 
boost::optional< geom::LocationGetRandomLocationFromNavigation ()
 
void SetPedestriansCrossFactor (float percentage)
 
void SetPedestriansSeed (unsigned int seed)
 
General operations with actors
boost::optional< rpc::ActorGetActorById (ActorId id) const
 
std::vector< rpc::ActorGetActorsById (const std::vector< ActorId > &actor_ids) const
 
std::vector< rpc::ActorGetAllTheActorsInTheEpisode () const
 
SharedPtr< ActorMakeActor (rpc::Actor actor_description, GarbageCollectionPolicy gc=GarbageCollectionPolicy::Disabled)
 Creates an actor instance out of a description of an existing actor. More...
 
SharedPtr< ActorSpawnActor (const ActorBlueprint &blueprint, const geom::Transform &transform, Actor *parent=nullptr, rpc::AttachmentType attachment_type=rpc::AttachmentType::Rigid, GarbageCollectionPolicy gc=GarbageCollectionPolicy::Inherit)
 Spawns an actor into the simulation. More...
 
bool DestroyActor (Actor &actor)
 
bool DestroyActor (ActorId actor_id)
 
ActorSnapshot GetActorSnapshot (ActorId actor_id) const
 
ActorSnapshot GetActorSnapshot (const Actor &actor) const
 
rpc::ActorState GetActorState (const Actor &actor) const
 
geom::Location GetActorLocation (const Actor &actor) const
 
geom::Transform GetActorTransform (const Actor &actor) const
 
geom::Vector3D GetActorVelocity (const Actor &actor) const
 
void SetActorTargetVelocity (const Actor &actor, const geom::Vector3D &vector)
 
geom::Vector3D GetActorAngularVelocity (const Actor &actor) const
 
void SetActorTargetAngularVelocity (const Actor &actor, const geom::Vector3D &vector)
 
void EnableActorConstantVelocity (const Actor &actor, const geom::Vector3D &vector)
 
void DisableActorConstantVelocity (const Actor &actor)
 
void AddActorImpulse (const Actor &actor, const geom::Vector3D &impulse)
 
void AddActorImpulse (const Actor &actor, const geom::Vector3D &impulse, const geom::Vector3D &location)
 
void AddActorForce (const Actor &actor, const geom::Vector3D &force)
 
void AddActorForce (const Actor &actor, const geom::Vector3D &force, const geom::Vector3D &location)
 
void AddActorAngularImpulse (const Actor &actor, const geom::Vector3D &vector)
 
void AddActorTorque (const Actor &actor, const geom::Vector3D &torque)
 
geom::Vector3D GetActorAcceleration (const Actor &actor) const
 
void SetActorLocation (Actor &actor, const geom::Location &location)
 
void SetActorTransform (Actor &actor, const geom::Transform &transform)
 
void SetActorSimulatePhysics (Actor &actor, bool enabled)
 
void SetActorCollisions (Actor &actor, bool enabled)
 
void SetActorCollisions (ActorId actor_id, bool enabled)
 
void SetActorDead (Actor &actor)
 
void SetActorDead (ActorId actor_id)
 
void SetActorEnableGravity (Actor &actor, bool enabled)
 
Operations with vehicles
void SetVehicleAutopilot (Vehicle &vehicle, bool enabled=true)
 
void ShowVehicleDebugTelemetry (Vehicle &vehicle, bool enabled=true)
 
void SetLightsToVehicle (Vehicle &vehicle, const rpc::VehicleControl &control)
 
void ApplyControlToVehicle (Vehicle &vehicle, const rpc::VehicleControl &control)
 
void ApplyAckermannControlToVehicle (Vehicle &vehicle, const rpc::VehicleAckermannControl &control)
 
rpc::AckermannControllerSettings GetAckermannControllerSettings (const Vehicle &vehicle) const
 
void ApplyAckermannControllerSettings (Vehicle &vehicle, const rpc::AckermannControllerSettings &settings)
 
void ApplyControlToWalker (Walker &walker, const rpc::WalkerControl &control)
 
rpc::WalkerBoneControlOut GetBonesTransform (Walker &walker)
 
void SetBonesTransform (Walker &walker, const rpc::WalkerBoneControlIn &bones)
 
void BlendPose (Walker &walker, float blend)
 
void GetPoseFromAnimation (Walker &walker)
 
void ApplyPhysicsControlToVehicle (Vehicle &vehicle, const rpc::VehiclePhysicsControl &physicsControl)
 
void SetLightStateToVehicle (Vehicle &vehicle, const rpc::VehicleLightState light_state)
 
void OpenVehicleDoor (Vehicle &vehicle, const rpc::VehicleDoor door_idx)
 
void CloseVehicleDoor (Vehicle &vehicle, const rpc::VehicleDoor door_idx)
 
void SetWheelSteerDirection (Vehicle &vehicle, rpc::VehicleWheelLocation wheel_location, float angle_in_deg)
 
float GetWheelSteerAngle (Vehicle &vehicle, rpc::VehicleWheelLocation wheel_location)
 
void EnableCarSim (Vehicle &vehicle, std::string simfile_path)
 
void UseCarSimRoad (Vehicle &vehicle, bool enabled)
 
void EnableChronoPhysics (Vehicle &vehicle, uint64_t MaxSubsteps, float MaxSubstepDeltaTime, std::string VehicleJSON, std::string PowertrainJSON, std::string TireJSON, std::string BaseJSONPath)
 
Operations with the recorder
std::string StartRecorder (std::string name, bool additional_data)
 
void StopRecorder (void)
 
std::string ShowRecorderFileInfo (std::string name, bool show_all)
 
std::string ShowRecorderCollisions (std::string name, char type1, char type2)
 
std::string ShowRecorderActorsBlocked (std::string name, double min_time, double min_distance)
 
std::string ReplayFile (std::string name, double start, double duration, uint32_t follow_id, bool replay_sensors)
 
void SetReplayerTimeFactor (double time_factor)
 
void SetReplayerIgnoreHero (bool ignore_hero)
 
void SetReplayerIgnoreSpectator (bool ignore_spectator)
 
void StopReplayer (bool keep_actors)
 
Operations with sensors
void SubscribeToSensor (const Sensor &sensor, std::function< void(SharedPtr< sensor::SensorData >)> callback)
 
void UnSubscribeFromSensor (Actor &sensor)
 
void EnableForROS (const Sensor &sensor)
 
void DisableForROS (const Sensor &sensor)
 
bool IsEnabledForROS (const Sensor &sensor)
 
void SubscribeToGBuffer (Actor &sensor, uint32_t gbuffer_id, std::function< void(SharedPtr< sensor::SensorData >)> callback)
 
void UnSubscribeFromGBuffer (Actor &sensor, uint32_t gbuffer_id)
 
Operations with traffic lights
void SetTrafficLightState (TrafficLight &trafficLight, const rpc::TrafficLightState trafficLightState)
 
void SetTrafficLightGreenTime (TrafficLight &trafficLight, float greenTime)
 
void SetTrafficLightYellowTime (TrafficLight &trafficLight, float yellowTime)
 
void SetTrafficLightRedTime (TrafficLight &trafficLight, float redTime)
 
void FreezeTrafficLight (TrafficLight &trafficLight, bool freeze)
 
void ResetTrafficLightGroup (TrafficLight &trafficLight)
 
void ResetAllTrafficLights ()
 
std::vector< geom::BoundingBoxGetLightBoxes (const TrafficLight &trafficLight) const
 
std::vector< ActorIdGetGroupTrafficLights (TrafficLight &trafficLight)
 
Debug
void DrawDebugShape (const rpc::DebugShape &shape)
 
Apply commands in batch
void ApplyBatch (std::vector< rpc::Command > commands, bool do_tick_cue)
 
auto ApplyBatchSync (std::vector< rpc::Command > commands, bool do_tick_cue)
 
Operations lights
SharedPtr< LightManagerGetLightManager () const
 
std::vector< rpc::LightStateQueryLightsStateToServer () const
 
void UpdateServerLightsState (std::vector< rpc::LightState > &lights, bool discard_client=false) const
 
void UpdateDayNightCycle (const bool active) const
 
size_t RegisterLightUpdateChangeEvent (std::function< void(WorldSnapshot)> callback)
 
void RemoveLightUpdateChangeEvent (size_t id)
 
void FreezeAllTrafficLights (bool frozen)
 
Texture updating operations
void ApplyColorTextureToObjects (const std::vector< std::string > &objects_name, const rpc::MaterialParameter &parameter, const rpc::TextureColor &Texture)
 – Texture updating operations More...
 
void ApplyColorTextureToObjects (const std::vector< std::string > &objects_name, const rpc::MaterialParameter &parameter, const rpc::TextureFloatColor &Texture)
 
std::vector< std::string > GetNamesOfAllObjects () const
 

Private Member Functions

bool ShouldUpdateMap (rpc::MapInfo &map_info)
 
- Private Member Functions inherited from carla::profiler::LifetimeProfiled
 LifetimeProfiled ()=default
 
- Private Member Functions inherited from carla::NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
 NonCopyable (NonCopyable &&)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
NonCopyableoperator= (NonCopyable &&)=delete
 

Private Attributes

SharedPtr< Map_cached_map
 
Client _client
 
std::shared_ptr< Episode_episode
 
const GarbageCollectionPolicy _gc_policy
 
SharedPtr< LightManager_light_manager
 
std::string _open_drive_file
 

Detailed Description

Connects and controls a CARLA Simulator.

Definition at line 49 of file Simulator.h.

Constructor & Destructor Documentation

◆ Simulator()

carla::client::detail::Simulator::Simulator ( const std::string &  host,
uint16_t  port,
size_t  worker_threads = 0u,
bool  enable_garbage_collection = false 
)
explicit

Definition at line 72 of file Simulator.cpp.

References carla::client::Disabled, and carla::client::Enabled.

Member Function Documentation

◆ AddActorAngularImpulse()

void carla::client::detail::Simulator::AddActorAngularImpulse ( const Actor actor,
const geom::Vector3D vector 
)
inline

Definition at line 429 of file Simulator.h.

References _client, carla::client::detail::Client::AddActorAngularImpulse(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ AddActorForce() [1/2]

void carla::client::detail::Simulator::AddActorForce ( const Actor actor,
const geom::Vector3D force 
)
inline

Definition at line 421 of file Simulator.h.

References _client, carla::client::detail::Client::AddActorForce(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ AddActorForce() [2/2]

void carla::client::detail::Simulator::AddActorForce ( const Actor actor,
const geom::Vector3D force,
const geom::Vector3D location 
)
inline

Definition at line 425 of file Simulator.h.

References _client, carla::client::detail::Client::AddActorForce(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ AddActorImpulse() [1/2]

void carla::client::detail::Simulator::AddActorImpulse ( const Actor actor,
const geom::Vector3D impulse 
)
inline

Definition at line 413 of file Simulator.h.

References _client, carla::client::detail::Client::AddActorImpulse(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ AddActorImpulse() [2/2]

void carla::client::detail::Simulator::AddActorImpulse ( const Actor actor,
const geom::Vector3D impulse,
const geom::Vector3D location 
)
inline

Definition at line 417 of file Simulator.h.

References _client, carla::client::detail::Client::AddActorImpulse(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ AddActorTorque()

void carla::client::detail::Simulator::AddActorTorque ( const Actor actor,
const geom::Vector3D torque 
)
inline

Definition at line 433 of file Simulator.h.

References _client, carla::client::detail::Client::AddActorAngularImpulse(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ AddPendingException()

void carla::client::detail::Simulator::AddPendingException ( std::string  e)
inline

Definition at line 236 of file Simulator.h.

References _episode, GetBlueprintLibrary(), GetSpectator(), and GetVehiclesLightStates().

+ Here is the call graph for this function:

◆ AddTrafficManagerRunning()

bool carla::client::detail::Simulator::AddTrafficManagerRunning ( std::pair< std::string, uint16_t >  trafficManagerInfo) const
inline

Informs that a Traffic Manager is running on <IP, port>

Definition at line 228 of file Simulator.h.

References _client, and carla::client::detail::Client::AddTrafficManagerRunning().

+ Here is the call graph for this function:

◆ ApplyAckermannControllerSettings()

void carla::client::detail::Simulator::ApplyAckermannControllerSettings ( Vehicle vehicle,
const rpc::AckermannControllerSettings settings 
)
inline

Definition at line 503 of file Simulator.h.

References _client, carla::client::detail::Client::ApplyAckermannControllerSettings(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ ApplyAckermannControlToVehicle()

void carla::client::detail::Simulator::ApplyAckermannControlToVehicle ( Vehicle vehicle,
const rpc::VehicleAckermannControl control 
)
inline

Definition at line 495 of file Simulator.h.

References _client, carla::client::detail::Client::ApplyAckermannControlToVehicle(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ ApplyBatch()

void carla::client::detail::Simulator::ApplyBatch ( std::vector< rpc::Command commands,
bool  do_tick_cue 
)
inline

Definition at line 707 of file Simulator.h.

References _client, and carla::client::detail::Client::ApplyBatch().

+ Here is the call graph for this function:

◆ ApplyBatchSync()

auto carla::client::detail::Simulator::ApplyBatchSync ( std::vector< rpc::Command commands,
bool  do_tick_cue 
)
inline

Definition at line 711 of file Simulator.h.

References _client, and carla::client::detail::Client::ApplyBatchSync().

+ Here is the call graph for this function:

◆ ApplyColorTextureToObjects() [1/2]

void carla::client::detail::Simulator::ApplyColorTextureToObjects ( const std::vector< std::string > &  objects_name,
const rpc::MaterialParameter parameter,
const rpc::TextureColor Texture 
)

– Texture updating operations

Definition at line 446 of file Simulator.cpp.

References _client, and carla::client::detail::Client::ApplyColorTextureToObjects().

Referenced by RemoveLightUpdateChangeEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ApplyColorTextureToObjects() [2/2]

void carla::client::detail::Simulator::ApplyColorTextureToObjects ( const std::vector< std::string > &  objects_name,
const rpc::MaterialParameter parameter,
const rpc::TextureFloatColor Texture 
)

Definition at line 453 of file Simulator.cpp.

References _client, and carla::client::detail::Client::ApplyColorTextureToObjects().

+ Here is the call graph for this function:

◆ ApplyControlToVehicle()

void carla::client::detail::Simulator::ApplyControlToVehicle ( Vehicle vehicle,
const rpc::VehicleControl control 
)
inline

Definition at line 491 of file Simulator.h.

References _client, carla::client::detail::Client::ApplyControlToVehicle(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ ApplyControlToWalker()

void carla::client::detail::Simulator::ApplyControlToWalker ( Walker walker,
const rpc::WalkerControl control 
)
inline

Definition at line 507 of file Simulator.h.

References _client, carla::client::detail::Client::ApplyControlToWalker(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ ApplyPhysicsControlToVehicle()

void carla::client::detail::Simulator::ApplyPhysicsControlToVehicle ( Vehicle vehicle,
const rpc::VehiclePhysicsControl physicsControl 
)
inline

Definition at line 527 of file Simulator.h.

References _client, carla::client::detail::Client::ApplyPhysicsControlToVehicle(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ BlendPose()

void carla::client::detail::Simulator::BlendPose ( Walker walker,
float  blend 
)
inline

Definition at line 519 of file Simulator.h.

References _client, carla::client::detail::Client::BlendPose(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ CastRay()

std::vector<rpc::LabelledPoint> carla::client::detail::Simulator::CastRay ( geom::Location  start_location,
geom::Location  end_location 
) const
inline

Definition at line 290 of file Simulator.h.

References _client, carla::client::detail::Client::CastRay(), GetNavigation(), GetRandomLocationFromNavigation(), NavigationTick(), RegisterAIController(), SetPedestriansCrossFactor(), SetPedestriansSeed(), and UnregisterAIController().

+ Here is the call graph for this function:

◆ CloseVehicleDoor()

void carla::client::detail::Simulator::CloseVehicleDoor ( Vehicle vehicle,
const rpc::VehicleDoor  door_idx 
)
inline

Definition at line 539 of file Simulator.h.

References _client, carla::client::detail::Client::CloseVehicleDoor(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ DestroyActor() [1/2]

bool carla::client::detail::Simulator::DestroyActor ( Actor actor)

Definition at line 375 of file Simulator.cpp.

References _client, carla::client::detail::EpisodeProxyImpl< PointerT >::Clear(), carla::client::detail::Client::DestroyActor(), carla::client::detail::ActorState::GetDisplayId(), carla::client::detail::ActorState::GetEpisode(), carla::client::detail::ActorState::GetId(), and carla::log_debug().

Referenced by MakeActor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DestroyActor() [2/2]

bool carla::client::detail::Simulator::DestroyActor ( ActorId  actor_id)
inline

Definition at line 364 of file Simulator.h.

References _client, and carla::client::detail::Client::DestroyActor().

+ Here is the call graph for this function:

◆ DestroyTrafficManager()

void carla::client::detail::Simulator::DestroyTrafficManager ( uint16_t  port) const
inline

Definition at line 232 of file Simulator.h.

References _client, and carla::client::detail::Client::DestroyTrafficManager().

+ Here is the call graph for this function:

◆ DisableActorConstantVelocity()

void carla::client::detail::Simulator::DisableActorConstantVelocity ( const Actor actor)
inline

Definition at line 409 of file Simulator.h.

References _client, carla::client::detail::Client::DisableActorConstantVelocity(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ DisableForROS()

void carla::client::detail::Simulator::DisableForROS ( const Sensor sensor)

Definition at line 414 of file Simulator.cpp.

References _client, carla::client::detail::Client::DisableForROS(), carla::client::detail::ActorState::GetActorDescription(), and carla::rpc::Actor::GetStreamToken().

Referenced by StopReplayer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DrawDebugShape()

void carla::client::detail::Simulator::DrawDebugShape ( const rpc::DebugShape shape)
inline

Definition at line 697 of file Simulator.h.

References _client, and carla::client::detail::Client::DrawDebugShape().

+ Here is the call graph for this function:

◆ EnableActorConstantVelocity()

void carla::client::detail::Simulator::EnableActorConstantVelocity ( const Actor actor,
const geom::Vector3D vector 
)
inline

Definition at line 405 of file Simulator.h.

References _client, carla::client::detail::Client::EnableActorConstantVelocity(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ EnableCarSim()

void carla::client::detail::Simulator::EnableCarSim ( Vehicle vehicle,
std::string  simfile_path 
)
inline

Definition at line 551 of file Simulator.h.

References _client, carla::client::detail::Client::EnableCarSim(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ EnableChronoPhysics()

void carla::client::detail::Simulator::EnableChronoPhysics ( Vehicle vehicle,
uint64_t  MaxSubsteps,
float  MaxSubstepDeltaTime,
std::string  VehicleJSON,
std::string  PowertrainJSON,
std::string  TireJSON,
std::string  BaseJSONPath 
)
inline

Definition at line 559 of file Simulator.h.

References _client, carla::client::detail::Client::EnableChronoPhysics(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ EnableEnvironmentObjects()

void carla::client::detail::Simulator::EnableEnvironmentObjects ( std::vector< uint64_t >  env_objects_ids,
bool  enable 
) const
inline

Definition at line 279 of file Simulator.h.

References _client, and carla::client::detail::Client::EnableEnvironmentObjects().

+ Here is the call graph for this function:

◆ EnableForROS()

void carla::client::detail::Simulator::EnableForROS ( const Sensor sensor)

Definition at line 410 of file Simulator.cpp.

References _client, carla::client::detail::Client::EnableForROS(), carla::client::detail::ActorState::GetActorDescription(), and carla::rpc::Actor::GetStreamToken().

Referenced by StopReplayer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FreezeAllTrafficLights()

void carla::client::detail::Simulator::FreezeAllTrafficLights ( bool  frozen)

Definition at line 438 of file Simulator.cpp.

References _client, and carla::client::detail::Client::FreezeAllTrafficLights().

Referenced by RemoveLightUpdateChangeEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FreezeTrafficLight()

void carla::client::detail::Simulator::FreezeTrafficLight ( TrafficLight trafficLight,
bool  freeze 
)
inline

Definition at line 671 of file Simulator.h.

References _client, carla::client::detail::Client::FreezeTrafficLight(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ GetAckermannControllerSettings()

rpc::AckermannControllerSettings carla::client::detail::Simulator::GetAckermannControllerSettings ( const Vehicle vehicle) const
inline

Definition at line 499 of file Simulator.h.

References _client, carla::client::detail::Client::GetAckermannControllerSettings(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ GetActorAcceleration()

geom::Vector3D carla::client::detail::Simulator::GetActorAcceleration ( const Actor actor) const
inline

Definition at line 437 of file Simulator.h.

References carla::client::ActorSnapshot::acceleration, and GetActorSnapshot().

+ Here is the call graph for this function:

◆ GetActorAngularVelocity()

geom::Vector3D carla::client::detail::Simulator::GetActorAngularVelocity ( const Actor actor) const
inline

Definition at line 398 of file Simulator.h.

References carla::client::ActorSnapshot::angular_velocity, and GetActorSnapshot().

+ Here is the call graph for this function:

◆ GetActorById()

boost::optional<rpc::Actor> carla::client::detail::Simulator::GetActorById ( ActorId  id) const
inline

Definition at line 321 of file Simulator.h.

References _episode, and DEBUG_ASSERT.

◆ GetActorLocation()

geom::Location carla::client::detail::Simulator::GetActorLocation ( const Actor actor) const
inline

Definition at line 382 of file Simulator.h.

References GetActorSnapshot(), carla::geom::Transform::location, and carla::client::ActorSnapshot::transform.

+ Here is the call graph for this function:

◆ GetActorsById()

std::vector<rpc::Actor> carla::client::detail::Simulator::GetActorsById ( const std::vector< ActorId > &  actor_ids) const
inline

Definition at line 326 of file Simulator.h.

References _episode, and DEBUG_ASSERT.

◆ GetActorSnapshot() [1/2]

ActorSnapshot carla::client::detail::Simulator::GetActorSnapshot ( ActorId  actor_id) const
inline

Definition at line 369 of file Simulator.h.

References _episode, and DEBUG_ASSERT.

Referenced by GetActorAcceleration(), GetActorAngularVelocity(), GetActorLocation(), GetActorSnapshot(), GetActorState(), GetActorTransform(), and GetActorVelocity().

+ Here is the caller graph for this function:

◆ GetActorSnapshot() [2/2]

ActorSnapshot carla::client::detail::Simulator::GetActorSnapshot ( const Actor actor) const
inline

Definition at line 374 of file Simulator.h.

References GetActorSnapshot(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ GetActorState()

rpc::ActorState carla::client::detail::Simulator::GetActorState ( const Actor actor) const
inline

Definition at line 378 of file Simulator.h.

References carla::client::ActorSnapshot::actor_state, and GetActorSnapshot().

+ Here is the call graph for this function:

◆ GetActorTransform()

geom::Transform carla::client::detail::Simulator::GetActorTransform ( const Actor actor) const
inline

Definition at line 386 of file Simulator.h.

References GetActorSnapshot(), and carla::client::ActorSnapshot::transform.

+ Here is the call graph for this function:

◆ GetActorVelocity()

geom::Vector3D carla::client::detail::Simulator::GetActorVelocity ( const Actor actor) const
inline

Definition at line 390 of file Simulator.h.

References GetActorSnapshot(), and carla::client::ActorSnapshot::velocity.

+ Here is the call graph for this function:

◆ GetAllTheActorsInTheEpisode()

std::vector<rpc::Actor> carla::client::detail::Simulator::GetAllTheActorsInTheEpisode ( ) const
inline

Definition at line 331 of file Simulator.h.

References _episode, and DEBUG_ASSERT.

◆ GetAvailableMaps()

std::vector<std::string> carla::client::detail::Simulator::GetAvailableMaps ( )
inline

Definition at line 136 of file Simulator.h.

References _client, carla::client::detail::Client::GetAvailableMaps(), GetCacheFile(), GetRequiredFiles(), RequestFile(), and SetFilesBaseFolder().

+ Here is the call graph for this function:

◆ GetBlueprintLibrary()

SharedPtr< BlueprintLibrary > carla::client::detail::Simulator::GetBlueprintLibrary ( )

Definition at line 242 of file Simulator.cpp.

References _client, and carla::client::detail::Client::GetActorDefinitions().

Referenced by AddPendingException().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetBonesTransform()

rpc::WalkerBoneControlOut carla::client::detail::Simulator::GetBonesTransform ( Walker walker)
inline

Definition at line 511 of file Simulator.h.

References _client, carla::client::detail::Client::GetBonesTransform(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ GetCacheFile()

std::vector< uint8_t > carla::client::detail::Simulator::GetCacheFile ( const std::string &  name,
const bool  request_otherwise 
) const

Definition at line 200 of file Simulator.cpp.

References _client, and carla::client::detail::Client::GetCacheFile().

Referenced by GetAvailableMaps().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetClientVersion()

std::string carla::client::detail::Simulator::GetClientVersion ( )
inline

Definition at line 178 of file Simulator.h.

References _client, and carla::client::detail::Client::GetClientVersion().

+ Here is the call graph for this function:

◆ GetCurrentEpisode()

EpisodeProxy carla::client::detail::Simulator::GetCurrentEpisode ( )

Definition at line 141 of file Simulator.cpp.

References GetReadyCurrentEpisode().

Referenced by GetCurrentEpisodeId(), GetWorld(), LoadEpisode(), MakeActor(), and SpawnActor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCurrentEpisodeId()

auto carla::client::detail::Simulator::GetCurrentEpisodeId ( )
inline
Precondition
Cannot be called previous to GetCurrentEpisode.

Definition at line 98 of file Simulator.h.

References _episode, DEBUG_ASSERT, GetCurrentEpisode(), and GetReadyCurrentEpisode().

+ Here is the call graph for this function:

◆ GetCurrentMap()

SharedPtr< Map > carla::client::detail::Simulator::GetCurrentMap ( )

Definition at line 157 of file Simulator.cpp.

References _cached_map, _client, _episode, _open_drive_file, DEBUG_ASSERT, carla::client::FileTransfer::FileExists(), carla::client::detail::Client::GetMapData(), carla::client::detail::Client::GetMapInfo(), carla::client::detail::Client::GetRequiredFiles(), carla::rpc::MapInfo::name, and reverse().

Referenced by GetWorldSnapshot().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetEndpoint()

std :: string carla::client::detail::Simulator::GetEndpoint ( )
inline

Definition at line 212 of file Simulator.h.

References _client, and carla::client::detail::Client::GetEndpoint().

+ Here is the call graph for this function:

◆ GetEnvironmentObjects()

std::vector<rpc::EnvironmentObject> carla::client::detail::Simulator::GetEnvironmentObjects ( uint8_t  queried_tag) const
inline

Definition at line 275 of file Simulator.h.

References _client, and carla::client::detail::Client::GetEnvironmentObjects().

+ Here is the call graph for this function:

◆ GetEpisodeSettings()

rpc::EpisodeSettings carla::client::detail::Simulator::GetEpisodeSettings ( )
inline

Definition at line 248 of file Simulator.h.

References _client, carla::client::detail::Client::GetEpisodeSettings(), and SetEpisodeSettings().

Referenced by GetReadyCurrentEpisode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetGarbageCollectionPolicy()

GarbageCollectionPolicy carla::client::detail::Simulator::GetGarbageCollectionPolicy ( ) const
inline

Definition at line 160 of file Simulator.h.

References _gc_policy.

◆ GetGroupTrafficLights()

std::vector<ActorId> carla::client::detail::Simulator::GetGroupTrafficLights ( TrafficLight trafficLight)
inline

Definition at line 687 of file Simulator.h.

References _client, carla::client::detail::Client::GetGroupTrafficLights(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ GetLevelBBs()

std::vector<geom::BoundingBox> carla::client::detail::Simulator::GetLevelBBs ( uint8_t  queried_tag) const
inline

Returns all the BBs of all the elements of the level.

Definition at line 271 of file Simulator.h.

References _client, and carla::client::detail::Client::GetLevelBBs().

+ Here is the call graph for this function:

◆ GetLightBoxes()

std::vector<geom::BoundingBox> carla::client::detail::Simulator::GetLightBoxes ( const TrafficLight trafficLight) const
inline

Definition at line 683 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetLightBoxes().

+ Here is the call graph for this function:

◆ GetLightManager()

SharedPtr<LightManager> carla::client::detail::Simulator::GetLightManager ( ) const
inline

Definition at line 721 of file Simulator.h.

References _light_manager.

◆ GetNamesOfAllObjects()

std::vector< std::string > carla::client::detail::Simulator::GetNamesOfAllObjects ( ) const

Definition at line 460 of file Simulator.cpp.

References _client, and carla::client::detail::Client::GetNamesOfAllObjects().

Referenced by RemoveLightUpdateChangeEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetNavigation()

std::shared_ptr< WalkerNavigation > carla::client::detail::Simulator::GetNavigation ( )

Definition at line 288 of file Simulator.cpp.

References _episode, and DEBUG_ASSERT.

Referenced by CastRay().

+ Here is the caller graph for this function:

◆ GetNetworkingTimeout()

time_duration carla::client::detail::Simulator::GetNetworkingTimeout ( )
inline

Definition at line 174 of file Simulator.h.

References _client, and carla::client::detail::Client::GetTimeout().

+ Here is the call graph for this function:

◆ GetPoseFromAnimation()

void carla::client::detail::Simulator::GetPoseFromAnimation ( Walker walker)
inline

Definition at line 523 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetPoseFromAnimation().

+ Here is the call graph for this function:

◆ GetRandomLocationFromNavigation()

boost::optional< geom::Location > carla::client::detail::Simulator::GetRandomLocationFromNavigation ( )

Definition at line 323 of file Simulator.cpp.

References _episode, and DEBUG_ASSERT.

Referenced by CastRay().

+ Here is the caller graph for this function:

◆ GetReadyCurrentEpisode()

void carla::client::detail::Simulator::GetReadyCurrentEpisode ( )

Definition at line 130 of file Simulator.cpp.

References _client, _episode, _light_manager, GetEpisodeSettings(), carla::client::detail::ValidateVersions(), and WaitForTick().

Referenced by GetCurrentEpisode(), and GetCurrentEpisodeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRequiredFiles()

std::vector< std::string > carla::client::detail::Simulator::GetRequiredFiles ( const std::string &  folder = "",
const bool  download = true 
) const

Definition at line 192 of file Simulator.cpp.

References _client, and carla::client::detail::Client::GetRequiredFiles().

Referenced by GetAvailableMaps().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetServerVersion()

std::string carla::client::detail::Simulator::GetServerVersion ( )
inline

Definition at line 182 of file Simulator.h.

References _client, carla::client::detail::Client::GetServerVersion(), and WaitForTick().

+ Here is the call graph for this function:

◆ GetSpectator()

SharedPtr< Actor > carla::client::detail::Simulator::GetSpectator ( )

Definition at line 251 of file Simulator.cpp.

References _client, carla::client::detail::Client::GetSpectator(), and MakeActor().

Referenced by AddPendingException().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTrafficManagerRunning()

std::pair<std::string, uint16_t> carla::client::detail::Simulator::GetTrafficManagerRunning ( uint16_t  port) const
inline

Gets a pair filled with the <IP, port> of the Trafic Manager running on port.

If there is no Traffic Manager running the pair will be ("", 0)

Definition at line 223 of file Simulator.h.

References _client, and carla::client::detail::Client::GetTrafficManagerRunning().

+ Here is the call graph for this function:

◆ GetVehicleLightState()

rpc::VehicleLightState carla::client::detail::Simulator::GetVehicleLightState ( const Vehicle vehicle) const
inline

Definition at line 266 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetVehicleLightState().

+ Here is the call graph for this function:

◆ GetVehiclePhysicsControl()

rpc::VehiclePhysicsControl carla::client::detail::Simulator::GetVehiclePhysicsControl ( const Vehicle vehicle) const
inline

Definition at line 262 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetVehiclePhysicsControl().

+ Here is the call graph for this function:

◆ GetVehiclesLightStates()

rpc::VehicleLightStateList carla::client::detail::Simulator::GetVehiclesLightStates ( )

Returns a list of pairs where the firts element is the vehicle ID and the second one is the light state.

Definition at line 247 of file Simulator.cpp.

References _client, and carla::client::detail::Client::GetVehiclesLightStates().

Referenced by AddPendingException().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetWeatherParameters()

rpc::WeatherParameters carla::client::detail::Simulator::GetWeatherParameters ( )
inline

Definition at line 254 of file Simulator.h.

References _client, and carla::client::detail::Client::GetWeatherParameters().

+ Here is the call graph for this function:

◆ GetWheelSteerAngle()

float carla::client::detail::Simulator::GetWheelSteerAngle ( Vehicle vehicle,
rpc::VehicleWheelLocation  wheel_location 
)
inline

Definition at line 547 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetWheelSteerAngle().

+ Here is the call graph for this function:

◆ GetWorld()

World carla::client::detail::Simulator::GetWorld ( )
inline

Definition at line 113 of file Simulator.h.

References GetCurrentEpisode().

+ Here is the call graph for this function:

◆ GetWorldSnapshot()

WorldSnapshot carla::client::detail::Simulator::GetWorldSnapshot ( ) const
inline

Definition at line 123 of file Simulator.h.

References _episode, DEBUG_ASSERT, and GetCurrentMap().

+ Here is the call graph for this function:

◆ IsEnabledForROS()

bool carla::client::detail::Simulator::IsEnabledForROS ( const Sensor sensor)

Definition at line 418 of file Simulator.cpp.

References _client, carla::client::detail::ActorState::GetActorDescription(), carla::rpc::Actor::GetStreamToken(), and carla::client::detail::Client::IsEnabledForROS().

Referenced by StopReplayer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsTrafficManagerRunning()

bool carla::client::detail::Simulator::IsTrafficManagerRunning ( uint16_t  port) const
inline

Query to know if a Traffic Manager is running on port.

Definition at line 217 of file Simulator.h.

References _client, and carla::client::detail::Client::IsTrafficManagerRunning().

+ Here is the call graph for this function:

◆ LoadEpisode()

EpisodeProxy carla::client::detail::Simulator::LoadEpisode ( std::string  map_name,
bool  reset_settings = true,
rpc::MapLayer  map_layers = rpc::MapLayer::All 
)

Definition at line 87 of file Simulator.cpp.

References _client, _episode, GetCurrentEpisode(), carla::client::detail::Client::GetEpisodeSettings(), carla::client::detail::EpisodeProxyImpl< PointerT >::GetId(), carla::client::detail::Client::GetTimeout(), carla::client::detail::Client::LoadEpisode(), carla::time_duration::milliseconds(), carla::client::detail::Client::SendTickCue(), carla::rpc::EpisodeSettings::synchronous_mode, and carla::throw_exception().

Referenced by LoadOpenDriveEpisode(), and ReloadEpisode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadLevelLayer()

void carla::client::detail::Simulator::LoadLevelLayer ( rpc::MapLayer  map_layers) const
inline

Definition at line 78 of file Simulator.h.

References _client, and carla::client::detail::Client::LoadLevelLayer().

+ Here is the call graph for this function:

◆ LoadOpenDriveEpisode()

EpisodeProxy carla::client::detail::Simulator::LoadOpenDriveEpisode ( std::string  opendrive,
const rpc::OpendriveGenerationParameters params,
bool  reset_settings = true 
)

Definition at line 115 of file Simulator.cpp.

References _client, carla::client::detail::Client::CopyOpenDriveToServer(), and LoadEpisode().

Referenced by UnloadLevelLayer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeActor()

SharedPtr<Actor> carla::client::detail::Simulator::MakeActor ( rpc::Actor  actor_description,
GarbageCollectionPolicy  gc = GarbageCollectionPolicy::Disabled 
)
inline

Creates an actor instance out of a description of an existing actor.

Note that this does not spawn an actor.

If gc is GarbageCollectionPolicy::Enabled, the shared pointer returned is provided with a custom deleter that calls Destroy() on the actor. This method does not support GarbageCollectionPolicy::Inherit.

Definition at line 342 of file Simulator.h.

References DestroyActor(), GetCurrentEpisode(), carla::client::Inherit, carla::client::detail::ActorFactory::MakeActor(), RELEASE_ASSERT, carla::rpc::Rigid, and SpawnActor().

Referenced by GetSpectator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NavigationTick()

void carla::client::detail::Simulator::NavigationTick ( )

Definition at line 295 of file Simulator.cpp.

References _episode, and DEBUG_ASSERT.

Referenced by CastRay(), Tick(), and WaitForTick().

+ Here is the caller graph for this function:

◆ OpenVehicleDoor()

void carla::client::detail::Simulator::OpenVehicleDoor ( Vehicle vehicle,
const rpc::VehicleDoor  door_idx 
)
inline

Definition at line 535 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::OpenVehicleDoor().

+ Here is the call graph for this function:

◆ ProjectPoint()

std::pair<bool,rpc::LabelledPoint> carla::client::detail::Simulator::ProjectPoint ( geom::Location  location,
geom::Vector3D  direction,
float  search_distance 
) const
inline

Definition at line 285 of file Simulator.h.

References _client, and carla::client::detail::Client::ProjectPoint().

+ Here is the call graph for this function:

◆ QueryLightsStateToServer()

std::vector<rpc::LightState> carla::client::detail::Simulator::QueryLightsStateToServer ( ) const
inline

Definition at line 725 of file Simulator.h.

References _client, and carla::client::detail::Client::QueryLightsStateToServer().

+ Here is the call graph for this function:

◆ RegisterAIController()

void carla::client::detail::Simulator::RegisterAIController ( const WalkerAIController controller)

Definition at line 301 of file Simulator.cpp.

References _episode, DEBUG_ASSERT, carla::client::detail::ActorState::GetDisplayId(), carla::client::detail::ActorState::GetId(), carla::client::detail::ActorState::GetParent(), and carla::throw_exception().

Referenced by CastRay().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RegisterLightUpdateChangeEvent()

size_t carla::client::detail::Simulator::RegisterLightUpdateChangeEvent ( std::function< void(WorldSnapshot)>  callback)
inline

Definition at line 739 of file Simulator.h.

References _episode, and DEBUG_ASSERT.

◆ RegisterOnTickEvent()

size_t carla::client::detail::Simulator::RegisterOnTickEvent ( std::function< void(WorldSnapshot)>  callback)
inline

Definition at line 194 of file Simulator.h.

References _episode, and DEBUG_ASSERT.

◆ ReloadEpisode()

EpisodeProxy carla::client::detail::Simulator::ReloadEpisode ( bool  reset_settings = true)
inline

Definition at line 72 of file Simulator.h.

References carla::rpc::All, and LoadEpisode().

+ Here is the call graph for this function:

◆ RemoveLightUpdateChangeEvent()

void carla::client::detail::Simulator::RemoveLightUpdateChangeEvent ( size_t  id)
inline

Definition at line 744 of file Simulator.h.

References _episode, ApplyColorTextureToObjects(), DEBUG_ASSERT, FreezeAllTrafficLights(), GetNamesOfAllObjects(), and ShouldUpdateMap().

+ Here is the call graph for this function:

◆ RemoveOnTickEvent()

void carla::client::detail::Simulator::RemoveOnTickEvent ( size_t  id)
inline

Definition at line 199 of file Simulator.h.

References _episode, DEBUG_ASSERT, and Tick().

+ Here is the call graph for this function:

◆ ReplayFile()

std::string carla::client::detail::Simulator::ReplayFile ( std::string  name,
double  start,
double  duration,
uint32_t  follow_id,
bool  replay_sensors 
)
inline

Definition at line 601 of file Simulator.h.

References _client, and carla::client::detail::Client::ReplayFile().

+ Here is the call graph for this function:

◆ RequestFile()

void carla::client::detail::Simulator::RequestFile ( const std::string &  name) const

Definition at line 196 of file Simulator.cpp.

References _client, and carla::client::detail::Client::RequestFile().

Referenced by GetAvailableMaps().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ResetAllTrafficLights()

void carla::client::detail::Simulator::ResetAllTrafficLights ( )
inline

Definition at line 679 of file Simulator.h.

References _client, and carla::client::detail::Client::ResetAllTrafficLights().

+ Here is the call graph for this function:

◆ ResetTrafficLightGroup()

void carla::client::detail::Simulator::ResetTrafficLightGroup ( TrafficLight trafficLight)
inline

Definition at line 675 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::ResetTrafficLightGroup().

+ Here is the call graph for this function:

◆ SetActorCollisions() [1/2]

void carla::client::detail::Simulator::SetActorCollisions ( Actor actor,
bool  enabled 
)
inline

Definition at line 453 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorCollisions().

+ Here is the call graph for this function:

◆ SetActorCollisions() [2/2]

void carla::client::detail::Simulator::SetActorCollisions ( ActorId  actor_id,
bool  enabled 
)
inline

Definition at line 457 of file Simulator.h.

References _client, and carla::client::detail::Client::SetActorCollisions().

+ Here is the call graph for this function:

◆ SetActorDead() [1/2]

void carla::client::detail::Simulator::SetActorDead ( Actor actor)
inline

Definition at line 461 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorDead().

+ Here is the call graph for this function:

◆ SetActorDead() [2/2]

void carla::client::detail::Simulator::SetActorDead ( ActorId  actor_id)
inline

Definition at line 465 of file Simulator.h.

References _client, and carla::client::detail::Client::SetActorDead().

+ Here is the call graph for this function:

◆ SetActorEnableGravity()

void carla::client::detail::Simulator::SetActorEnableGravity ( Actor actor,
bool  enabled 
)
inline

Definition at line 469 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorEnableGravity().

+ Here is the call graph for this function:

◆ SetActorLocation()

void carla::client::detail::Simulator::SetActorLocation ( Actor actor,
const geom::Location location 
)
inline

Definition at line 441 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorLocation().

+ Here is the call graph for this function:

◆ SetActorSimulatePhysics()

void carla::client::detail::Simulator::SetActorSimulatePhysics ( Actor actor,
bool  enabled 
)
inline

Definition at line 449 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorSimulatePhysics().

+ Here is the call graph for this function:

◆ SetActorTargetAngularVelocity()

void carla::client::detail::Simulator::SetActorTargetAngularVelocity ( const Actor actor,
const geom::Vector3D vector 
)
inline

Definition at line 402 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorTargetAngularVelocity().

+ Here is the call graph for this function:

◆ SetActorTargetVelocity()

void carla::client::detail::Simulator::SetActorTargetVelocity ( const Actor actor,
const geom::Vector3D vector 
)
inline

Definition at line 394 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorTargetVelocity().

+ Here is the call graph for this function:

◆ SetActorTransform()

void carla::client::detail::Simulator::SetActorTransform ( Actor actor,
const geom::Transform transform 
)
inline

Definition at line 445 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorTransform().

+ Here is the call graph for this function:

◆ SetBonesTransform()

void carla::client::detail::Simulator::SetBonesTransform ( Walker walker,
const rpc::WalkerBoneControlIn bones 
)
inline

Definition at line 515 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetBonesTransform().

+ Here is the call graph for this function:

◆ SetEpisodeSettings()

uint64_t carla::client::detail::Simulator::SetEpisodeSettings ( const rpc::EpisodeSettings settings)

Definition at line 255 of file Simulator.cpp.

References _client, _episode, carla::rpc::EpisodeSettings::fixed_delta_seconds, carla::log_warning(), carla::rpc::EpisodeSettings::max_substep_delta_time, carla::rpc::EpisodeSettings::max_substeps, carla::client::detail::Client::SetEpisodeSettings(), carla::rpc::EpisodeSettings::substepping, carla::client::detail::SynchronizeFrame(), and carla::rpc::EpisodeSettings::synchronous_mode.

Referenced by GetEpisodeSettings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetFilesBaseFolder()

bool carla::client::detail::Simulator::SetFilesBaseFolder ( const std::string &  path)

Definition at line 188 of file Simulator.cpp.

References _client, and carla::client::detail::Client::SetFilesBaseFolder().

Referenced by GetAvailableMaps().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetLightStateToVehicle()

void carla::client::detail::Simulator::SetLightStateToVehicle ( Vehicle vehicle,
const rpc::VehicleLightState  light_state 
)
inline

Definition at line 531 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetLightStateToVehicle().

+ Here is the call graph for this function:

◆ SetLightsToVehicle()

void carla::client::detail::Simulator::SetLightsToVehicle ( Vehicle vehicle,
const rpc::VehicleControl control 
)
inline

Definition at line 487 of file Simulator.h.

References _client, carla::client::detail::Client::ApplyControlToVehicle(), and carla::client::detail::ActorState::GetId().

+ Here is the call graph for this function:

◆ SetNetworkingTimeout()

void carla::client::detail::Simulator::SetNetworkingTimeout ( time_duration  timeout)
inline

Definition at line 170 of file Simulator.h.

References _client, and carla::client::detail::Client::SetTimeout().

+ Here is the call graph for this function:

◆ SetPedestriansCrossFactor()

void carla::client::detail::Simulator::SetPedestriansCrossFactor ( float  percentage)

Definition at line 329 of file Simulator.cpp.

References _episode, and DEBUG_ASSERT.

Referenced by CastRay().

+ Here is the caller graph for this function:

◆ SetPedestriansSeed()

void carla::client::detail::Simulator::SetPedestriansSeed ( unsigned int  seed)

Definition at line 335 of file Simulator.cpp.

References _episode, and DEBUG_ASSERT.

Referenced by CastRay().

+ Here is the caller graph for this function:

◆ SetReplayerIgnoreHero()

void carla::client::detail::Simulator::SetReplayerIgnoreHero ( bool  ignore_hero)
inline

Definition at line 610 of file Simulator.h.

References _client, and carla::client::detail::Client::SetReplayerIgnoreHero().

+ Here is the call graph for this function:

◆ SetReplayerIgnoreSpectator()

void carla::client::detail::Simulator::SetReplayerIgnoreSpectator ( bool  ignore_spectator)
inline

Definition at line 614 of file Simulator.h.

References _client, and carla::client::detail::Client::SetReplayerIgnoreSpectator().

+ Here is the call graph for this function:

◆ SetReplayerTimeFactor()

void carla::client::detail::Simulator::SetReplayerTimeFactor ( double  time_factor)
inline

Definition at line 606 of file Simulator.h.

References _client, and carla::client::detail::Client::SetReplayerTimeFactor().

+ Here is the call graph for this function:

◆ SetTrafficLightGreenTime()

void carla::client::detail::Simulator::SetTrafficLightGreenTime ( TrafficLight trafficLight,
float  greenTime 
)
inline

Definition at line 659 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetTrafficLightGreenTime().

+ Here is the call graph for this function:

◆ SetTrafficLightRedTime()

void carla::client::detail::Simulator::SetTrafficLightRedTime ( TrafficLight trafficLight,
float  redTime 
)
inline

Definition at line 667 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetTrafficLightRedTime().

+ Here is the call graph for this function:

◆ SetTrafficLightState()

void carla::client::detail::Simulator::SetTrafficLightState ( TrafficLight trafficLight,
const rpc::TrafficLightState  trafficLightState 
)
inline

Definition at line 655 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetTrafficLightState().

+ Here is the call graph for this function:

◆ SetTrafficLightYellowTime()

void carla::client::detail::Simulator::SetTrafficLightYellowTime ( TrafficLight trafficLight,
float  yellowTime 
)
inline

Definition at line 663 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetTrafficLightYellowTime().

+ Here is the call graph for this function:

◆ SetVehicleAutopilot()

void carla::client::detail::Simulator::SetVehicleAutopilot ( Vehicle vehicle,
bool  enabled = true 
)
inline

Definition at line 479 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorAutopilot().

+ Here is the call graph for this function:

◆ SetWeatherParameters()

void carla::client::detail::Simulator::SetWeatherParameters ( const rpc::WeatherParameters weather)
inline

Definition at line 258 of file Simulator.h.

References _client, and carla::client::detail::Client::SetWeatherParameters().

+ Here is the call graph for this function:

◆ SetWheelSteerDirection()

void carla::client::detail::Simulator::SetWheelSteerDirection ( Vehicle vehicle,
rpc::VehicleWheelLocation  wheel_location,
float  angle_in_deg 
)
inline

Definition at line 543 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetWheelSteerDirection().

+ Here is the call graph for this function:

◆ ShouldUpdateMap()

bool carla::client::detail::Simulator::ShouldUpdateMap ( rpc::MapInfo map_info)
private

Definition at line 146 of file Simulator.cpp.

References _cached_map, _open_drive_file, and carla::rpc::MapInfo::name.

Referenced by RemoveLightUpdateChangeEvent().

+ Here is the caller graph for this function:

◆ ShowRecorderActorsBlocked()

std::string carla::client::detail::Simulator::ShowRecorderActorsBlocked ( std::string  name,
double  min_time,
double  min_distance 
)
inline

Definition at line 597 of file Simulator.h.

References _client, and carla::client::detail::Client::ShowRecorderActorsBlocked().

+ Here is the call graph for this function:

◆ ShowRecorderCollisions()

std::string carla::client::detail::Simulator::ShowRecorderCollisions ( std::string  name,
char  type1,
char  type2 
)
inline

Definition at line 593 of file Simulator.h.

References _client, and carla::client::detail::Client::ShowRecorderCollisions().

+ Here is the call graph for this function:

◆ ShowRecorderFileInfo()

std::string carla::client::detail::Simulator::ShowRecorderFileInfo ( std::string  name,
bool  show_all 
)
inline

Definition at line 589 of file Simulator.h.

References _client, and carla::client::detail::Client::ShowRecorderFileInfo().

+ Here is the call graph for this function:

◆ ShowVehicleDebugTelemetry()

void carla::client::detail::Simulator::ShowVehicleDebugTelemetry ( Vehicle vehicle,
bool  enabled = true 
)
inline

Definition at line 483 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::ShowVehicleDebugTelemetry().

+ Here is the call graph for this function:

◆ SpawnActor()

SharedPtr< Actor > carla::client::detail::Simulator::SpawnActor ( const ActorBlueprint blueprint,
const geom::Transform transform,
Actor parent = nullptr,
rpc::AttachmentType  attachment_type = rpc::AttachmentType::Rigid,
GarbageCollectionPolicy  gc = GarbageCollectionPolicy::Inherit 
)

Spawns an actor into the simulation.

If gc is GarbageCollectionPolicy::Enabled, the shared pointer returned is provided with a custom deleter that calls Destroy() on the actor. If is GarbageCollectionPolicy::Inherit, the default garbage collection policy is used.

Definition at line 345 of file Simulator.cpp.

References _client, _episode, _gc_policy, DEBUG_ASSERT, carla::client::Enabled, GetCurrentEpisode(), carla::client::detail::ActorState::GetId(), carla::client::Inherit, carla::log_debug(), carla::client::detail::ActorFactory::MakeActor(), carla::client::ActorBlueprint::MakeActorDescription(), carla::client::detail::Client::SpawnActor(), and carla::client::detail::Client::SpawnActorWithParent().

Referenced by MakeActor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StartRecorder()

std::string carla::client::detail::Simulator::StartRecorder ( std::string  name,
bool  additional_data 
)
inline

Definition at line 581 of file Simulator.h.

References _client, and carla::client::detail::Client::StartRecorder().

+ Here is the call graph for this function:

◆ StopRecorder()

void carla::client::detail::Simulator::StopRecorder ( void  )
inline

Definition at line 585 of file Simulator.h.

References _client, and carla::client::detail::Client::StopRecorder().

+ Here is the call graph for this function:

◆ StopReplayer()

void carla::client::detail::Simulator::StopReplayer ( bool  keep_actors)
inline

Definition at line 618 of file Simulator.h.

References _client, DisableForROS(), EnableForROS(), IsEnabledForROS(), carla::client::detail::Client::StopReplayer(), SubscribeToGBuffer(), SubscribeToSensor(), UnSubscribeFromGBuffer(), and UnSubscribeFromSensor().

+ Here is the call graph for this function:

◆ SubscribeToGBuffer()

void carla::client::detail::Simulator::SubscribeToGBuffer ( Actor sensor,
uint32_t  gbuffer_id,
std::function< void(SharedPtr< sensor::SensorData >)>  callback 
)

Definition at line 422 of file Simulator.cpp.

References _client, carla::sensor::Deserializer::Deserialize(), carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SubscribeToGBuffer().

Referenced by StopReplayer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SubscribeToSensor()

void carla::client::detail::Simulator::SubscribeToSensor ( const Sensor sensor,
std::function< void(SharedPtr< sensor::SensorData >)>  callback 
)

Definition at line 392 of file Simulator.cpp.

References _client, _episode, DEBUG_ASSERT, carla::sensor::Deserializer::Deserialize(), carla::client::detail::ActorState::GetActorDescription(), carla::rpc::Actor::GetStreamToken(), and carla::client::detail::Client::SubscribeToStream().

Referenced by StopReplayer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Tick()

uint64_t carla::client::detail::Simulator::Tick ( time_duration  timeout)

Definition at line 221 of file Simulator.cpp.

References _client, _episode, DEBUG_ASSERT, carla::client::detail::Client::GetEndpoint(), NavigationTick(), carla::client::detail::Client::SendTickCue(), carla::client::detail::SynchronizeFrame(), and carla::throw_exception().

Referenced by RemoveOnTickEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UnloadLevelLayer()

void carla::client::detail::Simulator::UnloadLevelLayer ( rpc::MapLayer  map_layers) const
inline

Definition at line 82 of file Simulator.h.

References _client, LoadOpenDriveEpisode(), and carla::client::detail::Client::UnloadLevelLayer().

+ Here is the call graph for this function:

◆ UnregisterAIController()

void carla::client::detail::Simulator::UnregisterAIController ( const WalkerAIController controller)

Definition at line 312 of file Simulator.cpp.

References _episode, DEBUG_ASSERT, carla::client::detail::ActorState::GetDisplayId(), carla::client::detail::ActorState::GetId(), carla::client::detail::ActorState::GetParent(), and carla::throw_exception().

Referenced by CastRay().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UnSubscribeFromGBuffer()

void carla::client::detail::Simulator::UnSubscribeFromGBuffer ( Actor sensor,
uint32_t  gbuffer_id 
)

Definition at line 434 of file Simulator.cpp.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::UnSubscribeFromGBuffer().

Referenced by StopReplayer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UnSubscribeFromSensor()

void carla::client::detail::Simulator::UnSubscribeFromSensor ( Actor sensor)

Definition at line 405 of file Simulator.cpp.

References _client, carla::client::detail::ActorState::GetActorDescription(), carla::rpc::Actor::GetStreamToken(), and carla::client::detail::Client::UnSubscribeFromStream().

Referenced by StopReplayer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateDayNightCycle()

void carla::client::detail::Simulator::UpdateDayNightCycle ( const bool  active) const
inline

Definition at line 735 of file Simulator.h.

References _client, and carla::client::detail::Client::UpdateDayNightCycle().

+ Here is the call graph for this function:

◆ UpdateServerLightsState()

void carla::client::detail::Simulator::UpdateServerLightsState ( std::vector< rpc::LightState > &  lights,
bool  discard_client = false 
) const
inline

Definition at line 729 of file Simulator.h.

References _client, and carla::client::detail::Client::UpdateServerLightsState().

+ Here is the call graph for this function:

◆ UseCarSimRoad()

void carla::client::detail::Simulator::UseCarSimRoad ( Vehicle vehicle,
bool  enabled 
)
inline

Definition at line 555 of file Simulator.h.

References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::UseCarSimRoad().

+ Here is the call graph for this function:

◆ WaitForTick()

WorldSnapshot carla::client::detail::Simulator::WaitForTick ( time_duration  timeout)

Definition at line 208 of file Simulator.cpp.

References _client, _episode, DEBUG_ASSERT, carla::client::detail::Client::GetEndpoint(), NavigationTick(), and carla::throw_exception().

Referenced by GetReadyCurrentEpisode(), and GetServerVersion().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ _cached_map

SharedPtr<Map> carla::client::detail::Simulator::_cached_map
private

Definition at line 783 of file Simulator.h.

Referenced by GetCurrentMap(), and ShouldUpdateMap().

◆ _client

Client carla::client::detail::Simulator::_client
private

Definition at line 775 of file Simulator.h.

Referenced by AddActorAngularImpulse(), AddActorForce(), AddActorImpulse(), AddActorTorque(), AddTrafficManagerRunning(), ApplyAckermannControllerSettings(), ApplyAckermannControlToVehicle(), ApplyBatch(), ApplyBatchSync(), ApplyColorTextureToObjects(), ApplyControlToVehicle(), ApplyControlToWalker(), ApplyPhysicsControlToVehicle(), BlendPose(), CastRay(), CloseVehicleDoor(), DestroyActor(), DestroyTrafficManager(), DisableActorConstantVelocity(), DisableForROS(), DrawDebugShape(), EnableActorConstantVelocity(), EnableCarSim(), EnableChronoPhysics(), EnableEnvironmentObjects(), EnableForROS(), FreezeAllTrafficLights(), FreezeTrafficLight(), GetAckermannControllerSettings(), GetAvailableMaps(), GetBlueprintLibrary(), GetBonesTransform(), GetCacheFile(), GetClientVersion(), GetCurrentMap(), GetEndpoint(), GetEnvironmentObjects(), GetEpisodeSettings(), GetGroupTrafficLights(), GetLevelBBs(), GetLightBoxes(), GetNamesOfAllObjects(), GetNetworkingTimeout(), GetPoseFromAnimation(), GetReadyCurrentEpisode(), GetRequiredFiles(), GetServerVersion(), GetSpectator(), GetTrafficManagerRunning(), GetVehicleLightState(), GetVehiclePhysicsControl(), GetVehiclesLightStates(), GetWeatherParameters(), GetWheelSteerAngle(), IsEnabledForROS(), IsTrafficManagerRunning(), LoadEpisode(), LoadLevelLayer(), LoadOpenDriveEpisode(), OpenVehicleDoor(), ProjectPoint(), QueryLightsStateToServer(), ReplayFile(), RequestFile(), ResetAllTrafficLights(), ResetTrafficLightGroup(), SetActorCollisions(), SetActorDead(), SetActorEnableGravity(), SetActorLocation(), SetActorSimulatePhysics(), SetActorTargetAngularVelocity(), SetActorTargetVelocity(), SetActorTransform(), SetBonesTransform(), SetEpisodeSettings(), SetFilesBaseFolder(), SetLightStateToVehicle(), SetLightsToVehicle(), SetNetworkingTimeout(), SetReplayerIgnoreHero(), SetReplayerIgnoreSpectator(), SetReplayerTimeFactor(), SetTrafficLightGreenTime(), SetTrafficLightRedTime(), SetTrafficLightState(), SetTrafficLightYellowTime(), SetVehicleAutopilot(), SetWeatherParameters(), SetWheelSteerDirection(), ShowRecorderActorsBlocked(), ShowRecorderCollisions(), ShowRecorderFileInfo(), ShowVehicleDebugTelemetry(), SpawnActor(), StartRecorder(), StopRecorder(), StopReplayer(), SubscribeToGBuffer(), SubscribeToSensor(), Tick(), UnloadLevelLayer(), UnSubscribeFromGBuffer(), UnSubscribeFromSensor(), UpdateDayNightCycle(), UpdateServerLightsState(), UseCarSimRoad(), and WaitForTick().

◆ _episode

std::shared_ptr<Episode> carla::client::detail::Simulator::_episode
private

◆ _gc_policy

const GarbageCollectionPolicy carla::client::detail::Simulator::_gc_policy
private

Definition at line 781 of file Simulator.h.

Referenced by GetGarbageCollectionPolicy(), and SpawnActor().

◆ _light_manager

SharedPtr<LightManager> carla::client::detail::Simulator::_light_manager
private

Definition at line 777 of file Simulator.h.

Referenced by GetLightManager(), and GetReadyCurrentEpisode().

◆ _open_drive_file

std::string carla::client::detail::Simulator::_open_drive_file
private

Definition at line 785 of file Simulator.h.

Referenced by GetCurrentMap(), and ShouldUpdateMap().


The documentation for this class was generated from the following files: