#include <World.h>
Public 成员函数 | |
void | ApplyColorTextureToObject (const std::string &actor_name, const rpc::MaterialParameter ¶meter, const rpc::TextureColor &Texture) |
void | ApplyColorTextureToObjects (const std::vector< std::string > &objects_names, const rpc::MaterialParameter ¶meter, const rpc::TextureColor &Texture) |
void | ApplyFloatColorTextureToObject (const std::string &actor_name, const rpc::MaterialParameter ¶meter, const rpc::TextureFloatColor &Texture) |
void | ApplyFloatColorTextureToObjects (const std::vector< std::string > &objects_names, const rpc::MaterialParameter ¶meter, const rpc::TextureFloatColor &Texture) |
uint64_t | ApplySettings (const rpc::EpisodeSettings &settings, time_duration timeout) |
void | ApplyTexturesToObject (const std::string &actor_name, const rpc::TextureColor &diffuse_texture, const rpc::TextureFloatColor &emissive_texture, const rpc::TextureFloatColor &normal_texture, const rpc::TextureFloatColor &ao_roughness_metallic_emissive_texture) |
void | ApplyTexturesToObjects (const std::vector< std::string > &objects_names, const rpc::TextureColor &diffuse_texture, const rpc::TextureFloatColor &emissive_texture, const rpc::TextureFloatColor &normal_texture, const rpc::TextureFloatColor &ao_roughness_metallic_emissive_texture) |
std::vector< rpc::LabelledPoint > | CastRay (geom::Location start_location, geom::Location end_location) const |
void | EnableEnvironmentObjects (std::vector< uint64_t > env_objects_ids, bool enable) const |
void | FreezeAllTrafficLights (bool frozen) |
SharedPtr< Actor > | GetActor (ActorId id) const |
Find actor by id, return nullptr if not found. | |
SharedPtr< ActorList > | GetActors () const |
Return a list with all the actors currently present in the world. | |
SharedPtr< ActorList > | GetActors (const std::vector< ActorId > &actor_ids) const |
Return a list with the actors requested by ActorId. | |
SharedPtr< BlueprintLibrary > | GetBlueprintLibrary () const |
Return the list of blueprints available in this world. | |
std::vector< rpc::EnvironmentObject > | GetEnvironmentObjects (uint8_t queried_tag) const |
detail::EpisodeProxy | GetEpisode () const |
uint64_t | GetId () const |
Get the id of the episode associated with this world. | |
float | GetIMUISensorGravity () const |
Get Gravity value used for IMUI Sensor accelerometer calculation | |
std::vector< geom::BoundingBox > | GetLevelBBs (uint8_t queried_tag) const |
Returns all the BBs of all the elements of the level | |
SharedPtr< LightManager > | GetLightManager () const |
SharedPtr< Map > | GetMap () const |
Return the map that describes this world. | |
std::vector< std::string > | GetNamesOfAllObjects () const |
boost::optional< geom::Location > | GetRandomLocationFromNavigation () const |
Get a random location from the pedestrians navigation mesh | |
rpc::EpisodeSettings | GetSettings () const |
WorldSnapshot | GetSnapshot () const |
Return a snapshot of the world at this moment. | |
SharedPtr< Actor > | GetSpectator () const |
Return the spectator actor. | |
SharedPtr< Actor > | GetTrafficLight (const Landmark &landmark) const |
SharedPtr< Actor > | GetTrafficLightFromOpenDRIVE (const road::SignId &sign_id) const |
std::vector< SharedPtr< Actor > > | GetTrafficLightsFromWaypoint (const Waypoint &waypoint, double distance) const |
std::vector< SharedPtr< Actor > > | GetTrafficLightsInJunction (const road::JuncId junc_id) const |
SharedPtr< Actor > | GetTrafficSign (const Landmark &landmark) const |
rpc::VehicleLightStateList | GetVehiclesLightStates () const |
Returns a list of pairs where the firts element is the vehicle ID and the second one is the light state | |
rpc::WeatherParameters | GetWeather () const |
Retrieve the weather parameters currently active in the world. | |
boost::optional< rpc::LabelledPoint > | GroundProjection (geom::Location location, float search_distance=10000.0) const |
void | LoadLevelLayer (rpc::MapLayer map_layers) const |
DebugHelper | MakeDebugHelper () const |
size_t | OnTick (std::function< void(WorldSnapshot)> callback) |
Register a callback to be called every time a world tick is received. | |
World & | operator= (const World &)=default |
World & | operator= (World &&)=default |
boost::optional< rpc::LabelledPoint > | ProjectPoint (geom::Location location, geom::Vector3D direction, float search_distance=10000.f) const |
void | RemoveOnTick (size_t callback_id) |
Remove a callback registered with OnTick. | |
void | ResetAllTrafficLights () |
void | SetIMUISensorGravity (float NewIMUISensorGravity) |
Set Gravity value used for IMUI Sensor accelerometer calculation | |
void | SetPedestriansCrossFactor (float percentage) |
set the probability that an agent could cross the roads in its path following percentage of 0.0f means no pedestrian can cross roads percentage of 0.5f means 50% of all pedestrians can cross roads percentage of 1.0f means all pedestrians can cross roads if needed | |
void | SetPedestriansSeed (unsigned int seed) |
set the seed to use with random numbers in the pedestrians module | |
void | SetWeather (const rpc::WeatherParameters &weather) |
Change the weather in the simulation. | |
SharedPtr< Actor > | SpawnActor (const ActorBlueprint &blueprint, const geom::Transform &transform, Actor *parent=nullptr, rpc::AttachmentType attachment_type=rpc::AttachmentType::Rigid, const std::string &socket_name="") |
Spawn an actor into the world based on the blueprint provided at transform. | |
uint64_t | Tick (time_duration timeout) |
Signal the simulator to continue to next tick (only has effect on synchronous mode). | |
SharedPtr< Actor > | TrySpawnActor (const ActorBlueprint &blueprint, const geom::Transform &transform, Actor *parent=nullptr, rpc::AttachmentType attachment_type=rpc::AttachmentType::Rigid, const std::string &socket_name="") noexcept |
Same as SpawnActor but return nullptr on failure instead of throwing an exception. | |
void | UnloadLevelLayer (rpc::MapLayer map_layers) const |
WorldSnapshot | WaitForTick (time_duration timeout) const |
Block calling thread until a world tick is received. | |
World (const World &)=default | |
World (detail::EpisodeProxy episode) | |
World (World &&)=default | |
~World () | |
Private 属性 | |
detail::EpisodeProxy | _episode |
|
inlineexplicit |
|
default |
|
default |
void carla::client::World::ApplyColorTextureToObject | ( | const std::string & | actor_name, |
const rpc::MaterialParameter & | parameter, | ||
const rpc::TextureColor & | Texture ) |
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
被这些函数引用 ApplyTexturesToObject().
void carla::client::World::ApplyColorTextureToObjects | ( | const std::vector< std::string > & | objects_names, |
const rpc::MaterialParameter & | parameter, | ||
const rpc::TextureColor & | Texture ) |
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
被这些函数引用 ApplyTexturesToObjects().
void carla::client::World::ApplyFloatColorTextureToObject | ( | const std::string & | actor_name, |
const rpc::MaterialParameter & | parameter, | ||
const rpc::TextureFloatColor & | Texture ) |
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
被这些函数引用 ApplyTexturesToObject().
void carla::client::World::ApplyFloatColorTextureToObjects | ( | const std::vector< std::string > & | objects_names, |
const rpc::MaterialParameter & | parameter, | ||
const rpc::TextureFloatColor & | Texture ) |
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
被这些函数引用 ApplyTexturesToObjects().
uint64_t carla::client::World::ApplySettings | ( | const rpc::EpisodeSettings & | settings, |
time_duration | timeout ) |
引用了 _episode, carla::rpc::EpisodeSettings::fixed_delta_seconds, GetSnapshot(), carla::client::detail::EpisodeProxyImpl< PointerT >::Lock(), carla::log_warning(), carla::time_duration::milliseconds() , 以及 Tick().
void carla::client::World::ApplyTexturesToObject | ( | const std::string & | actor_name, |
const rpc::TextureColor & | diffuse_texture, | ||
const rpc::TextureFloatColor & | emissive_texture, | ||
const rpc::TextureFloatColor & | normal_texture, | ||
const rpc::TextureFloatColor & | ao_roughness_metallic_emissive_texture ) |
void carla::client::World::ApplyTexturesToObjects | ( | const std::vector< std::string > & | objects_names, |
const rpc::TextureColor & | diffuse_texture, | ||
const rpc::TextureFloatColor & | emissive_texture, | ||
const rpc::TextureFloatColor & | normal_texture, | ||
const rpc::TextureFloatColor & | ao_roughness_metallic_emissive_texture ) |
std::vector< rpc::LabelledPoint > carla::client::World::CastRay | ( | geom::Location | start_location, |
geom::Location | end_location ) const |
void carla::client::World::EnableEnvironmentObjects | ( | std::vector< uint64_t > | env_objects_ids, |
bool | enable ) const |
void carla::client::World::FreezeAllTrafficLights | ( | bool | frozen | ) |
Find actor by id, return nullptr if not found.
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
被这些函数引用 carla::nav::WalkerManager::GetAllTrafficLightWaypoints().
Return a list with all the actors currently present in the world.
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
被这些函数引用 carla::client::TrafficLight::GetGroupTrafficLights(), GetTrafficLight(), GetTrafficLightFromOpenDRIVE(), GetTrafficSign(), carla::client::RssSensor::TickRssSensor() , 以及 carla::traffic_manager::ALSM::Update().
SharedPtr< ActorList > carla::client::World::GetActors | ( | const std::vector< ActorId > & | actor_ids | ) | const |
Return a list with the actors requested by ActorId.
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
SharedPtr< BlueprintLibrary > carla::client::World::GetBlueprintLibrary | ( | ) | const |
Return the list of blueprints available in this world.
This blueprints can be used to spawning actor into the world.
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
std::vector< rpc::EnvironmentObject > carla::client::World::GetEnvironmentObjects | ( | uint8_t | queried_tag | ) | const |
|
inline |
|
inline |
Get the id of the episode associated with this world.
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::GetId().
float carla::client::World::GetIMUISensorGravity | ( | ) | const |
Get Gravity value used for IMUI Sensor accelerometer calculation
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
std::vector< geom::BoundingBox > carla::client::World::GetLevelBBs | ( | uint8_t | queried_tag | ) | const |
Returns all the BBs of all the elements of the level
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
SharedPtr< LightManager > carla::client::World::GetLightManager | ( | ) | const |
Return the map that describes this world.
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
被这些函数引用 GetTrafficLightsInJunction(), carla::client::RssSensor::Listen(), carla::client::Client::LoadWorldIfDifferent() , 以及 carla::traffic_manager::TrafficManagerLocal::SetupLocalMap().
std::vector< std::string > carla::client::World::GetNamesOfAllObjects | ( | ) | const |
boost::optional< geom::Location > carla::client::World::GetRandomLocationFromNavigation | ( | ) | const |
Get a random location from the pedestrians navigation mesh
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
rpc::EpisodeSettings carla::client::World::GetSettings | ( | ) | const |
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
被这些函数引用 carla::client::RssSensor::TickRssSensor().
WorldSnapshot carla::client::World::GetSnapshot | ( | ) | const |
Return a snapshot of the world at this moment.
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
被这些函数引用 ApplySettings(), carla::traffic_manager::ALSM::Reset(), carla::traffic_manager::TrafficManagerLocal::Run(), carla::traffic_manager::ALSM::Update(), carla::traffic_manager::MotionPlanStage::Update() , 以及 carla::traffic_manager::TrafficLightStage::Update().
Return the spectator actor.
The spectator controls the view in the simulator window.
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
引用了 GetActors(), carla::client::Landmark::GetId(), carla::client::TrafficSign::GetSignId() , 以及 carla::StringUtil::Match().
被这些函数引用 GetTrafficLightsFromWaypoint().
SharedPtr< Actor > carla::client::World::GetTrafficLightFromOpenDRIVE | ( | const road::SignId & | sign_id | ) | const |
引用了 GetActors(), carla::client::TrafficSign::GetSignId() , 以及 carla::StringUtil::Match().
被这些函数引用 GetTrafficLightsInJunction().
std::vector< SharedPtr< Actor > > carla::client::World::GetTrafficLightsFromWaypoint | ( | const Waypoint & | waypoint, |
double | distance ) const |
std::vector< SharedPtr< Actor > > carla::client::World::GetTrafficLightsInJunction | ( | const road::JuncId | junc_id | ) | const |
rpc::VehicleLightStateList carla::client::World::GetVehiclesLightStates | ( | ) | const |
Returns a list of pairs where the firts element is the vehicle ID and the second one is the light state
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
被这些函数引用 carla::traffic_manager::VehicleLightStage::UpdateWorldInfo().
rpc::WeatherParameters carla::client::World::GetWeather | ( | ) | const |
Retrieve the weather parameters currently active in the world.
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
被这些函数引用 carla::traffic_manager::VehicleLightStage::UpdateWorldInfo().
boost::optional< rpc::LabelledPoint > carla::client::World::GroundProjection | ( | geom::Location | location, |
float | search_distance = 10000.0 ) const |
void carla::client::World::LoadLevelLayer | ( | rpc::MapLayer | map_layers | ) | const |
|
inline |
size_t carla::client::World::OnTick | ( | std::function< void(WorldSnapshot)> | callback | ) |
Register a callback to be called every time a world tick is received.
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
boost::optional< rpc::LabelledPoint > carla::client::World::ProjectPoint | ( | geom::Location | location, |
geom::Vector3D | direction, | ||
float | search_distance = 10000.f ) const |
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
被这些函数引用 GroundProjection().
void carla::client::World::RemoveOnTick | ( | size_t | callback_id | ) |
Remove a callback registered with OnTick.
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
void carla::client::World::ResetAllTrafficLights | ( | ) |
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
被这些函数引用 carla::traffic_manager::TrafficManagerLocal::SetRandomDeviceSeed().
void carla::client::World::SetIMUISensorGravity | ( | float | NewIMUISensorGravity | ) |
Set Gravity value used for IMUI Sensor accelerometer calculation
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
void carla::client::World::SetPedestriansCrossFactor | ( | float | percentage | ) |
set the probability that an agent could cross the roads in its path following percentage of 0.0f means no pedestrian can cross roads percentage of 0.5f means 50% of all pedestrians can cross roads percentage of 1.0f means all pedestrians can cross roads if needed
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
void carla::client::World::SetPedestriansSeed | ( | unsigned int | seed | ) |
set the seed to use with random numbers in the pedestrians module
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
void carla::client::World::SetWeather | ( | const rpc::WeatherParameters & | weather | ) |
Change the weather in the simulation.
引用了 _episode , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
SharedPtr< Actor > carla::client::World::SpawnActor | ( | const ActorBlueprint & | blueprint, |
const geom::Transform & | transform, | ||
Actor * | parent = nullptr, | ||
rpc::AttachmentType | attachment_type = rpc::AttachmentType::Rigid, | ||
const std::string & | socket_name = "" ) |
Spawn an actor into the world based on the blueprint provided at transform.
If a parent is provided, the actor is attached to parent.
引用了 _episode, carla::client::Inherit , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().
uint64_t carla::client::World::Tick | ( | time_duration | timeout | ) |
Signal the simulator to continue to next tick (only has effect on synchronous mode).
引用了 _episode, carla::client::detail::EpisodeProxyImpl< PointerT >::Lock() , 以及 carla::time_duration::milliseconds().
被这些函数引用 ApplySettings().
|
noexcept |
void carla::client::World::UnloadLevelLayer | ( | rpc::MapLayer | map_layers | ) | const |
WorldSnapshot carla::client::World::WaitForTick | ( | time_duration | timeout | ) | const |
Block calling thread until a world tick is received.
引用了 _episode, carla::client::detail::EpisodeProxyImpl< PointerT >::Lock() , 以及 carla::time_duration::milliseconds().
|
private |
被这些函数引用 ApplyColorTextureToObject(), ApplyColorTextureToObjects(), ApplyFloatColorTextureToObject(), ApplyFloatColorTextureToObjects(), ApplySettings(), CastRay(), EnableEnvironmentObjects(), FreezeAllTrafficLights(), GetActor(), GetActors(), GetActors(), GetBlueprintLibrary(), GetEnvironmentObjects(), GetEpisode(), GetId(), GetIMUISensorGravity(), GetLevelBBs(), GetLightManager(), GetMap(), GetNamesOfAllObjects(), GetRandomLocationFromNavigation(), GetSettings(), GetSnapshot(), GetSpectator(), GetVehiclesLightStates(), GetWeather(), LoadLevelLayer(), MakeDebugHelper(), OnTick(), ProjectPoint(), RemoveOnTick(), ResetAllTrafficLights(), SetIMUISensorGravity(), SetPedestriansCrossFactor(), SetPedestriansSeed(), SetWeather(), SpawnActor(), Tick(), UnloadLevelLayer() , 以及 WaitForTick().