CARLA
Loading...
Searching...
No Matches
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:

Public Member Functions

Constructor
 Simulator (const std::string &host, uint16_t port, size_t worker_threads=0u, bool enable_garbage_collection=false)
 
 ~Simulator ()
 
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< Map > GetCurrentMap ()
 
std::vector< std::string > GetAvailableMaps ()
 
Content packs
std::vector< rpc::ContentPackInfo > GetContentPacks ()
 
rpc::ContentPackInfo MountContentPack (const std::string &path)
 
bool UnmountContentPack (const std::string &name)
 
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.
 
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.
 
bool AddTrafficManagerRunning (std::pair< std::string, uint16_t > trafficManagerInfo) const
 Informs that a Traffic Manager is running on <IP, port>
 
void DestroyTrafficManager (uint16_t port) const
 
void AddPendingException (std::string e)
 
SharedPtr< BlueprintLibrary > GetBlueprintLibrary ()
 
rpc::VehicleLightStateList GetVehiclesLightStates ()
 Returns a list of pairs where the firts element is the vehicle ID and the second one is the light state.
 
SharedPtr< Actor > GetSpectator ()
 
rpc::EpisodeSettings GetEpisodeSettings ()
 
uint64_t SetEpisodeSettings (const rpc::EpisodeSettings &settings)
 
rpc::WeatherParameters GetWeatherParameters ()
 
void SetWeatherParameters (const rpc::WeatherParameters &weather)
 
float GetIMUSensorGravity ()
 
void SetIMUSensorGravity (float gravity)
 
bool IsWeatherEnabled ()
 
void SetPublishTF (bool publish_tf)
 
bool GetPublishTF () const
 
std::vector< geom::Transform > GetEgoSpawnPoints () const
 
rpc::VehiclePhysicsControl GetVehiclePhysicsControl (const Vehicle &vehicle) const
 
rpc::VehicleTelemetryData GetVehicleTelemetryData (const Vehicle &vehicle) const
 
rpc::VehicleLightState GetVehicleLightState (const Vehicle &vehicle) const
 
std::vector< geom::Transform > GetVehicleBoneWorldTransforms (const Vehicle &vehicle)
 
std::vector< geom::BoundingBox > GetLevelBBs (uint8_t queried_tag) const
 Returns all the BBs of all the elements of the level.
 
std::vector< rpc::EnvironmentObject > GetEnvironmentObjects (uint8_t queried_tag) const
 
void EnableEnvironmentObjects (std::vector< uint64_t > env_objects_ids, bool enable) const
 
std::pair< bool, rpc::LabelledPoint > ProjectPoint (geom::Location location, geom::Vector3D direction, float search_distance) const
 
std::vector< rpc::LabelledPoint > CastRay (geom::Location start_location, geom::Location end_location) const
 
AI
std::shared_ptr< WalkerNavigation > GetNavigation ()
 
void NavigationTick ()
 
bool IsNavigationServerSide ()
 True when the current episode's navigation is hosted by the server (World-Partitioned navmesh); walker AI then goes through the walker_* RPCs instead of the client-side Detour crowd.
 
void RegisterAIController (const WalkerAIController &controller)
 
void UnregisterAIController (const WalkerAIController &controller)
 
std::optional< geom::Location > GetRandomLocationFromNavigation ()
 
bool WalkerStartNavigation (ActorId walker_id)
 
bool WalkerGoToLocation (ActorId walker_id, const geom::Location &destination)
 
bool WalkerSetMaxSpeed (ActorId walker_id, float max_speed)
 
bool WalkerStopNavigation (ActorId walker_id)
 
void SetPedestriansCrossFactor (float percentage)
 
void SetPedestriansSeed (unsigned int seed)
 
General operations with actors
std::optional< rpc::Actor > GetActorById (ActorId id) const
 
std::vector< rpc::Actor > GetActorsById (const std::vector< ActorId > &actor_ids) const
 
std::vector< rpc::Actor > GetAllTheActorsInTheEpisode () const
 
SharedPtr< Actor > MakeActor (rpc::Actor actor_description, GarbageCollectionPolicy gc=GarbageCollectionPolicy::Disabled)
 Creates an actor instance out of a description of an existing actor.
 
SharedPtr< Actor > 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.
 
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
 State of actor according to the latest world snapshot.
 
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 EnableActorConstantAcceleration (const Actor &actor, const geom::Vector3D &vector)
 
void DisableActorConstantAcceleration (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::Transform GetActorComponentWorldTransform (const Actor &actor, const std::string &component_name)
 
geom::Transform GetActorComponentRelativeTransform (const Actor &actor, const std::string &component_name)
 
std::vector< geom::Transform > GetActorBoneWorldTransforms (const Actor &actor)
 
std::vector< geom::Transform > GetActorBoneRelativeTransforms (const Actor &actor)
 
std::vector< std::string > GetActorComponentNames (const Actor &actor)
 
std::vector< std::string > GetActorBoneNames (const Actor &actor)
 
std::vector< geom::Transform > GetActorSocketWorldTransforms (const Actor &actor)
 
std::vector< geom::Transform > GetActorSocketRelativeTransforms (const Actor &actor)
 
std::vector< std::string > GetActorSocketNames (const Actor &actor)
 
geom::Vector3D GetActorAcceleration (const Actor &actor) const
 
std::string GetActorName (const Actor &actor) const
 
std::string GetActorClassName (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)
 
void ApplyTextureToActor (Actor &actor, const rpc::MaterialParameter &MaterialParameter, const rpc::TextureColor &Texture)
 
void ApplyTextureToActor (Actor &actor, const rpc::MaterialParameter &MaterialParameter, const rpc::TextureFloatColor &Texture)
 
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 SetWheelPitchAngle (Vehicle &vehicle, rpc::VehicleWheelLocation wheel_location, float angle_in_deg)
 
float GetWheelPitchAngle (Vehicle &vehicle, rpc::VehicleWheelLocation wheel_location)
 
void SetWheelSuspensionOffset (Vehicle &vehicle, rpc::VehicleWheelLocation wheel_location, float offset)
 
float GetWheelSuspensionOffset (Vehicle &vehicle, rpc::VehicleWheelLocation wheel_location)
 
void SetWheelAnimationOverride (Vehicle &vehicle, bool enabled)
 
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, bool stop_replayer)
 
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, bool replay_weather, const geom::Transform &offset, std::string map_override)
 
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)
 
void Send (const Sensor &sensor, const rpc::CustomV2XBytes &data)
 
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::BoundingBox > GetLightBoxes (const TrafficLight &trafficLight) const
 
std::vector< ActorId > GetGroupTrafficLights (TrafficLight &trafficLight)
 
Debug
void DrawDebugShape (const rpc::DebugShape &shape)
 
void ClearDebugShape ()
 
void ClearDebugString ()
 
void SpawnCustomMesh (const std::vector< float > &vertices, const std::vector< uint32_t > &triangles, const std::string &material)
 Spawns a static procedural mesh in the world.
 
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< LightManager > GetLightManager () const
 
std::vector< rpc::LightState > QueryLightsStateToServer () 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
 
void ApplyColorTextureToObjects (const std::vector< std::string > &objects_name, const rpc::MaterialParameter &parameter, const rpc::TextureFloatColor &Texture)
 
void SetSkyLightMap (const rpc::TextureFloatColor &panorama, float intensity, int32_t face_size)
 
void ClearSkyLightMap ()
 
bool HasSkyLightMap () const
 
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
 
NonCopyable & operator= (const NonCopyable &)=delete
 
NonCopyable & operator= (NonCopyable &&)=delete
 

Private Attributes

SharedPtr< Map > _cached_map
 
uint64_t _cached_map_episode_id = 0u
 
std::mutex _cached_map_mutex
 
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 52 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 73 of file Simulator.cpp.

◆ ~Simulator()

carla::client::detail::Simulator::~Simulator ( )

Definition at line 84 of file Simulator.cpp.

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

Member Function Documentation

◆ AddActorAngularImpulse()

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

◆ AddActorForce() [1/2]

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

◆ AddActorForce() [2/2]

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

◆ AddActorImpulse() [1/2]

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

◆ AddActorImpulse() [2/2]

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

◆ AddActorTorque()

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

◆ AddPendingException()

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

Definition at line 259 of file Simulator.h.

References _episode.

◆ 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 251 of file Simulator.h.

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

◆ ApplyAckermannControllerSettings()

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

◆ ApplyAckermannControlToVehicle()

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

◆ ApplyBatch()

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

Definition at line 915 of file Simulator.h.

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

◆ ApplyBatchSync()

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

Definition at line 919 of file Simulator.h.

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

◆ 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 504 of file Simulator.cpp.

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

◆ ApplyColorTextureToObjects() [2/2]

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

◆ ApplyControlToVehicle()

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

◆ ApplyControlToWalker()

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

◆ ApplyPhysicsControlToVehicle()

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

◆ ApplyTextureToActor() [1/2]

void carla::client::detail::Simulator::ApplyTextureToActor ( Actor &  actor,
const rpc::MaterialParameter &  MaterialParameter,
const rpc::TextureColor &  Texture 
)
inline

◆ ApplyTextureToActor() [2/2]

void carla::client::detail::Simulator::ApplyTextureToActor ( Actor &  actor,
const rpc::MaterialParameter &  MaterialParameter,
const rpc::TextureFloatColor &  Texture 
)
inline

◆ BlendPose()

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

◆ CastRay()

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

Definition at line 345 of file Simulator.h.

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

◆ ClearDebugShape()

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

Definition at line 891 of file Simulator.h.

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

◆ ClearDebugString()

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

Definition at line 895 of file Simulator.h.

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

◆ ClearSkyLightMap()

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

Definition at line 979 of file Simulator.h.

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

◆ CloseVehicleDoor()

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

◆ DestroyActor() [1/2]

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

◆ DestroyActor() [2/2]

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

Definition at line 440 of file Simulator.h.

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

◆ DestroyTrafficManager()

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

Definition at line 255 of file Simulator.h.

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

◆ DisableActorConstantAcceleration()

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

◆ DisableActorConstantVelocity()

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

◆ DisableForROS()

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

◆ DrawDebugShape()

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

Definition at line 887 of file Simulator.h.

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

◆ EnableActorConstantAcceleration()

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

◆ EnableActorConstantVelocity()

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

◆ EnableCarSim()

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

◆ 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

◆ EnableEnvironmentObjects()

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

◆ EnableForROS()

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

◆ FreezeAllTrafficLights()

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

◆ FreezeTrafficLight()

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

◆ GetAckermannControllerSettings()

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

◆ GetActorAcceleration()

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

Definition at line 577 of file Simulator.h.

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

◆ GetActorAngularVelocity()

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

◆ GetActorBoneNames()

std::vector< std::string > carla::client::detail::Simulator::GetActorBoneNames ( const Actor &  actor)
inline

◆ GetActorBoneRelativeTransforms()

std::vector< geom::Transform > carla::client::detail::Simulator::GetActorBoneRelativeTransforms ( const Actor &  actor)
inline

◆ GetActorBoneWorldTransforms()

std::vector< geom::Transform > carla::client::detail::Simulator::GetActorBoneWorldTransforms ( const Actor &  actor)
inline

◆ GetActorById()

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

Definition at line 397 of file Simulator.h.

References _episode, and DEBUG_ASSERT.

◆ GetActorClassName()

std::string carla::client::detail::Simulator::GetActorClassName ( const Actor &  actor) const
inline

◆ GetActorComponentNames()

std::vector< std::string > carla::client::detail::Simulator::GetActorComponentNames ( const Actor &  actor)
inline

◆ GetActorComponentRelativeTransform()

geom::Transform carla::client::detail::Simulator::GetActorComponentRelativeTransform ( const Actor &  actor,
const std::string &  component_name 
)
inline

◆ GetActorComponentWorldTransform()

geom::Transform carla::client::detail::Simulator::GetActorComponentWorldTransform ( const Actor &  actor,
const std::string &  component_name 
)
inline

◆ GetActorLocation()

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

◆ GetActorName()

std::string carla::client::detail::Simulator::GetActorName ( const Actor &  actor) const
inline

◆ GetActorsById()

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

Definition at line 402 of file Simulator.h.

References _episode, and DEBUG_ASSERT.

◆ GetActorSnapshot() [1/2]

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

◆ GetActorSnapshot() [2/2]

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

Definition at line 450 of file Simulator.h.

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

◆ GetActorSocketNames()

std::vector< std::string > carla::client::detail::Simulator::GetActorSocketNames ( const Actor &  actor)
inline

◆ GetActorSocketRelativeTransforms()

std::vector< geom::Transform > carla::client::detail::Simulator::GetActorSocketRelativeTransforms ( const Actor &  actor)
inline

◆ GetActorSocketWorldTransforms()

std::vector< geom::Transform > carla::client::detail::Simulator::GetActorSocketWorldTransforms ( const Actor &  actor)
inline

◆ GetActorState()

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

State of actor according to the latest world snapshot.

An actor spawned by this client is not part of any snapshot produced before the spawn was processed (asynchronous mode: until the next frame arrives; synchronous mode: until the next tick). Reporting such an actor as Invalid made is_alive/is_active False right after spawn_actor(), so while the latest snapshot is not newer than the frame recorded at spawn time the actor is reported Active. Any snapshot newer than that frame is authoritative: an actor missing from it is gone (Invalid). A handle that did not come from a spawn call gets no such grace: it is only ever as good as the snapshots, including before the first one arrives.

Definition at line 465 of file Simulator.h.

References _episode, carla::rpc::Active, DEBUG_ASSERT, carla::client::detail::ActorState::GetId(), carla::client::detail::ActorState::GetSpawnFrame(), carla::rpc::Invalid, and carla::client::detail::ActorState::WasSpawnedByThisClient().

◆ GetActorTransform()

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

Definition at line 482 of file Simulator.h.

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

◆ GetActorVelocity()

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

Definition at line 486 of file Simulator.h.

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

◆ GetAllTheActorsInTheEpisode()

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

Definition at line 407 of file Simulator.h.

References _episode, and DEBUG_ASSERT.

◆ GetAvailableMaps()

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

Definition at line 141 of file Simulator.h.

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

◆ GetBlueprintLibrary()

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

Definition at line 267 of file Simulator.cpp.

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

◆ GetBonesTransform()

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

◆ GetCacheFile()

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

Definition at line 225 of file Simulator.cpp.

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

◆ GetClientVersion()

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

Definition at line 201 of file Simulator.h.

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

◆ GetContentPacks()

std::vector< rpc::ContentPackInfo > carla::client::detail::Simulator::GetContentPacks ( )
inline

Definition at line 151 of file Simulator.h.

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

◆ GetCurrentEpisode()

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

Definition at line 156 of file Simulator.cpp.

References GetReadyCurrentEpisode().

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

◆ GetCurrentEpisodeId()

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

Definition at line 103 of file Simulator.h.

References _episode, DEBUG_ASSERT, and GetReadyCurrentEpisode().

◆ GetCurrentMap()

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

◆ GetEgoSpawnPoints()

std::vector< geom::Transform > carla::client::detail::Simulator::GetEgoSpawnPoints ( ) const
inline

Definition at line 305 of file Simulator.h.

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

◆ GetEndpoint()

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

Definition at line 235 of file Simulator.h.

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

◆ GetEnvironmentObjects()

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

Definition at line 330 of file Simulator.h.

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

◆ GetEpisodeSettings()

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

Definition at line 271 of file Simulator.h.

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

Referenced by GetReadyCurrentEpisode().

◆ GetGarbageCollectionPolicy()

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

Definition at line 183 of file Simulator.h.

References _gc_policy.

◆ GetGroupTrafficLights()

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

◆ GetIMUSensorGravity()

float carla::client::detail::Simulator::GetIMUSensorGravity ( )
inline

Definition at line 285 of file Simulator.h.

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

◆ 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 326 of file Simulator.h.

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

◆ GetLightBoxes()

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

◆ GetLightManager()

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

Definition at line 929 of file Simulator.h.

References _light_manager.

◆ GetNamesOfAllObjects()

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

◆ GetNavigation()

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

Definition at line 313 of file Simulator.cpp.

References _episode, and DEBUG_ASSERT.

◆ GetNetworkingTimeout()

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

Definition at line 197 of file Simulator.h.

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

◆ GetPoseFromAnimation()

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

◆ GetPublishTF()

bool carla::client::detail::Simulator::GetPublishTF ( ) const
inline

Definition at line 301 of file Simulator.h.

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

◆ GetRandomLocationFromNavigation()

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

◆ GetReadyCurrentEpisode()

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

◆ GetRequiredFiles()

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

Definition at line 217 of file Simulator.cpp.

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

◆ GetServerVersion()

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

Definition at line 205 of file Simulator.h.

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

◆ GetSpectator()

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

◆ 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 246 of file Simulator.h.

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

◆ GetVehicleBoneWorldTransforms()

std::vector< geom::Transform > carla::client::detail::Simulator::GetVehicleBoneWorldTransforms ( const Vehicle &  vehicle)
inline

◆ GetVehicleLightState()

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

◆ GetVehiclePhysicsControl()

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

◆ 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 272 of file Simulator.cpp.

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

◆ GetVehicleTelemetryData()

rpc::VehicleTelemetryData carla::client::detail::Simulator::GetVehicleTelemetryData ( const Vehicle &  vehicle) const
inline

◆ GetWeatherParameters()

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

Definition at line 277 of file Simulator.h.

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

◆ GetWheelPitchAngle()

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

◆ GetWheelSteerAngle()

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

◆ GetWheelSuspensionOffset()

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

◆ GetWorld()

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

Definition at line 118 of file Simulator.h.

References GetCurrentEpisode().

◆ GetWorldSnapshot()

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

Definition at line 128 of file Simulator.h.

References _episode, and DEBUG_ASSERT.

◆ HasSkyLightMap()

bool carla::client::detail::Simulator::HasSkyLightMap ( ) const
inline

Definition at line 983 of file Simulator.h.

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

◆ IsEnabledForROS()

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

◆ IsNavigationServerSide()

bool carla::client::detail::Simulator::IsNavigationServerSide ( )

True when the current episode's navigation is hosted by the server (World-Partitioned navmesh); walker AI then goes through the walker_* RPCs instead of the client-side Detour crowd.

Definition at line 326 of file Simulator.cpp.

References _episode, and DEBUG_ASSERT.

◆ 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 240 of file Simulator.h.

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

◆ IsWeatherEnabled()

bool carla::client::detail::Simulator::IsWeatherEnabled ( )
inline

Definition at line 293 of file Simulator.h.

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

◆ LoadEpisode()

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

◆ LoadLevelLayer()

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

Definition at line 83 of file Simulator.h.

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

◆ LoadOpenDriveEpisode()

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

◆ 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 418 of file Simulator.h.

References GetCurrentEpisode(), carla::client::Inherit, carla::client::detail::ActorFactory::MakeActor(), and RELEASE_ASSERT.

Referenced by GetSpectator().

◆ MountContentPack()

rpc::ContentPackInfo carla::client::detail::Simulator::MountContentPack ( const std::string &  path)
inline

Definition at line 155 of file Simulator.h.

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

◆ NavigationTick()

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

Definition at line 320 of file Simulator.cpp.

References _episode, and DEBUG_ASSERT.

Referenced by Tick(), and WaitForTick().

◆ OpenVehicleDoor()

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

◆ 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 340 of file Simulator.h.

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

◆ QueryLightsStateToServer()

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

◆ RegisterAIController()

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

◆ RegisterLightUpdateChangeEvent()

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

Definition at line 947 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 217 of file Simulator.h.

References _episode, and DEBUG_ASSERT.

◆ ReloadEpisode()

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

Definition at line 77 of file Simulator.h.

References LoadEpisode().

◆ RemoveLightUpdateChangeEvent()

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

Definition at line 952 of file Simulator.h.

References _episode, and DEBUG_ASSERT.

◆ RemoveOnTickEvent()

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

Definition at line 222 of file Simulator.h.

References _episode, and DEBUG_ASSERT.

◆ ReplayFile()

std::string carla::client::detail::Simulator::ReplayFile ( std::string  name,
double  start,
double  duration,
uint32_t  follow_id,
bool  replay_sensors,
bool  replay_weather,
const geom::Transform &  offset,
std::string  map_override 
)
inline

Definition at line 787 of file Simulator.h.

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

◆ RequestFile()

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

Definition at line 221 of file Simulator.cpp.

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

◆ ResetAllTrafficLights()

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

Definition at line 869 of file Simulator.h.

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

◆ ResetTrafficLightGroup()

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

◆ Send()

void carla::client::detail::Simulator::Send ( const Sensor &  sensor,
const rpc::CustomV2XBytes &  data 
)

◆ SetActorCollisions() [1/2]

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

◆ SetActorCollisions() [2/2]

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

Definition at line 607 of file Simulator.h.

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

◆ SetActorDead() [1/2]

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

◆ SetActorDead() [2/2]

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

Definition at line 615 of file Simulator.h.

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

◆ SetActorEnableGravity()

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

◆ SetActorLocation()

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

◆ SetActorSimulatePhysics()

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

◆ SetActorTargetAngularVelocity()

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

◆ SetActorTargetVelocity()

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

◆ SetActorTransform()

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

◆ SetBonesTransform()

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

◆ SetEpisodeSettings()

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

◆ SetFilesBaseFolder()

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

Definition at line 213 of file Simulator.cpp.

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

◆ SetIMUSensorGravity()

void carla::client::detail::Simulator::SetIMUSensorGravity ( float  gravity)
inline

Definition at line 289 of file Simulator.h.

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

◆ SetLightStateToVehicle()

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

◆ SetLightsToVehicle()

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

◆ SetNetworkingTimeout()

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

Definition at line 193 of file Simulator.h.

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

◆ SetPedestriansCrossFactor()

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

◆ SetPedestriansSeed()

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

◆ SetPublishTF()

void carla::client::detail::Simulator::SetPublishTF ( bool  publish_tf)
inline

Definition at line 297 of file Simulator.h.

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

◆ SetReplayerIgnoreHero()

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

Definition at line 798 of file Simulator.h.

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

◆ SetReplayerIgnoreSpectator()

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

◆ SetReplayerTimeFactor()

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

Definition at line 794 of file Simulator.h.

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

◆ SetSkyLightMap()

void carla::client::detail::Simulator::SetSkyLightMap ( const rpc::TextureFloatColor &  panorama,
float  intensity,
int32_t  face_size 
)
inline

Definition at line 975 of file Simulator.h.

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

◆ SetTrafficLightGreenTime()

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

◆ SetTrafficLightRedTime()

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

◆ SetTrafficLightState()

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

◆ SetTrafficLightYellowTime()

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

◆ SetVehicleAutopilot()

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

◆ SetWeatherParameters()

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

Definition at line 281 of file Simulator.h.

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

◆ SetWheelAnimationOverride()

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

◆ SetWheelPitchAngle()

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

◆ SetWheelSteerDirection()

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

◆ SetWheelSuspensionOffset()

void carla::client::detail::Simulator::SetWheelSuspensionOffset ( Vehicle &  vehicle,
rpc::VehicleWheelLocation  wheel_location,
float  offset 
)
inline

◆ ShouldUpdateMap()

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

Definition at line 161 of file Simulator.cpp.

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

◆ ShowRecorderActorsBlocked()

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

◆ ShowRecorderCollisions()

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

◆ ShowRecorderFileInfo()

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

Definition at line 775 of file Simulator.h.

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

◆ ShowVehicleDebugTelemetry()

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

◆ 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 
)

◆ SpawnCustomMesh()

void carla::client::detail::Simulator::SpawnCustomMesh ( const std::vector< float > &  vertices,
const std::vector< uint32_t > &  triangles,
const std::string &  material 
)
inline

Spawns a static procedural mesh in the world.

Vertices are a flat (x, y, z) triple list in metres (client/UE-handed coordinates); triangles are vertex-index triples into that list.

Definition at line 902 of file Simulator.h.

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

◆ StartRecorder()

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

Definition at line 767 of file Simulator.h.

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

◆ StopRecorder()

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

Definition at line 771 of file Simulator.h.

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

◆ StopReplayer()

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

Definition at line 806 of file Simulator.h.

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

◆ SubscribeToGBuffer()

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

◆ SubscribeToSensor()

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

◆ Tick()

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

◆ UnloadLevelLayer()

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

Definition at line 87 of file Simulator.h.

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

◆ UnmountContentPack()

bool carla::client::detail::Simulator::UnmountContentPack ( const std::string &  name)
inline

Definition at line 159 of file Simulator.h.

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

◆ UnregisterAIController()

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

◆ UnSubscribeFromGBuffer()

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

◆ UnSubscribeFromSensor()

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

◆ UpdateDayNightCycle()

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

Definition at line 943 of file Simulator.h.

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

◆ UpdateServerLightsState()

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

◆ UseCarSimRoad()

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

◆ WaitForTick()

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

◆ WalkerGoToLocation()

bool carla::client::detail::Simulator::WalkerGoToLocation ( ActorId  walker_id,
const geom::Location &  destination 
)
inline

Definition at line 375 of file Simulator.h.

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

◆ WalkerSetMaxSpeed()

bool carla::client::detail::Simulator::WalkerSetMaxSpeed ( ActorId  walker_id,
float  max_speed 
)
inline

Definition at line 379 of file Simulator.h.

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

◆ WalkerStartNavigation()

bool carla::client::detail::Simulator::WalkerStartNavigation ( ActorId  walker_id)
inline

Definition at line 371 of file Simulator.h.

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

◆ WalkerStopNavigation()

bool carla::client::detail::Simulator::WalkerStopNavigation ( ActorId  walker_id)
inline

Definition at line 383 of file Simulator.h.

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

Member Data Documentation

◆ _cached_map

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

Definition at line 1003 of file Simulator.h.

Referenced by GetCurrentMap(), and ShouldUpdateMap().

◆ _cached_map_episode_id

uint64_t carla::client::detail::Simulator::_cached_map_episode_id = 0u
private

Definition at line 1005 of file Simulator.h.

Referenced by GetCurrentMap().

◆ _cached_map_mutex

std::mutex carla::client::detail::Simulator::_cached_map_mutex
private

Definition at line 1007 of file Simulator.h.

Referenced by GetCurrentMap().

◆ _client

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

Definition at line 995 of file Simulator.h.

Referenced by AddActorAngularImpulse(), AddActorForce(), AddActorForce(), AddActorImpulse(), AddActorImpulse(), AddActorTorque(), AddTrafficManagerRunning(), ApplyAckermannControllerSettings(), ApplyAckermannControlToVehicle(), ApplyBatch(), ApplyBatchSync(), ApplyColorTextureToObjects(), ApplyColorTextureToObjects(), ApplyControlToVehicle(), ApplyControlToWalker(), ApplyPhysicsControlToVehicle(), ApplyTextureToActor(), ApplyTextureToActor(), BlendPose(), CastRay(), ClearDebugShape(), ClearDebugString(), ClearSkyLightMap(), CloseVehicleDoor(), DestroyActor(), DestroyActor(), DestroyTrafficManager(), DisableActorConstantAcceleration(), DisableActorConstantVelocity(), DisableForROS(), DrawDebugShape(), EnableActorConstantAcceleration(), EnableActorConstantVelocity(), EnableCarSim(), EnableChronoPhysics(), EnableEnvironmentObjects(), EnableForROS(), FreezeAllTrafficLights(), FreezeTrafficLight(), GetAckermannControllerSettings(), GetActorBoneNames(), GetActorBoneRelativeTransforms(), GetActorBoneWorldTransforms(), GetActorClassName(), GetActorComponentNames(), GetActorComponentRelativeTransform(), GetActorComponentWorldTransform(), GetActorName(), GetActorSocketNames(), GetActorSocketRelativeTransforms(), GetActorSocketWorldTransforms(), GetAvailableMaps(), GetBlueprintLibrary(), GetBonesTransform(), GetCacheFile(), GetClientVersion(), GetContentPacks(), GetCurrentMap(), GetEgoSpawnPoints(), GetEndpoint(), GetEnvironmentObjects(), GetEpisodeSettings(), GetGroupTrafficLights(), GetIMUSensorGravity(), GetLevelBBs(), GetLightBoxes(), GetNamesOfAllObjects(), GetNetworkingTimeout(), GetPoseFromAnimation(), GetPublishTF(), GetRandomLocationFromNavigation(), GetReadyCurrentEpisode(), GetRequiredFiles(), GetServerVersion(), GetSpectator(), GetTrafficManagerRunning(), GetVehicleBoneWorldTransforms(), GetVehicleLightState(), GetVehiclePhysicsControl(), GetVehiclesLightStates(), GetVehicleTelemetryData(), GetWeatherParameters(), GetWheelPitchAngle(), GetWheelSteerAngle(), GetWheelSuspensionOffset(), HasSkyLightMap(), IsEnabledForROS(), IsTrafficManagerRunning(), IsWeatherEnabled(), LoadEpisode(), LoadLevelLayer(), LoadOpenDriveEpisode(), MountContentPack(), OpenVehicleDoor(), ProjectPoint(), QueryLightsStateToServer(), ReplayFile(), RequestFile(), ResetAllTrafficLights(), ResetTrafficLightGroup(), Send(), SetActorCollisions(), SetActorCollisions(), SetActorDead(), SetActorDead(), SetActorEnableGravity(), SetActorLocation(), SetActorSimulatePhysics(), SetActorTargetAngularVelocity(), SetActorTargetVelocity(), SetActorTransform(), SetBonesTransform(), SetEpisodeSettings(), SetFilesBaseFolder(), SetIMUSensorGravity(), SetLightStateToVehicle(), SetLightsToVehicle(), SetNetworkingTimeout(), SetPedestriansCrossFactor(), SetPedestriansSeed(), SetPublishTF(), SetReplayerIgnoreHero(), SetReplayerIgnoreSpectator(), SetReplayerTimeFactor(), SetSkyLightMap(), SetTrafficLightGreenTime(), SetTrafficLightRedTime(), SetTrafficLightState(), SetTrafficLightYellowTime(), SetVehicleAutopilot(), SetWeatherParameters(), SetWheelAnimationOverride(), SetWheelPitchAngle(), SetWheelSteerDirection(), SetWheelSuspensionOffset(), ShowRecorderActorsBlocked(), ShowRecorderCollisions(), ShowRecorderFileInfo(), ShowVehicleDebugTelemetry(), SpawnActor(), SpawnCustomMesh(), StartRecorder(), StopRecorder(), StopReplayer(), SubscribeToGBuffer(), SubscribeToSensor(), Tick(), UnloadLevelLayer(), UnmountContentPack(), UnSubscribeFromGBuffer(), UnSubscribeFromSensor(), UpdateDayNightCycle(), UpdateServerLightsState(), UseCarSimRoad(), WaitForTick(), WalkerGoToLocation(), WalkerSetMaxSpeed(), WalkerStartNavigation(), WalkerStopNavigation(), and ~Simulator().

◆ _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 1001 of file Simulator.h.

Referenced by GetGarbageCollectionPolicy(), and SpawnActor().

◆ _light_manager

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

Definition at line 997 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 1009 of file Simulator.h.

Referenced by GetCurrentMap(), and ShouldUpdateMap().


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