46 class ActorDescription;
50 class WalkerBoneControlIn;
51 class WalkerBoneControlOut;
71 const std::string &host,
73 size_t worker_threads = 0u);
78 bool IsTrafficManagerRunning(uint16_t port)
const;
82 std::pair<std::string, uint16_t> GetTrafficManagerRunning(uint16_t port)
const;
85 bool AddTrafficManagerRunning(std::pair<std::string, uint16_t> trafficManagerInfo)
const;
87 void DestroyTrafficManager(uint16_t port)
const;
93 const std::string GetEndpoint()
const;
95 std::string GetClientVersion();
97 std::string GetServerVersion();
105 void CopyOpenDriveToServer(
108 void ApplyColorTextureToObjects(
109 const std::vector<std::string> &objects_name,
113 void ApplyColorTextureToObjects(
114 const std::vector<std::string> &objects_name,
118 std::vector<std::string> GetNamesOfAllObjects()
const;
124 std::vector<uint8_t> GetNavigationMesh()
const;
126 bool SetFilesBaseFolder(
const std::string &path);
128 std::vector<std::string> GetRequiredFiles(
const std::string &folder =
"",
const bool download =
true)
const;
130 std::string GetMapData()
const;
132 void RequestFile(
const std::string &name)
const;
134 std::vector<uint8_t> GetCacheFile(
const std::string &name,
const bool request_otherwise =
true)
const;
136 std::vector<std::string> GetAvailableMaps();
138 std::vector<rpc::ActorDefinition> GetActorDefinitions();
150 std::vector<rpc::Actor> GetActorsById(
const std::vector<ActorId> &ids);
156 void ApplyPhysicsControlToVehicle(
160 void SetLightStateToVehicle(
164 void OpenVehicleDoor(
168 void CloseVehicleDoor(
184 void SetActorLocation(
188 void SetActorTransform(
192 void SetActorTargetVelocity(
196 void SetActorTargetAngularVelocity(
200 void EnableActorConstantVelocity(
204 void DisableActorConstantVelocity(
207 void AddActorImpulse(
211 void AddActorImpulse(
225 void AddActorAngularImpulse(
233 void SetActorSimulatePhysics(
237 void SetActorEnableGravity(
241 void SetActorAutopilot(
245 void ShowVehicleDebugTelemetry(
249 void ApplyControlToVehicle(
255 std::string simfile_path);
261 void SetWheelSteerDirection(
267 float GetWheelSteerAngle(
272 void EnableChronoPhysics(
274 uint64_t MaxSubsteps,
275 float MaxSubstepDeltaTime,
276 std::string VehicleJSON,
277 std::string PowertrainJSON,
278 std::string TireJSON,
279 std::string BaseJSONPath);
281 void ApplyControlToWalker(
288 void SetBonesTransform(
296 void GetPoseFromAnimation(
299 void SetTrafficLightState(
303 void SetTrafficLightGreenTime(
307 void SetTrafficLightYellowTime(
311 void SetTrafficLightRedTime(
315 void FreezeTrafficLight(
319 void ResetTrafficLightGroup(
322 void ResetAllTrafficLights();
324 void FreezeAllTrafficLights(
bool frozen);
326 std::vector<geom::BoundingBox> GetLightBoxes(
333 std::vector<ActorId> GetGroupTrafficLights(
336 std::string StartRecorder(std::string name,
bool additional_data);
340 std::string ShowRecorderFileInfo(std::string name,
bool show_all);
342 std::string ShowRecorderCollisions(std::string name,
char type1,
char type2);
344 std::string ShowRecorderActorsBlocked(std::string name,
double min_time,
double min_distance);
346 std::string ReplayFile(std::string name,
double start,
double duration,
347 uint32_t follow_id,
bool replay_sensors);
349 void SetReplayerTimeFactor(
double time_factor);
351 void SetReplayerIgnoreHero(
bool ignore_hero);
353 void StopReplayer(
bool keep_actors);
355 void SubscribeToStream(
357 std::function<
void(
Buffer)> callback);
364 std::vector<rpc::Command> commands,
367 std::vector<rpc::CommandResponse> ApplyBatchSync(
368 std::vector<rpc::Command> commands,
371 uint64_t SendTickCue();
373 std::vector<rpc::LightState> QueryLightsStateToServer()
const;
375 void UpdateServerLightsState(
376 std::vector<rpc::LightState>& lights,
377 bool discard_client =
false)
const;
380 std::vector<geom::BoundingBox> GetLevelBBs(uint8_t queried_tag)
const;
382 std::vector<rpc::EnvironmentObject> GetEnvironmentObjects(uint8_t queried_tag)
const;
384 void EnableEnvironmentObjects(
385 std::vector<uint64_t> env_objects_ids,
388 std::pair<bool,rpc::LabelledPoint> ProjectPoint(
391 std::vector<rpc::LabelledPoint> CastRay(
397 const std::unique_ptr<Pimpl>
_pimpl;
Seting for map generation from opendrive without additional geometry.
std::vector< std::pair< ActorId, VehicleLightState::flag_type > > VehicleLightStateList
This file contains definitions of common data structures used in traffic manager. ...
std::deque< std::shared_ptr< SimpleWaypoint > > Buffer
const std::unique_ptr< Pimpl > _pimpl
Base class for all the objects containing data generated by a sensor.
A token that uniquely identify a stream.
Provides communication with the rpc and streaming servers of a CARLA simulator.
Positive time duration up to milliseconds resolution.
Inherit (privately) to suppress copy/move construction and assignment.
Defines the physical appearance of a vehicle whitch is obtained by the sensors.