|
CARLA
|
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 ¶ms, 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 ¶meter, const rpc::TextureColor &Texture) |
| – Texture updating operations | |
| void | ApplyColorTextureToObjects (const std::vector< std::string > &objects_name, const rpc::MaterialParameter ¶meter, 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 |
Connects and controls a CARLA Simulator.
Definition at line 52 of file Simulator.h.
|
explicit |
Definition at line 73 of file Simulator.cpp.
| carla::client::detail::Simulator::~Simulator | ( | ) |
Definition at line 84 of file Simulator.cpp.
References _client, and carla::client::detail::Client::StopStreaming().
|
inline |
Definition at line 533 of file Simulator.h.
References _client, carla::client::detail::Client::AddActorAngularImpulse(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 525 of file Simulator.h.
References _client, carla::client::detail::Client::AddActorForce(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 529 of file Simulator.h.
References _client, carla::client::detail::Client::AddActorForce(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 517 of file Simulator.h.
References _client, carla::client::detail::Client::AddActorImpulse(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 521 of file Simulator.h.
References _client, carla::client::detail::Client::AddActorImpulse(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 537 of file Simulator.h.
References _client, carla::client::detail::Client::AddActorAngularImpulse(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 259 of file Simulator.h.
References _episode.
|
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().
|
inline |
Definition at line 669 of file Simulator.h.
References _client, carla::client::detail::Client::ApplyAckermannControllerSettings(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 661 of file Simulator.h.
References _client, carla::client::detail::Client::ApplyAckermannControlToVehicle(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 915 of file Simulator.h.
References _client, and carla::client::detail::Client::ApplyBatch().
|
inline |
Definition at line 919 of file Simulator.h.
References _client, and carla::client::detail::Client::ApplyBatchSync().
| 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().
| void carla::client::detail::Simulator::ApplyColorTextureToObjects | ( | const std::vector< std::string > & | objects_name, |
| const rpc::MaterialParameter & | parameter, | ||
| const rpc::TextureFloatColor & | Texture | ||
| ) |
Definition at line 511 of file Simulator.cpp.
References _client, and carla::client::detail::Client::ApplyColorTextureToObjects().
|
inline |
Definition at line 657 of file Simulator.h.
References _client, carla::client::detail::Client::ApplyControlToVehicle(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 673 of file Simulator.h.
References _client, carla::client::detail::Client::ApplyControlToWalker(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 693 of file Simulator.h.
References _client, carla::client::detail::Client::ApplyPhysicsControlToVehicle(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 623 of file Simulator.h.
References _client, carla::client::detail::Client::ApplyTextureToActor(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 631 of file Simulator.h.
References _client, carla::client::detail::Client::ApplyTextureToActor(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 685 of file Simulator.h.
References _client, carla::client::detail::Client::BlendPose(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 345 of file Simulator.h.
References _client, and carla::client::detail::Client::CastRay().
|
inline |
Definition at line 891 of file Simulator.h.
References _client, and carla::client::detail::Client::ClearDebugShape().
|
inline |
Definition at line 895 of file Simulator.h.
References _client, and carla::client::detail::Client::ClearDebugString().
|
inline |
Definition at line 979 of file Simulator.h.
References _client, and carla::client::detail::Client::ClearSkyLightMap().
|
inline |
Definition at line 705 of file Simulator.h.
References _client, carla::client::detail::Client::CloseVehicleDoor(), and carla::client::detail::ActorState::GetId().
| bool carla::client::detail::Simulator::DestroyActor | ( | Actor & | actor | ) |
Definition at line 429 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().
|
inline |
Definition at line 440 of file Simulator.h.
References _client, and carla::client::detail::Client::DestroyActor().
|
inline |
Definition at line 255 of file Simulator.h.
References _client, and carla::client::detail::Client::DestroyTrafficManager().
|
inline |
Definition at line 513 of file Simulator.h.
References _client, carla::client::detail::Client::DisableActorConstantAcceleration(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 505 of file Simulator.h.
References _client, carla::client::detail::Client::DisableActorConstantVelocity(), and carla::client::detail::ActorState::GetId().
| void carla::client::detail::Simulator::DisableForROS | ( | const Sensor & | sensor | ) |
Definition at line 468 of file Simulator.cpp.
References _client, carla::client::detail::Client::DisableForROS(), carla::client::detail::ActorState::GetActorDescription(), and carla::rpc::Actor::GetStreamToken().
|
inline |
Definition at line 887 of file Simulator.h.
References _client, and carla::client::detail::Client::DrawDebugShape().
|
inline |
Definition at line 509 of file Simulator.h.
References _client, carla::client::detail::Client::EnableActorConstantAcceleration(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 501 of file Simulator.h.
References _client, carla::client::detail::Client::EnableActorConstantVelocity(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 737 of file Simulator.h.
References _client, carla::client::detail::Client::EnableCarSim(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 745 of file Simulator.h.
References _client, carla::client::detail::Client::EnableChronoPhysics(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 334 of file Simulator.h.
References _client, and carla::client::detail::Client::EnableEnvironmentObjects().
| void carla::client::detail::Simulator::EnableForROS | ( | const Sensor & | sensor | ) |
Definition at line 464 of file Simulator.cpp.
References _client, carla::client::detail::Client::EnableForROS(), carla::client::detail::ActorState::GetActorDescription(), and carla::rpc::Actor::GetStreamToken().
| void carla::client::detail::Simulator::FreezeAllTrafficLights | ( | bool | frozen | ) |
Definition at line 496 of file Simulator.cpp.
References _client, and carla::client::detail::Client::FreezeAllTrafficLights().
|
inline |
Definition at line 861 of file Simulator.h.
References _client, carla::client::detail::Client::FreezeTrafficLight(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 665 of file Simulator.h.
References _client, carla::client::detail::Client::GetAckermannControllerSettings(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 577 of file Simulator.h.
References carla::client::ActorSnapshot::acceleration, and GetActorSnapshot().
|
inline |
Definition at line 494 of file Simulator.h.
References carla::client::ActorSnapshot::angular_velocity, and GetActorSnapshot().
|
inline |
Definition at line 561 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorBoneNames(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 553 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorBoneRelativeTransforms(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 549 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorBoneWorldTransforms(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 397 of file Simulator.h.
References _episode, and DEBUG_ASSERT.
|
inline |
Definition at line 586 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorClassName(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 557 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorComponentNames(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 545 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorComponentRelativeTransform(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 541 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorComponentWorldTransform(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 478 of file Simulator.h.
References GetActorSnapshot(), carla::geom::Transform::location, and carla::client::ActorSnapshot::transform.
|
inline |
Definition at line 581 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorName(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 402 of file Simulator.h.
References _episode, and DEBUG_ASSERT.
|
inline |
Definition at line 445 of file Simulator.h.
References _episode, and DEBUG_ASSERT.
Referenced by GetActorAcceleration(), GetActorAngularVelocity(), GetActorLocation(), GetActorSnapshot(), GetActorTransform(), and GetActorVelocity().
|
inline |
Definition at line 450 of file Simulator.h.
References GetActorSnapshot(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 573 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorSocketNames(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 569 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorSocketRelativeTransforms(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 565 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorSocketWorldTransforms(), and carla::client::detail::ActorState::GetId().
|
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().
|
inline |
Definition at line 482 of file Simulator.h.
References GetActorSnapshot(), and carla::client::ActorSnapshot::transform.
|
inline |
Definition at line 486 of file Simulator.h.
References GetActorSnapshot(), and carla::client::ActorSnapshot::velocity.
|
inline |
Definition at line 407 of file Simulator.h.
References _episode, and DEBUG_ASSERT.
|
inline |
Definition at line 141 of file Simulator.h.
References _client, and carla::client::detail::Client::GetAvailableMaps().
| SharedPtr< BlueprintLibrary > carla::client::detail::Simulator::GetBlueprintLibrary | ( | ) |
Definition at line 267 of file Simulator.cpp.
References _client, and carla::client::detail::Client::GetActorDefinitions().
|
inline |
Definition at line 677 of file Simulator.h.
References _client, carla::client::detail::Client::GetBonesTransform(), and carla::client::detail::ActorState::GetId().
| 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().
|
inline |
Definition at line 201 of file Simulator.h.
References _client, and carla::client::detail::Client::GetClientVersion().
|
inline |
Definition at line 151 of file Simulator.h.
References _client, and carla::client::detail::Client::GetContentPacks().
| EpisodeProxy carla::client::detail::Simulator::GetCurrentEpisode | ( | ) |
Definition at line 156 of file Simulator.cpp.
References GetReadyCurrentEpisode().
Referenced by GetWorld(), LoadEpisode(), MakeActor(), and SpawnActor().
|
inline |
Definition at line 103 of file Simulator.h.
References _episode, DEBUG_ASSERT, and GetReadyCurrentEpisode().
Definition at line 172 of file Simulator.cpp.
References _cached_map, _cached_map_episode_id, _cached_map_mutex, _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(), and carla::rpc::MapInfo::name.
|
inline |
Definition at line 305 of file Simulator.h.
References _client, and carla::client::detail::Client::GetEgoSpawnPoints().
|
inline |
Definition at line 235 of file Simulator.h.
References _client, and carla::client::detail::Client::GetEndpoint().
|
inline |
Definition at line 330 of file Simulator.h.
References _client, and carla::client::detail::Client::GetEnvironmentObjects().
|
inline |
Definition at line 271 of file Simulator.h.
References _client, and carla::client::detail::Client::GetEpisodeSettings().
Referenced by GetReadyCurrentEpisode().
|
inline |
Definition at line 183 of file Simulator.h.
References _gc_policy.
|
inline |
Definition at line 877 of file Simulator.h.
References _client, carla::client::detail::Client::GetGroupTrafficLights(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 285 of file Simulator.h.
References _client, and carla::client::detail::Client::GetIMUSensorGravity().
|
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().
|
inline |
Definition at line 873 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetLightBoxes().
|
inline |
Definition at line 929 of file Simulator.h.
References _light_manager.
| std::vector< std::string > carla::client::detail::Simulator::GetNamesOfAllObjects | ( | ) | const |
Definition at line 518 of file Simulator.cpp.
References _client, and carla::client::detail::Client::GetNamesOfAllObjects().
| std::shared_ptr< WalkerNavigation > carla::client::detail::Simulator::GetNavigation | ( | ) |
Definition at line 313 of file Simulator.cpp.
References _episode, and DEBUG_ASSERT.
|
inline |
Definition at line 197 of file Simulator.h.
References _client, and carla::client::detail::Client::GetTimeout().
|
inline |
Definition at line 689 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetPoseFromAnimation().
|
inline |
Definition at line 301 of file Simulator.h.
References _client, and carla::client::detail::Client::GetPublishTF().
| std::optional< geom::Location > carla::client::detail::Simulator::GetRandomLocationFromNavigation | ( | ) |
Definition at line 353 of file Simulator.cpp.
References _client, _episode, DEBUG_ASSERT, and carla::client::detail::Client::GetRandomLocationFromNavigation().
| void carla::client::detail::Simulator::GetReadyCurrentEpisode | ( | ) |
Definition at line 145 of file Simulator.cpp.
References _client, _episode, _light_manager, GetEpisodeSettings(), carla::client::detail::Client::GetTimeout(), carla::client::detail::ValidateVersions(), and WaitForTick().
Referenced by GetCurrentEpisode(), and GetCurrentEpisodeId().
| 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().
|
inline |
Definition at line 205 of file Simulator.h.
References _client, and carla::client::detail::Client::GetServerVersion().
Definition at line 276 of file Simulator.cpp.
References _client, carla::client::detail::Client::GetSpectator(), and MakeActor().
|
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().
|
inline |
Definition at line 321 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetVehicleBoneWorldTransforms().
|
inline |
Definition at line 317 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetVehicleLightState().
|
inline |
Definition at line 309 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetVehiclePhysicsControl().
| 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().
|
inline |
Definition at line 313 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetVehicleTelemetryData().
|
inline |
Definition at line 277 of file Simulator.h.
References _client, and carla::client::detail::Client::GetWeatherParameters().
|
inline |
Definition at line 721 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetWheelPitchAngle().
|
inline |
Definition at line 713 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetWheelSteerAngle().
|
inline |
Definition at line 729 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetWheelSuspensionOffset().
|
inline |
Definition at line 118 of file Simulator.h.
References GetCurrentEpisode().
|
inline |
Definition at line 128 of file Simulator.h.
References _episode, and DEBUG_ASSERT.
|
inline |
Definition at line 983 of file Simulator.h.
References _client, and carla::client::detail::Client::HasSkyLightMap().
| bool carla::client::detail::Simulator::IsEnabledForROS | ( | const Sensor & | sensor | ) |
Definition at line 472 of file Simulator.cpp.
References _client, carla::client::detail::ActorState::GetActorDescription(), carla::rpc::Actor::GetStreamToken(), and carla::client::detail::Client::IsEnabledForROS().
| 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.
|
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().
|
inline |
Definition at line 293 of file Simulator.h.
References _client, and carla::client::detail::Client::IsWeatherEnabled().
| EpisodeProxy carla::client::detail::Simulator::LoadEpisode | ( | std::string | map_name, |
| bool | reset_settings = true, |
||
| rpc::MapLayer | map_layers = rpc::MapLayer::All |
||
| ) |
Definition at line 93 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::log_warning(), carla::time_duration::milliseconds(), carla::client::detail::Client::SendTickCue(), carla::rpc::EpisodeSettings::synchronous_mode, carla::throw_exception(), and carla::time_duration::to_chrono().
Referenced by LoadOpenDriveEpisode(), and ReloadEpisode().
|
inline |
Definition at line 83 of file Simulator.h.
References _client, and carla::client::detail::Client::LoadLevelLayer().
| EpisodeProxy carla::client::detail::Simulator::LoadOpenDriveEpisode | ( | std::string | opendrive, |
| const rpc::OpendriveGenerationParameters & | params, | ||
| bool | reset_settings = true |
||
| ) |
Definition at line 130 of file Simulator.cpp.
References _client, carla::client::detail::Client::CopyOpenDriveToServer(), and LoadEpisode().
|
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().
|
inline |
Definition at line 155 of file Simulator.h.
References _client, and carla::client::detail::Client::MountContentPack().
| void carla::client::detail::Simulator::NavigationTick | ( | ) |
Definition at line 320 of file Simulator.cpp.
References _episode, and DEBUG_ASSERT.
Referenced by Tick(), and WaitForTick().
|
inline |
Definition at line 701 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::OpenVehicleDoor().
|
inline |
Definition at line 340 of file Simulator.h.
References _client, and carla::client::detail::Client::ProjectPoint().
|
inline |
Definition at line 933 of file Simulator.h.
References _client, and carla::client::detail::Client::QueryLightsStateToServer().
| void carla::client::detail::Simulator::RegisterAIController | ( | const WalkerAIController & | controller | ) |
Definition at line 331 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().
|
inline |
Definition at line 947 of file Simulator.h.
References _episode, and DEBUG_ASSERT.
|
inline |
Definition at line 217 of file Simulator.h.
References _episode, and DEBUG_ASSERT.
|
inline |
Definition at line 77 of file Simulator.h.
References LoadEpisode().
|
inline |
Definition at line 952 of file Simulator.h.
References _episode, and DEBUG_ASSERT.
|
inline |
Definition at line 222 of file Simulator.h.
References _episode, and DEBUG_ASSERT.
|
inline |
Definition at line 787 of file Simulator.h.
References _client, and carla::client::detail::Client::ReplayFile().
| 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().
|
inline |
Definition at line 869 of file Simulator.h.
References _client, and carla::client::detail::Client::ResetAllTrafficLights().
|
inline |
Definition at line 865 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::ResetTrafficLightGroup().
| void carla::client::detail::Simulator::Send | ( | const Sensor & | sensor, |
| const rpc::CustomV2XBytes & | data | ||
| ) |
Definition at line 492 of file Simulator.cpp.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::Send().
|
inline |
Definition at line 603 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorCollisions().
|
inline |
Definition at line 607 of file Simulator.h.
References _client, and carla::client::detail::Client::SetActorCollisions().
|
inline |
Definition at line 611 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorDead().
|
inline |
Definition at line 615 of file Simulator.h.
References _client, and carla::client::detail::Client::SetActorDead().
|
inline |
Definition at line 619 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorEnableGravity().
|
inline |
Definition at line 591 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorLocation().
|
inline |
Definition at line 599 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorSimulatePhysics().
|
inline |
Definition at line 498 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorTargetAngularVelocity().
|
inline |
Definition at line 490 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorTargetVelocity().
|
inline |
Definition at line 595 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorTransform().
|
inline |
Definition at line 681 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetBonesTransform().
| uint64_t carla::client::detail::Simulator::SetEpisodeSettings | ( | const rpc::EpisodeSettings & | settings | ) |
Definition at line 280 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.
| 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().
|
inline |
Definition at line 289 of file Simulator.h.
References _client, and carla::client::detail::Client::SetIMUSensorGravity().
|
inline |
Definition at line 697 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetLightStateToVehicle().
|
inline |
Definition at line 653 of file Simulator.h.
References _client, carla::client::detail::Client::ApplyControlToVehicle(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 193 of file Simulator.h.
References _client, and carla::client::detail::Client::SetTimeout().
| void carla::client::detail::Simulator::SetPedestriansCrossFactor | ( | float | percentage | ) |
Definition at line 372 of file Simulator.cpp.
References _client, _episode, DEBUG_ASSERT, and carla::client::detail::Client::SetPedestriansCrossFactor().
| void carla::client::detail::Simulator::SetPedestriansSeed | ( | unsigned int | seed | ) |
Definition at line 382 of file Simulator.cpp.
References _client, _episode, DEBUG_ASSERT, and carla::client::detail::Client::SetPedestriansSeed().
|
inline |
Definition at line 297 of file Simulator.h.
References _client, and carla::client::detail::Client::SetPublishTF().
|
inline |
Definition at line 798 of file Simulator.h.
References _client, and carla::client::detail::Client::SetReplayerIgnoreHero().
|
inline |
Definition at line 802 of file Simulator.h.
References _client, and carla::client::detail::Client::SetReplayerIgnoreSpectator().
|
inline |
Definition at line 794 of file Simulator.h.
References _client, and carla::client::detail::Client::SetReplayerTimeFactor().
|
inline |
Definition at line 975 of file Simulator.h.
References _client, intensity, and carla::client::detail::Client::SetSkyLightMap().
|
inline |
Definition at line 849 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetTrafficLightGreenTime().
|
inline |
Definition at line 857 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetTrafficLightRedTime().
|
inline |
Definition at line 845 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetTrafficLightState().
|
inline |
Definition at line 853 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetTrafficLightYellowTime().
|
inline |
Definition at line 645 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorAutopilot().
|
inline |
Definition at line 281 of file Simulator.h.
References _client, and carla::client::detail::Client::SetWeatherParameters().
|
inline |
Definition at line 733 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetWheelAnimationOverride().
|
inline |
Definition at line 717 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetWheelPitchAngle().
|
inline |
Definition at line 709 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetWheelSteerDirection().
|
inline |
Definition at line 725 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetWheelSuspensionOffset().
|
private |
Definition at line 161 of file Simulator.cpp.
References _cached_map, _open_drive_file, and carla::rpc::MapInfo::name.
|
inline |
Definition at line 783 of file Simulator.h.
References _client, and carla::client::detail::Client::ShowRecorderActorsBlocked().
|
inline |
Definition at line 779 of file Simulator.h.
References _client, and carla::client::detail::Client::ShowRecorderCollisions().
|
inline |
Definition at line 775 of file Simulator.h.
References _client, and carla::client::detail::Client::ShowRecorderFileInfo().
|
inline |
Definition at line 649 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::ShowVehicleDebugTelemetry().
| 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 @gc is GarbageCollectionPolicy::Inherit, the default garbage collection policy is used.
Definition at line 396 of file Simulator.cpp.
References _client, _episode, _gc_policy, carla::client::detail::ActorState::_spawn_frame, 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().
|
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().
|
inline |
Definition at line 767 of file Simulator.h.
References _client, and carla::client::detail::Client::StartRecorder().
|
inline |
Definition at line 771 of file Simulator.h.
References _client, and carla::client::detail::Client::StopRecorder().
|
inline |
Definition at line 806 of file Simulator.h.
References _client, and carla::client::detail::Client::StopReplayer().
| void carla::client::detail::Simulator::SubscribeToGBuffer | ( | Actor & | sensor, |
| uint32_t | gbuffer_id, | ||
| std::function< void(SharedPtr< sensor::SensorData >)> | callback | ||
| ) |
Definition at line 476 of file Simulator.cpp.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SubscribeToGBuffer().
| void carla::client::detail::Simulator::SubscribeToSensor | ( | const Sensor & | sensor, |
| std::function< void(SharedPtr< sensor::SensorData >)> | callback | ||
| ) |
Definition at line 446 of file Simulator.cpp.
References _client, _episode, DEBUG_ASSERT, carla::client::detail::ActorState::GetActorDescription(), carla::rpc::Actor::GetStreamToken(), and carla::client::detail::Client::SubscribeToStream().
| uint64_t carla::client::detail::Simulator::Tick | ( | time_duration | timeout | ) |
Definition at line 246 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().
|
inline |
Definition at line 87 of file Simulator.h.
References _client, and carla::client::detail::Client::UnloadLevelLayer().
|
inline |
Definition at line 159 of file Simulator.h.
References _client, and carla::client::detail::Client::UnmountContentPack().
| void carla::client::detail::Simulator::UnregisterAIController | ( | const WalkerAIController & | controller | ) |
Definition at line 342 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().
| void carla::client::detail::Simulator::UnSubscribeFromGBuffer | ( | Actor & | sensor, |
| uint32_t | gbuffer_id | ||
| ) |
Definition at line 488 of file Simulator.cpp.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::UnSubscribeFromGBuffer().
| void carla::client::detail::Simulator::UnSubscribeFromSensor | ( | Actor & | sensor | ) |
Definition at line 459 of file Simulator.cpp.
References _client, carla::client::detail::ActorState::GetActorDescription(), carla::rpc::Actor::GetStreamToken(), and carla::client::detail::Client::UnSubscribeFromStream().
|
inline |
Definition at line 943 of file Simulator.h.
References _client, and carla::client::detail::Client::UpdateDayNightCycle().
|
inline |
Definition at line 937 of file Simulator.h.
References _client, and carla::client::detail::Client::UpdateServerLightsState().
|
inline |
Definition at line 741 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::UseCarSimRoad().
| WorldSnapshot carla::client::detail::Simulator::WaitForTick | ( | time_duration | timeout | ) |
Definition at line 233 of file Simulator.cpp.
References _client, _episode, DEBUG_ASSERT, carla::client::detail::Client::GetEndpoint(), NavigationTick(), and carla::throw_exception().
Referenced by GetReadyCurrentEpisode().
|
inline |
Definition at line 375 of file Simulator.h.
References _client, and carla::client::detail::Client::WalkerGoToLocation().
|
inline |
Definition at line 379 of file Simulator.h.
References _client, and carla::client::detail::Client::WalkerSetMaxSpeed().
|
inline |
Definition at line 371 of file Simulator.h.
References _client, and carla::client::detail::Client::WalkerStartNavigation().
|
inline |
Definition at line 383 of file Simulator.h.
References _client, and carla::client::detail::Client::WalkerStopNavigation().
Definition at line 1003 of file Simulator.h.
Referenced by GetCurrentMap(), and ShouldUpdateMap().
|
private |
Definition at line 1005 of file Simulator.h.
Referenced by GetCurrentMap().
|
private |
Definition at line 1007 of file Simulator.h.
Referenced by GetCurrentMap().
|
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().
|
private |
Definition at line 999 of file Simulator.h.
Referenced by AddPendingException(), GetActorById(), GetActorsById(), GetActorSnapshot(), GetActorState(), GetAllTheActorsInTheEpisode(), GetCurrentEpisodeId(), GetCurrentMap(), GetNavigation(), GetRandomLocationFromNavigation(), GetReadyCurrentEpisode(), GetWorldSnapshot(), IsNavigationServerSide(), LoadEpisode(), NavigationTick(), RegisterAIController(), RegisterLightUpdateChangeEvent(), RegisterOnTickEvent(), RemoveLightUpdateChangeEvent(), RemoveOnTickEvent(), SetEpisodeSettings(), SetPedestriansCrossFactor(), SetPedestriansSeed(), SpawnActor(), SubscribeToSensor(), Tick(), UnregisterAIController(), and WaitForTick().
|
private |
Definition at line 1001 of file Simulator.h.
Referenced by GetGarbageCollectionPolicy(), and SpawnActor().
|
private |
Definition at line 997 of file Simulator.h.
Referenced by GetLightManager(), and GetReadyCurrentEpisode().
|
private |
Definition at line 1009 of file Simulator.h.
Referenced by GetCurrentMap(), and ShouldUpdateMap().