47 class AckermannControllerSettings;
48 class ActorDescription;
50 class VehicleAckermannControl;
53 class WalkerBoneControlIn;
54 class WalkerBoneControlOut;
74 const std::string &host,
76 size_t worker_threads = 0u);
112 const std::vector<std::string> &objects_name,
117 const std::vector<std::string> &objects_name,
131 std::vector<std::string>
GetRequiredFiles(
const std::string &folder =
"",
const bool download =
true)
const;
137 std::vector<uint8_t>
GetCacheFile(
const std::string &name,
const bool request_otherwise =
true)
const;
157 std::vector<rpc::Actor>
GetActorsById(
const std::vector<ActorId> &ids);
188 const std::string& socket_name =
"");
243 const std::string componentName);
247 const std::string componentName);
311 std::string simfile_path);
330 uint64_t MaxSubsteps,
331 float MaxSubstepDeltaTime,
332 std::string VehicleJSON,
333 std::string PowertrainJSON,
334 std::string TireJSON,
335 std::string BaseJSONPath);
394 std::string
StartRecorder(std::string name,
bool additional_data);
404 std::string
ReplayFile(std::string name,
double start,
double duration,
405 uint32_t follow_id,
bool replay_sensors);
417 std::function<
void(
Buffer)> callback);
422 std::function<
void(
Buffer)> callback);
441 std::vector<rpc::Command> commands,
445 std::vector<rpc::Command> commands,
453 std::vector<rpc::LightState>& lights,
454 bool discard_client =
false)
const;
459 std::vector<geom::BoundingBox>
GetLevelBBs(uint8_t queried_tag)
const;
464 std::vector<uint64_t> env_objects_ids,
470 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)
geom::Transform GetActorComponentRelativeTransform(rpc::ActorId actor, const std::string componentName)
void SetTrafficLightRedTime(rpc::ActorId traffic_light, float red_time)
void ApplyControlToWalker(rpc::ActorId walker, const rpc::WalkerControl &control)
std::string GetClientVersion()
void OpenVehicleDoor(rpc::ActorId vehicle, const rpc::VehicleDoor door_idx)
const std::string GetEndpoint() const
rpc::WeatherParameters GetWeatherParameters()
std::vector< std::string > GetActorBoneNames(rpc::ActorId actor)
std::string GetMapData() const
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)
std::vector< std::string > GetAvailableMaps()
bool IsEnabledForROS(const streaming::Token &token)
void DisableForROS(const streaming::Token &token)
bool SetFilesBaseFolder(const std::string &path)
rpc::VehicleLightState GetVehicleLightState(rpc::ActorId vehicle) const
rpc::EpisodeInfo GetEpisodeInfo()
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)
std::string ShowRecorderActorsBlocked(std::string name, double min_time, double min_distance)
std::vector< rpc::CommandResponse > ApplyBatchSync(std::vector< rpc::Command > commands, bool do_tick_cue)
void Send(rpc::ActorId ActorId, std::string message)
void UnSubscribeFromGBuffer(rpc::ActorId ActorId, uint32_t GBufferId)
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)
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)
float GetIMUISensorGravity() const
std::vector< std::string > GetActorComponentNames(rpc::ActorId actor)
void SetActorLocation(rpc::ActorId actor, const geom::Location &location)
uint64_t SetEpisodeSettings(const rpc::EpisodeSettings &settings)
rpc::Actor SpawnActorWithParent(const rpc::ActorDescription &description, const geom::Transform &transform, rpc::ActorId parent, rpc::AttachmentType attachment_type, const std::string &socket_name="")
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 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 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 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)
std::string StartRecorder(std::string name, bool additional_data)
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>
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::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 EnableCarSim(rpc::ActorId vehicle, std::string simfile_path)
rpc::Actor GetSpectator()
void SetTimeout(time_duration timeout)
geom::Transform GetActorComponentWorldTransform(rpc::ActorId actor, const std::string componentName)
std::vector< geom::Transform > GetActorBoneRelativeTransforms(rpc::ActorId actor)
Client(const std::string &host, uint16_t port, size_t worker_threads=0u)
void SetActorEnableGravity(rpc::ActorId actor, bool enabled)
void SetActorSimulatePhysics(rpc::ActorId actor, bool enabled)
void RestorePhysXPhysics(rpc::ActorId vehicle)
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 ReplayFile(std::string name, double start, double duration, uint32_t follow_id, bool replay_sensors)
std::vector< std::string > GetActorSocketNames(rpc::ActorId actor)
rpc::WalkerBoneControlOut GetBonesTransform(rpc::ActorId walker)
std::string GetServerVersion()
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
void AddActorTorque(rpc::ActorId actor, const geom::Vector3D &vector)
void UpdateServerLightsState(std::vector< rpc::LightState > &lights, bool discard_client=false) const
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
void ApplyControlToVehicle(rpc::ActorId vehicle, const rpc::VehicleControl &control)
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 SetIMUISensorGravity(float NewIMUISensorGravity)
rpc::Actor SpawnActor(const rpc::ActorDescription &description, const geom::Transform &transform)
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