|
CARLA
|
Connects and controls a CARLA Simulator. More...
#include <Simulator.h>
Public Member Functions | |
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 |
Constructor | |
| Simulator (const std::string &host, uint16_t port, size_t worker_threads=0u, bool enable_garbage_collection=false) | |
| ~Simulator () | |
| static void | Delete (Simulator *simulator) |
| Deleter: on a pool thread, destroy on a background thread (~Simulator joins the pools). | |
Connects and controls a CARLA Simulator.
Definition at line 52 of file Simulator.h.
|
explicit |
Definition at line 84 of file Simulator.cpp.
References _client, _gc_policy, _light_manager, carla::client::Disabled, carla::client::Enabled, and LIBCARLA_INITIALIZE_LIFETIME_PROFILER.
Referenced by Delete().
| carla::client::detail::Simulator::~Simulator | ( | ) |
Definition at line 95 of file Simulator.cpp.
References _client, and carla::client::detail::Client::StopStreaming().
|
inline |
Definition at line 536 of file Simulator.h.
References _client, carla::client::detail::Client::AddActorAngularImpulse(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 528 of file Simulator.h.
References _client, carla::client::detail::Client::AddActorForce(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 532 of file Simulator.h.
References _client, carla::client::detail::Client::AddActorForce(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 520 of file Simulator.h.
References _client, carla::client::detail::Client::AddActorImpulse(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 524 of file Simulator.h.
References _client, carla::client::detail::Client::AddActorImpulse(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 540 of file Simulator.h.
References _client, carla::client::detail::Client::AddActorAngularImpulse(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 262 of file Simulator.h.
References _episode.
|
inline |
Informs that a Traffic Manager is running on <IP, port>.
Definition at line 254 of file Simulator.h.
References _client, and carla::client::detail::Client::AddTrafficManagerRunning().
|
inline |
Definition at line 672 of file Simulator.h.
References _client, carla::client::detail::Client::ApplyAckermannControllerSettings(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 664 of file Simulator.h.
References _client, carla::client::detail::Client::ApplyAckermannControlToVehicle(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 918 of file Simulator.h.
References _client, and carla::client::detail::Client::ApplyBatch().
|
inline |
Definition at line 922 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 589 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 596 of file Simulator.cpp.
References _client, and carla::client::detail::Client::ApplyColorTextureToObjects().
|
inline |
Definition at line 660 of file Simulator.h.
References _client, carla::client::detail::Client::ApplyControlToVehicle(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 676 of file Simulator.h.
References _client, carla::client::detail::Client::ApplyControlToWalker(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 696 of file Simulator.h.
References _client, carla::client::detail::Client::ApplyPhysicsControlToVehicle(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 626 of file Simulator.h.
References _client, carla::client::detail::Client::ApplyTextureToActor(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 634 of file Simulator.h.
References _client, carla::client::detail::Client::ApplyTextureToActor(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 688 of file Simulator.h.
References _client, carla::client::detail::Client::BlendPose(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 348 of file Simulator.h.
References _client, and carla::client::detail::Client::CastRay().
|
inline |
Definition at line 894 of file Simulator.h.
References _client, and carla::client::detail::Client::ClearDebugShape().
|
inline |
Definition at line 898 of file Simulator.h.
References _client, and carla::client::detail::Client::ClearDebugString().
|
inline |
Definition at line 982 of file Simulator.h.
References _client, and carla::client::detail::Client::ClearSkyLightMap().
|
inline |
Definition at line 708 of file Simulator.h.
References _client, carla::client::detail::Client::CloseVehicleDoor(), and carla::client::detail::ActorState::GetId().
|
static |
Deleter: on a pool thread, destroy on a background thread (~Simulator joins the pools).
Definition at line 159 of file Simulator.cpp.
References carla::ThreadPool::IsPoolThread(), and Simulator().
| bool carla::client::detail::Simulator::DestroyActor | ( | Actor & | actor | ) |
Definition at line 514 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(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 443 of file Simulator.h.
References _client, and carla::client::detail::Client::DestroyActor().
|
inline |
Definition at line 258 of file Simulator.h.
References _client, and carla::client::detail::Client::DestroyTrafficManager().
|
inline |
Definition at line 516 of file Simulator.h.
References _client, carla::client::detail::Client::DisableActorConstantAcceleration(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 508 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 553 of file Simulator.cpp.
References _client, and carla::client::detail::Client::DisableForROS().
|
inline |
Definition at line 890 of file Simulator.h.
References _client, and carla::client::detail::Client::DrawDebugShape().
|
inline |
Definition at line 512 of file Simulator.h.
References _client, carla::client::detail::Client::EnableActorConstantAcceleration(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 504 of file Simulator.h.
References _client, carla::client::detail::Client::EnableActorConstantVelocity(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 740 of file Simulator.h.
References _client, carla::client::detail::Client::EnableCarSim(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 748 of file Simulator.h.
References _client, carla::client::detail::Client::EnableChronoPhysics(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 337 of file Simulator.h.
References _client, and carla::client::detail::Client::EnableEnvironmentObjects().
| void carla::client::detail::Simulator::EnableForROS | ( | const Sensor & | sensor | ) |
Definition at line 549 of file Simulator.cpp.
References _client, and carla::client::detail::Client::EnableForROS().
| void carla::client::detail::Simulator::FreezeAllTrafficLights | ( | bool | frozen | ) |
Definition at line 581 of file Simulator.cpp.
References _client, and carla::client::detail::Client::FreezeAllTrafficLights().
|
inline |
Definition at line 864 of file Simulator.h.
References _client, carla::client::detail::Client::FreezeTrafficLight(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 668 of file Simulator.h.
References _client, carla::client::detail::Client::GetAckermannControllerSettings(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 580 of file Simulator.h.
References carla::client::ActorSnapshot::acceleration, and GetActorSnapshot().
|
inline |
Definition at line 497 of file Simulator.h.
References carla::client::ActorSnapshot::angular_velocity, and GetActorSnapshot().
|
inline |
Definition at line 564 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorBoneNames(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 556 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorBoneRelativeTransforms(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 552 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorBoneWorldTransforms(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 400 of file Simulator.h.
References _episode, and DEBUG_ASSERT.
|
inline |
Definition at line 589 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorClassName(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 560 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorComponentNames(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 548 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorComponentRelativeTransform(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 544 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorComponentWorldTransform(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 481 of file Simulator.h.
References GetActorSnapshot(), carla::geom::Transform::location, and carla::client::ActorSnapshot::transform.
|
inline |
Definition at line 584 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorName(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 405 of file Simulator.h.
References _episode, and DEBUG_ASSERT.
|
inline |
Definition at line 448 of file Simulator.h.
References _episode, and DEBUG_ASSERT.
Referenced by GetActorAcceleration(), GetActorAngularVelocity(), GetActorLocation(), GetActorSnapshot(), GetActorTransform(), and GetActorVelocity().
|
inline |
Definition at line 453 of file Simulator.h.
References GetActorSnapshot(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 576 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorSocketNames(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 572 of file Simulator.h.
References _client, carla::client::detail::Client::GetActorSocketRelativeTransforms(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 568 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 468 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 485 of file Simulator.h.
References GetActorSnapshot(), and carla::client::ActorSnapshot::transform.
|
inline |
Definition at line 489 of file Simulator.h.
References GetActorSnapshot(), and carla::client::ActorSnapshot::velocity.
|
inline |
Definition at line 410 of file Simulator.h.
References _episode, and DEBUG_ASSERT.
|
inline |
Definition at line 144 of file Simulator.h.
References _client, and carla::client::detail::Client::GetAvailableMaps().
| SharedPtr< BlueprintLibrary > carla::client::detail::Simulator::GetBlueprintLibrary | ( | ) |
Definition at line 348 of file Simulator.cpp.
References _client, and carla::client::detail::Client::GetActorDefinitions().
|
inline |
Definition at line 680 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 306 of file Simulator.cpp.
References _client, and carla::client::detail::Client::GetCacheFile().
|
inline |
Definition at line 204 of file Simulator.h.
References _client, and carla::client::detail::Client::GetClientVersion().
|
inline |
Definition at line 154 of file Simulator.h.
References _client, and carla::client::detail::Client::GetContentPacks().
| EpisodeProxy carla::client::detail::Simulator::GetCurrentEpisode | ( | ) |
Definition at line 237 of file Simulator.cpp.
References GetReadyCurrentEpisode().
Referenced by GetWorld(), LoadEpisode(), MakeActor(), and SpawnActor().
|
inline |
Definition at line 106 of file Simulator.h.
References _episode, DEBUG_ASSERT, and GetReadyCurrentEpisode().
Definition at line 253 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 308 of file Simulator.h.
References _client, and carla::client::detail::Client::GetEgoSpawnPoints().
|
inline |
Definition at line 238 of file Simulator.h.
References _client, and carla::client::detail::Client::GetEndpoint().
|
inline |
Definition at line 333 of file Simulator.h.
References _client, and carla::client::detail::Client::GetEnvironmentObjects().
|
inline |
Definition at line 274 of file Simulator.h.
References _client, and carla::client::detail::Client::GetEpisodeSettings().
Referenced by GetReadyCurrentEpisode().
|
inline |
Definition at line 186 of file Simulator.h.
References _gc_policy.
|
inline |
Definition at line 880 of file Simulator.h.
References _client, carla::client::detail::Client::GetGroupTrafficLights(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 288 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 329 of file Simulator.h.
References _client, and carla::client::detail::Client::GetLevelBBs().
|
inline |
Definition at line 876 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetLightBoxes().
|
inline |
Definition at line 932 of file Simulator.h.
References _light_manager.
| std::vector< std::string > carla::client::detail::Simulator::GetNamesOfAllObjects | ( | ) | const |
Definition at line 603 of file Simulator.cpp.
References _client, and carla::client::detail::Client::GetNamesOfAllObjects().
| std::shared_ptr< WalkerNavigation > carla::client::detail::Simulator::GetNavigation | ( | ) |
Definition at line 394 of file Simulator.cpp.
References _episode, and DEBUG_ASSERT.
|
inline |
Definition at line 200 of file Simulator.h.
References _client, and carla::client::detail::Client::GetTimeout().
|
inline |
Definition at line 692 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetPoseFromAnimation().
|
inline |
Definition at line 304 of file Simulator.h.
References _client, and carla::client::detail::Client::GetPublishTF().
| std::optional< geom::Location > carla::client::detail::Simulator::GetRandomLocationFromNavigation | ( | ) |
Definition at line 434 of file Simulator.cpp.
References _client, _episode, DEBUG_ASSERT, and carla::client::detail::Client::GetRandomLocationFromNavigation().
| void carla::client::detail::Simulator::GetReadyCurrentEpisode | ( | ) |
Definition at line 226 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 298 of file Simulator.cpp.
References _client, and carla::client::detail::Client::GetRequiredFiles().
|
inline |
Definition at line 208 of file Simulator.h.
References _client, and carla::client::detail::Client::GetServerVersion().
Definition at line 357 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 249 of file Simulator.h.
References _client, and carla::client::detail::Client::GetTrafficManagerRunning().
|
inline |
Definition at line 324 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetVehicleBoneWorldTransforms().
|
inline |
Definition at line 320 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetVehicleLightState().
|
inline |
Definition at line 312 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 353 of file Simulator.cpp.
References _client, and carla::client::detail::Client::GetVehiclesLightStates().
|
inline |
Definition at line 316 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetVehicleTelemetryData().
|
inline |
Definition at line 280 of file Simulator.h.
References _client, and carla::client::detail::Client::GetWeatherParameters().
|
inline |
Definition at line 724 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetWheelPitchAngle().
|
inline |
Definition at line 716 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetWheelSteerAngle().
|
inline |
Definition at line 732 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::GetWheelSuspensionOffset().
|
inline |
Definition at line 121 of file Simulator.h.
References GetCurrentEpisode().
|
inline |
Definition at line 131 of file Simulator.h.
References _episode, and DEBUG_ASSERT.
|
inline |
Definition at line 986 of file Simulator.h.
References _client, and carla::client::detail::Client::HasSkyLightMap().
| bool carla::client::detail::Simulator::IsEnabledForROS | ( | const Sensor & | sensor | ) |
Definition at line 557 of file Simulator.cpp.
References _client, 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 407 of file Simulator.cpp.
References _episode, and DEBUG_ASSERT.
|
inline |
Query to know if a Traffic Manager is running on port.
Definition at line 243 of file Simulator.h.
References _client, and carla::client::detail::Client::IsTrafficManagerRunning().
|
inline |
Definition at line 296 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 174 of file Simulator.cpp.
References _client, _episode, GetCurrentEpisode(), carla::client::detail::Client::GetEpisodeSettings(), carla::client::detail::EpisodeProxyImpl< PointerT >::GetId(), carla::client::detail::Client::GetTimeout(), carla::client::detail::Client::LoadEpisode(), carla::time_duration::milliseconds(), carla::client::detail::Client::SendTickCue(), carla::rpc::EpisodeSettings::synchronous_mode, carla::throw_exception(), and carla::time_duration::to_chrono().
Referenced by LoadOpenDriveEpisode(), and ReloadEpisode().
|
inline |
Definition at line 86 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 211 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 421 of file Simulator.h.
References carla::client::Disabled, GetCurrentEpisode(), carla::client::Inherit, carla::client::detail::ActorFactory::MakeActor(), and RELEASE_ASSERT.
Referenced by GetSpectator().
|
inline |
Definition at line 158 of file Simulator.h.
References _client, and carla::client::detail::Client::MountContentPack().
| void carla::client::detail::Simulator::NavigationTick | ( | ) |
Definition at line 401 of file Simulator.cpp.
References _episode, and DEBUG_ASSERT.
Referenced by Tick(), and WaitForTick().
|
inline |
Definition at line 704 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::OpenVehicleDoor().
|
inline |
Definition at line 343 of file Simulator.h.
References _client, and carla::client::detail::Client::ProjectPoint().
|
inline |
Definition at line 936 of file Simulator.h.
References _client, and carla::client::detail::Client::QueryLightsStateToServer().
| void carla::client::detail::Simulator::RegisterAIController | ( | const WalkerAIController & | controller | ) |
Definition at line 412 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 950 of file Simulator.h.
References _episode, and DEBUG_ASSERT.
|
inline |
Definition at line 220 of file Simulator.h.
References _episode, and DEBUG_ASSERT.
|
inline |
Definition at line 80 of file Simulator.h.
References LoadEpisode().
|
inline |
Definition at line 955 of file Simulator.h.
References _episode, and DEBUG_ASSERT.
|
inline |
Definition at line 225 of file Simulator.h.
References _episode, and DEBUG_ASSERT.
|
inline |
Definition at line 790 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 302 of file Simulator.cpp.
References _client, and carla::client::detail::Client::RequestFile().
|
inline |
Definition at line 872 of file Simulator.h.
References _client, and carla::client::detail::Client::ResetAllTrafficLights().
|
inline |
Definition at line 868 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 577 of file Simulator.cpp.
References _client, and carla::client::detail::Client::Send().
|
inline |
Definition at line 606 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorCollisions().
|
inline |
Definition at line 610 of file Simulator.h.
References _client, and carla::client::detail::Client::SetActorCollisions().
|
inline |
Definition at line 614 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorDead().
|
inline |
Definition at line 618 of file Simulator.h.
References _client, and carla::client::detail::Client::SetActorDead().
|
inline |
Definition at line 622 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorEnableGravity().
|
inline |
Definition at line 594 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorLocation().
|
inline |
Definition at line 602 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorSimulatePhysics().
|
inline |
Definition at line 501 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorTargetAngularVelocity().
|
inline |
Definition at line 493 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorTargetVelocity().
|
inline |
Definition at line 598 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorTransform().
|
inline |
Definition at line 684 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 361 of file Simulator.cpp.
References _client, _episode, carla::rpc::EpisodeSettings::fixed_delta_seconds, 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 294 of file Simulator.cpp.
References _client, and carla::client::detail::Client::SetFilesBaseFolder().
|
inline |
Definition at line 292 of file Simulator.h.
References _client, and carla::client::detail::Client::SetIMUSensorGravity().
|
inline |
Definition at line 700 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetLightStateToVehicle().
|
inline |
Definition at line 656 of file Simulator.h.
References _client, carla::client::detail::Client::ApplyControlToVehicle(), and carla::client::detail::ActorState::GetId().
|
inline |
Definition at line 196 of file Simulator.h.
References _client, and carla::client::detail::Client::SetTimeout().
| void carla::client::detail::Simulator::SetPedestriansCrossFactor | ( | float | percentage | ) |
Definition at line 453 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 463 of file Simulator.cpp.
References _client, _episode, DEBUG_ASSERT, and carla::client::detail::Client::SetPedestriansSeed().
|
inline |
Definition at line 300 of file Simulator.h.
References _client, and carla::client::detail::Client::SetPublishTF().
|
inline |
Definition at line 801 of file Simulator.h.
References _client, and carla::client::detail::Client::SetReplayerIgnoreHero().
|
inline |
Definition at line 805 of file Simulator.h.
References _client, and carla::client::detail::Client::SetReplayerIgnoreSpectator().
|
inline |
Definition at line 797 of file Simulator.h.
References _client, and carla::client::detail::Client::SetReplayerTimeFactor().
|
inline |
Definition at line 978 of file Simulator.h.
References _client, and carla::client::detail::Client::SetSkyLightMap().
|
inline |
Definition at line 852 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetTrafficLightGreenTime().
|
inline |
Definition at line 860 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetTrafficLightRedTime().
|
inline |
Definition at line 848 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetTrafficLightState().
|
inline |
Definition at line 856 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetTrafficLightYellowTime().
|
inline |
Definition at line 648 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetActorAutopilot().
|
inline |
Definition at line 284 of file Simulator.h.
References _client, and carla::client::detail::Client::SetWeatherParameters().
|
inline |
Definition at line 736 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetWheelAnimationOverride().
|
inline |
Definition at line 720 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetWheelPitchAngle().
|
inline |
Definition at line 712 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetWheelSteerDirection().
|
inline |
Definition at line 728 of file Simulator.h.
References _client, carla::client::detail::ActorState::GetId(), and carla::client::detail::Client::SetWheelSuspensionOffset().
|
private |
Definition at line 242 of file Simulator.cpp.
References _cached_map, _open_drive_file, and carla::rpc::MapInfo::name.
|
inline |
Definition at line 786 of file Simulator.h.
References _client, and carla::client::detail::Client::ShowRecorderActorsBlocked().
|
inline |
Definition at line 782 of file Simulator.h.
References _client, and carla::client::detail::Client::ShowRecorderCollisions().
|
inline |
Definition at line 778 of file Simulator.h.
References _client, and carla::client::detail::Client::ShowRecorderFileInfo().
|
inline |
Definition at line 652 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 477 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::client::detail::ActorFactory::MakeActor(), carla::client::ActorBlueprint::MakeActorDescription(), carla::rpc::Actor::spawn_frame, 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 905 of file Simulator.h.
References _client, and carla::client::detail::Client::SpawnCustomMesh().
|
inline |
Definition at line 770 of file Simulator.h.
References _client, and carla::client::detail::Client::StartRecorder().
|
inline |
Definition at line 774 of file Simulator.h.
References _client, and carla::client::detail::Client::StopRecorder().
|
inline |
Definition at line 809 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 561 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 531 of file Simulator.cpp.
References _client, _episode, DEBUG_ASSERT, and carla::client::detail::Client::SubscribeToStream().
| uint64_t carla::client::detail::Simulator::Tick | ( | time_duration | timeout | ) |
Definition at line 327 of file Simulator.cpp.
References _client, _episode, DEBUG_ASSERT, carla::client::detail::Client::GetEndpoint(), NavigationTick(), carla::client::detail::Client::SendTickCue(), carla::client::detail::SynchronizeFrame(), carla::throw_exception(), and carla::client::TimeoutException::TimeoutException().
|
inline |
Definition at line 90 of file Simulator.h.
References _client, and carla::client::detail::Client::UnloadLevelLayer().
|
inline |
Definition at line 162 of file Simulator.h.
References _client, and carla::client::detail::Client::UnmountContentPack().
| void carla::client::detail::Simulator::UnregisterAIController | ( | const WalkerAIController & | controller | ) |
Definition at line 423 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 573 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 544 of file Simulator.cpp.
References _client, and carla::client::detail::Client::UnSubscribeFromStream().
|
inline |
Definition at line 946 of file Simulator.h.
References _client, and carla::client::detail::Client::UpdateDayNightCycle().
|
inline |
Definition at line 940 of file Simulator.h.
References _client, and carla::client::detail::Client::UpdateServerLightsState().
|
inline |
Definition at line 744 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 314 of file Simulator.cpp.
References _client, _episode, DEBUG_ASSERT, carla::client::detail::Client::GetEndpoint(), NavigationTick(), carla::throw_exception(), and carla::client::TimeoutException::TimeoutException().
Referenced by GetReadyCurrentEpisode().
|
inline |
Definition at line 378 of file Simulator.h.
References _client, and carla::client::detail::Client::WalkerGoToLocation().
|
inline |
Definition at line 382 of file Simulator.h.
References _client, and carla::client::detail::Client::WalkerSetMaxSpeed().
|
inline |
Definition at line 374 of file Simulator.h.
References _client, and carla::client::detail::Client::WalkerStartNavigation().
|
inline |
Definition at line 386 of file Simulator.h.
References _client, and carla::client::detail::Client::WalkerStopNavigation().
Definition at line 1006 of file Simulator.h.
Referenced by GetCurrentMap(), and ShouldUpdateMap().
|
private |
Definition at line 1008 of file Simulator.h.
Referenced by GetCurrentMap().
|
private |
Definition at line 1010 of file Simulator.h.
Referenced by GetCurrentMap().
|
private |
Definition at line 998 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(), Simulator(), 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 1002 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 1004 of file Simulator.h.
Referenced by GetGarbageCollectionPolicy(), Simulator(), and SpawnActor().
|
private |
Definition at line 1000 of file Simulator.h.
Referenced by GetLightManager(), GetReadyCurrentEpisode(), and Simulator().
|
private |
Definition at line 1012 of file Simulator.h.
Referenced by GetCurrentMap(), and ShouldUpdateMap().