49 class AckermannControllerSettings;
50 class ActorDescription;
52 class VehicleAckermannControl;
55 class WalkerBoneControlIn;
56 class WalkerBoneControlOut;
76 const std::string &host,
78 size_t worker_threads = 0u);
124 const std::vector<std::string> &objects_name,
129 const std::vector<std::string> &objects_name,
174 std::vector<std::string>
GetRequiredFiles(
const std::string &folder =
"",
const bool download =
true)
const;
180 std::vector<uint8_t>
GetCacheFile(
const std::string &name,
const bool request_otherwise =
true)
const;
214 std::vector<rpc::Actor>
GetActorsById(
const std::vector<ActorId> &ids);
310 const std::string &component_name);
314 const std::string &component_name);
376 std::string simfile_path);
415 uint64_t MaxSubsteps,
416 float MaxSubstepDeltaTime,
417 std::string VehicleJSON,
418 std::string PowertrainJSON,
419 std::string TireJSON,
420 std::string BaseJSONPath);
477 std::string
StartRecorder(std::string name,
bool additional_data,
bool stop_replayer);
488 std::string name,
double start,
double duration,
489 uint32_t follow_id,
bool replay_sensors,
bool replay_weather,
const geom::Transform& offset,
490 std::string map_override);
502 std::function<
void(
Buffer)> callback);
507 std::function<
void(
Buffer)> callback);
533 const std::vector<float> &vertices,
534 const std::vector<uint32_t> &triangles,
535 const std::string &material);
538 std::vector<rpc::Command> commands,
542 std::vector<rpc::Command> commands,
550 std::vector<rpc::LightState>& lights,
551 bool discard_client =
false)
const;
556 std::vector<geom::BoundingBox>
GetLevelBBs(uint8_t queried_tag)
const;
561 std::vector<uint64_t> env_objects_ids,
567 std::vector<rpc::LabelledPoint>
CastRay(
Inherit (privately) to suppress copy/move construction and assignment.
Provides communication with the rpc and streaming servers of a CARLA simulator.
void SetReplayerIgnoreHero(bool ignore_hero)
void SetTrafficLightRedTime(rpc::ActorId traffic_light, float red_time)
void ApplyControlToWalker(rpc::ActorId walker, const rpc::WalkerControl &control)
bool WalkerGoToLocation(rpc::ActorId walker, const geom::Location &destination) const
bool SetPedestriansSeed(uint32_t seed) const
Seed for the server-side navigation RNG (crosser draw); applies to walkers whose navigation starts af...
std::vector< geom::Transform > GetVehicleBoneWorldTransforms(rpc::ActorId actor)
std::string GetClientVersion()
void OpenVehicleDoor(rpc::ActorId vehicle, const rpc::VehicleDoor door_idx)
const std::string GetEndpoint() const
float GetWheelSuspensionOffset(rpc::ActorId vehicle, rpc::VehicleWheelLocation wheel_location)
void SetPublishTF(bool publish_tf)
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)
std::vector< geom::Transform > GetEgoSpawnPoints() const
rpc::WeatherParameters GetWeatherParameters()
std::vector< std::string > GetActorBoneNames(rpc::ActorId actor)
std::string GetMapData() const
void ApplyTextureToActor(rpc::ActorId ActorId, const rpc::MaterialParameter &MaterialParameter, const rpc::TextureColor &Texture)
void ApplyPhysicsControlToVehicle(rpc::ActorId vehicle, const rpc::VehiclePhysicsControl &physics_control)
void CloseVehicleDoor(rpc::ActorId vehicle, const rpc::VehicleDoor door_idx)
void LoadLevelLayer(rpc::MapLayer map_layer) const
void SetActorTargetVelocity(rpc::ActorId actor, const geom::Vector3D &vector)
geom::Transform GetActorComponentWorldTransform(rpc::ActorId actor, const std::string &component_name)
std::vector< std::string > GetAvailableMaps()
bool IsEnabledForROS(const streaming::Token &token)
void DisableForROS(const streaming::Token &token)
std::vector< rpc::ContentPackInfo > GetContentPacks()
bool SetFilesBaseFolder(const std::string &path)
void Send(rpc::ActorId ActorId, const rpc::CustomV2XBytes &data)
rpc::VehicleLightState GetVehicleLightState(rpc::ActorId vehicle) const
rpc::EpisodeInfo GetEpisodeInfo()
void SetWheelAnimationOverride(rpc::ActorId vehicle, bool enabled)
std::vector< rpc::Actor > GetActorsById(const std::vector< ActorId > &ids)
rpc::VehicleTelemetryData GetVehicleTelemetryData(rpc::ActorId vehicle) const
void DisableActorConstantVelocity(rpc::ActorId actor)
void EnableActorConstantVelocity(rpc::ActorId actor, const geom::Vector3D &vector)
void RequestFile(const std::string &name) const
const std::unique_ptr< Pimpl > _pimpl
rpc::AckermannControllerSettings GetAckermannControllerSettings(rpc::ActorId vehicle) const
void EnableChronoPhysics(rpc::ActorId vehicle, uint64_t MaxSubsteps, float MaxSubstepDeltaTime, std::string VehicleJSON, std::string PowertrainJSON, std::string TireJSON, std::string BaseJSONPath)
bool WalkerStartNavigation(rpc::ActorId walker) const
std::string ShowRecorderActorsBlocked(std::string name, double min_time, double min_distance)
bool GetPublishTF() const
geom::Transform GetActorComponentRelativeTransform(rpc::ActorId actor, const std::string &component_name)
std::vector< rpc::CommandResponse > ApplyBatchSync(std::vector< rpc::Command > commands, bool do_tick_cue)
void UnSubscribeFromGBuffer(rpc::ActorId ActorId, uint32_t GBufferId)
bool IsNavigationServerSide() const
True when the server hosts the pedestrian navigation (a World-Partitioned navmesh exists in the curre...
std::vector< ActorId > GetGroupTrafficLights(rpc::ActorId traffic_light)
void SetActorCollisions(rpc::ActorId actor, bool enabled)
void ApplyAckermannControllerSettings(rpc::ActorId vehicle, const rpc::AckermannControllerSettings &settings)
void ResetAllTrafficLights()
void SetActorAutopilot(rpc::ActorId vehicle, bool enabled)
float GetWheelPitchAngle(rpc::ActorId vehicle, rpc::VehicleWheelLocation wheel_location)
void UnSubscribeFromStream(const streaming::Token &token)
rpc::VehicleLightStateList GetVehiclesLightStates()
Returns a list of pairs where the firts element is the vehicle ID and the second one is the light sta...
std::vector< std::string > GetRequiredFiles(const std::string &folder="", const bool download=true) const
void LoadEpisode(std::string map_name, bool reset_settings=true, rpc::MapLayer map_layer=rpc::MapLayer::All)
void ResetTrafficLightGroup(rpc::ActorId traffic_light)
void SetIMUSensorGravity(float gravity)
std::vector< std::string > GetActorComponentNames(rpc::ActorId actor)
void SetActorLocation(rpc::ActorId actor, const geom::Location &location)
uint64_t SetEpisodeSettings(const rpc::EpisodeSettings &settings)
void ShowVehicleDebugTelemetry(rpc::ActorId vehicle, bool enabled)
void SubscribeToStream(const streaming::Token &token, std::function< void(Buffer)> callback)
void SetTrafficLightYellowTime(rpc::ActorId traffic_light, float yellow_time)
void BlendPose(rpc::ActorId walker, float blend)
void StopReplayer(bool keep_actors)
std::vector< std::string > GetNamesOfAllObjects() const
void SpawnCustomMesh(const std::vector< float > &vertices, const std::vector< uint32_t > &triangles, const std::string &material)
void CopyOpenDriveToServer(std::string opendrive, const rpc::OpendriveGenerationParameters ¶ms)
rpc::VehiclePhysicsControl GetVehiclePhysicsControl(rpc::ActorId vehicle) const
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.
std::vector< uint8_t > GetNavigationMesh() const
void EnableActorConstantAcceleration(rpc::ActorId actor, const geom::Vector3D &vector)
void AddActorImpulse(rpc::ActorId actor, const geom::Vector3D &impulse)
void DrawDebugShape(const rpc::DebugShape &shape)
void SetActorTransform(rpc::ActorId actor, const geom::Transform &transform)
void SetActorDead(rpc::ActorId actor)
void ApplyBatch(std::vector< rpc::Command > commands, bool do_tick_cue)
void StopStreaming()
Join the streaming threads; no stream callback runs afterwards.
void SetTrafficLightGreenTime(rpc::ActorId traffic_light, float green_time)
void SetWeatherParameters(const rpc::WeatherParameters &weather)
void FreezeTrafficLight(rpc::ActorId traffic_light, bool freeze)
void AddActorAngularImpulse(rpc::ActorId actor, const geom::Vector3D &vector)
void FreezeAllTrafficLights(bool frozen)
std::vector< geom::Transform > GetActorSocketWorldTransforms(rpc::ActorId actor)
bool DestroyActor(rpc::ActorId actor)
bool AddTrafficManagerRunning(std::pair< std::string, uint16_t > trafficManagerInfo) const
Informs the server that a Traffic Manager is running on <IP, port>
bool SetPedestriansCrossFactor(float percentage) const
Probability that a walker whose navigation starts after this call may cross roads (server-side naviga...
std::vector< geom::Transform > GetActorBoneWorldTransforms(rpc::ActorId actor)
bool IsTrafficManagerRunning(uint16_t port) const
Querry to know if a Traffic Manager is running on port.
void SetReplayerIgnoreSpectator(bool ignore_spectator)
std::string StartRecorder(std::string name, bool additional_data, bool stop_replayer)
std::vector< geom::BoundingBox > GetLightBoxes(rpc::ActorId traffic_light) const
float GetWheelSteerAngle(rpc::ActorId vehicle, rpc::VehicleWheelLocation wheel_location)
void AddActorForce(rpc::ActorId actor, const geom::Vector3D &force)
std::string ShowRecorderCollisions(std::string name, char type1, char type2)
void SetLightStateToVehicle(rpc::ActorId vehicle, const rpc::VehicleLightState &light_state)
std::vector< geom::BoundingBox > GetLevelBBs(uint8_t queried_tag) const
Returns all the BBs of all the elements of the level.
std::vector< uint8_t > GetCacheFile(const std::string &name, const bool request_otherwise=true) const
std::vector< rpc::LabelledPoint > CastRay(geom::Location start_location, geom::Location end_location) const
void EnableForROS(const streaming::Token &token)
void SetSkyLightMap(const rpc::TextureFloatColor &panorama, float intensity, int32_t face_size)
void EnableCarSim(rpc::ActorId vehicle, std::string simfile_path)
rpc::Actor GetSpectator()
std::string GetActorClassName(rpc::ActorId actor) const
void SetTimeout(time_duration timeout)
std::vector< geom::Transform > GetActorBoneRelativeTransforms(rpc::ActorId actor)
bool WalkerStopNavigation(rpc::ActorId walker) const
void SetActorEnableGravity(rpc::ActorId actor, bool enabled)
void SetActorSimulatePhysics(rpc::ActorId actor, bool enabled)
float GetIMUSensorGravity()
bool UnmountContentPack(const std::string &name)
void ApplyAckermannControlToVehicle(rpc::ActorId vehicle, const rpc::VehicleAckermannControl &control)
std::string ShowRecorderFileInfo(std::string name, bool show_all)
std::vector< rpc::ActorDefinition > GetActorDefinitions()
void SubscribeToGBuffer(rpc::ActorId ActorId, uint32_t GBufferId, std::function< void(Buffer)> callback)
void SetReplayerTimeFactor(double time_factor)
void SetTrafficLightState(rpc::ActorId traffic_light, const rpc::TrafficLightState trafficLightState)
std::string GetActorName(rpc::ActorId actor) const
std::vector< std::string > GetActorSocketNames(rpc::ActorId actor)
rpc::WalkerBoneControlOut GetBonesTransform(rpc::ActorId walker)
std::string GetServerVersion()
void SetWheelSuspensionOffset(rpc::ActorId vehicle, rpc::VehicleWheelLocation wheel_location, float offset)
void UnloadLevelLayer(rpc::MapLayer map_layer) const
void SetWheelSteerDirection(rpc::ActorId vehicle, rpc::VehicleWheelLocation vehicle_wheel, float angle_in_deg)
void SetBonesTransform(rpc::ActorId walker, const rpc::WalkerBoneControlIn &bones)
void SetActorTargetAngularVelocity(rpc::ActorId actor, const geom::Vector3D &vector)
void UseCarSimRoad(rpc::ActorId vehicle, bool enabled)
std::pair< bool, rpc::LabelledPoint > ProjectPoint(geom::Location location, geom::Vector3D direction, float search_distance) const
std::vector< rpc::EnvironmentObject > GetEnvironmentObjects(uint8_t queried_tag) const
bool WalkerSetMaxSpeed(rpc::ActorId walker, float max_speed) const
void AddActorTorque(rpc::ActorId actor, const geom::Vector3D &vector)
void UpdateServerLightsState(std::vector< rpc::LightState > &lights, bool discard_client=false) const
geom::Location GetRandomLocationFromNavigation() const
Server-side random point on the loaded navmesh.
std::vector< geom::Transform > GetActorSocketRelativeTransforms(rpc::ActorId actor)
std::vector< rpc::LightState > QueryLightsStateToServer() const
void ApplyColorTextureToObjects(const std::vector< std::string > &objects_name, const rpc::MaterialParameter ¶meter, const rpc::TextureColor &Texture)
void GetPoseFromAnimation(rpc::ActorId walker)
rpc::MapInfo GetMapInfo()
void DestroyTrafficManager(uint16_t port) const
bool HasSkyLightMap() const
void DisableActorConstantAcceleration(rpc::ActorId actor)
void ApplyControlToVehicle(rpc::ActorId vehicle, const rpc::VehicleControl &control)
rpc::Actor SpawnActorWithParent(const rpc::ActorDescription &description, const geom::Transform &transform, rpc::ActorId parent, rpc::AttachmentType attachment_type)
void UpdateDayNightCycle(const bool active) const
void EnableEnvironmentObjects(std::vector< uint64_t > env_objects_ids, bool enable) const
rpc::EpisodeSettings GetEpisodeSettings()
time_duration GetTimeout() const
void SetWheelPitchAngle(rpc::ActorId vehicle, rpc::VehicleWheelLocation wheel_location, float angle_in_deg)
rpc::ContentPackInfo MountContentPack(const std::string &path)
rpc::Actor SpawnActor(const rpc::ActorDescription &description, const geom::Transform &transform)
Description of a CARLA content pack known to the server (see UCarlaContentPackManager).
Fixed-size binary payload carried by the custom V2X sensor (sensor.other.v2x_custom).
Defines the physical appearance of a vehicle whitch is obtained by the sensors.
Base class for all the objects containing data generated by a sensor.
A token that uniquely identify a stream.
Positive time duration up to milliseconds resolution.
std::vector< std::pair< ActorId, VehicleLightState::flag_type > > VehicleLightStateList
std::deque< std::shared_ptr< SimpleWaypoint > > Buffer
This file contains definitions of common data structures used in traffic manager.
Seting for map generation from opendrive without additional geometry.