CARLA
Loading...
Searching...
No Matches
client/detail/Client.h
Go to the documentation of this file.
1// Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
7#pragma once
8
9#include "carla/Memory.h"
10#include "carla/NonCopyable.h"
11#include "carla/Time.h"
13#include "carla/geom/Location.h"
14#include "carla/rpc/Actor.h"
17#include "carla/rpc/Command.h"
26#include "carla/rpc/MapInfo.h"
27#include "carla/rpc/MapLayer.h"
37#include "carla/rpc/Texture.h"
39
40#include <functional>
41#include <memory>
42#include <string>
43#include <vector>
44
45// Forward declarations.
46namespace carla {
47 class Buffer;
48namespace rpc {
49 class AckermannControllerSettings;
50 class ActorDescription;
51 class DebugShape;
52 class VehicleAckermannControl;
53 class VehicleControl;
54 class WalkerControl;
55 class WalkerBoneControlIn;
56 class WalkerBoneControlOut;
57}
58namespace sensor {
59 class SensorData;
60}
61namespace streaming {
62 class Token;
63}
64}
65
66namespace carla {
67namespace client {
68namespace detail {
69
70 /// Provides communication with the rpc and streaming servers of a CARLA
71 /// simulator.
72 class Client : private NonCopyable {
73 public:
74
75 explicit Client(
76 const std::string &host,
77 uint16_t port,
78 size_t worker_threads = 0u);
79
81
82 /// Querry to know if a Traffic Manager is running on port
83 bool IsTrafficManagerRunning(uint16_t port) const;
84
85 /// Gets a pair filled with the <IP, port> of the Trafic Manager running on port.
86 /// If there is no Traffic Manager running the pair will be ("", 0)
87 std::pair<std::string, uint16_t> GetTrafficManagerRunning(uint16_t port) const;
88
89 /// Informs the server that a Traffic Manager is running on <IP, port>
90 bool AddTrafficManagerRunning(std::pair<std::string, uint16_t> trafficManagerInfo) const;
91
92 void DestroyTrafficManager(uint16_t port) const;
93
94 void SetTimeout(time_duration timeout);
95
97
98 const std::string GetEndpoint() const;
99
100 std::string GetClientVersion();
101
102 std::string GetServerVersion();
103
104 void LoadEpisode(std::string map_name, bool reset_settings = true, rpc::MapLayer map_layer = rpc::MapLayer::All);
105
106 void LoadLevelLayer(rpc::MapLayer map_layer) const;
107
108 void UnloadLevelLayer(rpc::MapLayer map_layer) const;
109
111 std::string opendrive, const rpc::OpendriveGenerationParameters & params);
112
115 const rpc::MaterialParameter& MaterialParameter,
116 const rpc::TextureColor& Texture);
117
120 const rpc::MaterialParameter& MaterialParameter,
121 const rpc::TextureFloatColor& Texture);
122
124 const std::vector<std::string> &objects_name,
125 const rpc::MaterialParameter& parameter,
126 const rpc::TextureColor& Texture);
127
129 const std::vector<std::string> &objects_name,
130 const rpc::MaterialParameter& parameter,
131 const rpc::TextureFloatColor& Texture);
132
133 void SetSkyLightMap(const rpc::TextureFloatColor& panorama, float intensity, int32_t face_size);
134
135 void ClearSkyLightMap();
136
137 bool HasSkyLightMap() const;
138
139 std::vector<std::string> GetNamesOfAllObjects() const;
140
142
144
145 std::vector<uint8_t> GetNavigationMesh() const;
146
147 /// True when the server hosts the pedestrian navigation (a
148 /// World-Partitioned navmesh exists in the current world). Returns false
149 /// on legacy .bin towns and on servers that predate the RPC.
150 bool IsNavigationServerSide() const;
151
152 /// Server-side random point on the loaded navmesh. Returns the failure
153 /// sentinel Location(0, 0, -1e6) when no point could be found.
155
156 bool WalkerStartNavigation(rpc::ActorId walker) const;
157
158 bool WalkerGoToLocation(rpc::ActorId walker, const geom::Location &destination) const;
159
160 bool WalkerSetMaxSpeed(rpc::ActorId walker, float max_speed) const;
161
162 bool WalkerStopNavigation(rpc::ActorId walker) const;
163
164 /// Probability that a walker whose navigation starts after this call may
165 /// cross roads (server-side navigation only).
166 bool SetPedestriansCrossFactor(float percentage) const;
167
168 /// Seed for the server-side navigation RNG (crosser draw); applies to
169 /// walkers whose navigation starts after this call.
170 bool SetPedestriansSeed(uint32_t seed) const;
171
172 bool SetFilesBaseFolder(const std::string &path);
173
174 std::vector<std::string> GetRequiredFiles(const std::string &folder = "", const bool download = true) const;
175
176 std::string GetMapData() const;
177
178 void RequestFile(const std::string &name) const;
179
180 std::vector<uint8_t> GetCacheFile(const std::string &name, const bool request_otherwise = true) const;
181
182 std::vector<std::string> GetAvailableMaps();
183
184 std::vector<rpc::ContentPackInfo> GetContentPacks();
185
186 rpc::ContentPackInfo MountContentPack(const std::string &path);
187
188 bool UnmountContentPack(const std::string &name);
189
190 std::vector<rpc::ActorDefinition> GetActorDefinitions();
191
193
195
196 uint64_t SetEpisodeSettings(const rpc::EpisodeSettings &settings);
197
199
200 void SetWeatherParameters(const rpc::WeatherParameters &weather);
201
202 float GetIMUSensorGravity();
203
204 void SetIMUSensorGravity(float gravity);
205
206 bool IsWeatherEnabled();
207
208 void SetPublishTF(bool publish_tf);
209
210 bool GetPublishTF() const;
211
212 std::vector<geom::Transform> GetEgoSpawnPoints() const;
213
214 std::vector<rpc::Actor> GetActorsById(const std::vector<ActorId> &ids);
215
217
219
221
222 std::vector<geom::Transform> GetVehicleBoneWorldTransforms(rpc::ActorId actor);
223
225 rpc::ActorId vehicle,
226 const rpc::VehiclePhysicsControl &physics_control);
227
229 rpc::ActorId vehicle,
230 const rpc::VehicleLightState &light_state);
231
232 void OpenVehicleDoor(
233 rpc::ActorId vehicle,
234 const rpc::VehicleDoor door_idx);
235
236 void CloseVehicleDoor(
237 rpc::ActorId vehicle,
238 const rpc::VehicleDoor door_idx);
239
241 const rpc::ActorDescription &description,
242 const geom::Transform &transform);
243
245 const rpc::ActorDescription &description,
246 const geom::Transform &transform,
247 rpc::ActorId parent,
248 rpc::AttachmentType attachment_type);
249
250 bool DestroyActor(rpc::ActorId actor);
251
252 void SetActorLocation(
253 rpc::ActorId actor,
254 const geom::Location &location);
255
257 rpc::ActorId actor,
258 const geom::Transform &transform);
259
261 rpc::ActorId actor,
262 const geom::Vector3D &vector);
263
265 rpc::ActorId actor,
266 const geom::Vector3D &vector);
267
269 rpc::ActorId actor,
270 const geom::Vector3D &vector);
271
273 rpc::ActorId actor);
274
276 rpc::ActorId actor,
277 const geom::Vector3D &vector);
278
280 rpc::ActorId actor);
281
282 void AddActorImpulse(
283 rpc::ActorId actor,
284 const geom::Vector3D &impulse);
285
286 void AddActorImpulse(
287 rpc::ActorId actor,
288 const geom::Vector3D &impulse,
289 const geom::Vector3D &location);
290
291 void AddActorForce(
292 rpc::ActorId actor,
293 const geom::Vector3D &force);
294
295 void AddActorForce(
296 rpc::ActorId actor,
297 const geom::Vector3D &force,
298 const geom::Vector3D &location);
299
301 rpc::ActorId actor,
302 const geom::Vector3D &vector);
303
304 void AddActorTorque(
305 rpc::ActorId actor,
306 const geom::Vector3D &vector);
307
309 rpc::ActorId actor,
310 const std::string &component_name);
311
313 rpc::ActorId actor,
314 const std::string &component_name);
315
316 std::vector<geom::Transform> GetActorBoneWorldTransforms(
317 rpc::ActorId actor);
318
319 std::vector<geom::Transform> GetActorBoneRelativeTransforms(
320 rpc::ActorId actor);
321
322 std::vector<std::string> GetActorComponentNames(
323 rpc::ActorId actor);
324
325 std::vector<std::string> GetActorBoneNames(
326 rpc::ActorId actor);
327
328 std::vector<geom::Transform> GetActorSocketWorldTransforms(
329 rpc::ActorId actor);
330
331 std::vector<geom::Transform> GetActorSocketRelativeTransforms(
332 rpc::ActorId actor);
333
334 std::vector<std::string> GetActorSocketNames(
335 rpc::ActorId actor);
336
338 rpc::ActorId actor,
339 bool enabled);
340
342 rpc::ActorId actor,
343 bool enabled);
344
345 void SetActorDead(
346 rpc::ActorId actor);
347
349 rpc::ActorId actor,
350 bool enabled);
351
353 rpc::ActorId vehicle,
354 bool enabled);
355
357 rpc::ActorId vehicle,
358 bool enabled);
359
361 rpc::ActorId vehicle,
362 const rpc::VehicleControl &control);
363
365 rpc::ActorId vehicle,
366 const rpc::VehicleAckermannControl &control);
367
369
371 rpc::ActorId vehicle,
372 const rpc::AckermannControllerSettings &settings);
373
374 void EnableCarSim(
375 rpc::ActorId vehicle,
376 std::string simfile_path);
377
378 void UseCarSimRoad(
379 rpc::ActorId vehicle,
380 bool enabled);
381
383 rpc::ActorId vehicle,
384 rpc::VehicleWheelLocation vehicle_wheel,
385 float angle_in_deg
386 );
387
388 float GetWheelSteerAngle(
389 rpc::ActorId vehicle,
390 rpc::VehicleWheelLocation wheel_location
391 );
392
394 rpc::ActorId vehicle,
395 rpc::VehicleWheelLocation wheel_location,
396 float angle_in_deg);
397
398 float GetWheelPitchAngle(
399 rpc::ActorId vehicle,
400 rpc::VehicleWheelLocation wheel_location);
401
403 rpc::ActorId vehicle,
404 rpc::VehicleWheelLocation wheel_location,
405 float offset);
406
408 rpc::ActorId vehicle,
409 rpc::VehicleWheelLocation wheel_location);
410
411 void SetWheelAnimationOverride(rpc::ActorId vehicle, bool enabled);
412
414 rpc::ActorId vehicle,
415 uint64_t MaxSubsteps,
416 float MaxSubstepDeltaTime,
417 std::string VehicleJSON,
418 std::string PowertrainJSON,
419 std::string TireJSON,
420 std::string BaseJSONPath);
421
423 rpc::ActorId walker,
424 const rpc::WalkerControl &control);
425
427 rpc::ActorId walker);
428
430 rpc::ActorId walker,
431 const rpc::WalkerBoneControlIn &bones);
432
433 void BlendPose(
434 rpc::ActorId walker,
435 float blend);
436
438 rpc::ActorId walker);
439
441 rpc::ActorId traffic_light,
442 const rpc::TrafficLightState trafficLightState);
443
445 rpc::ActorId traffic_light,
446 float green_time);
447
449 rpc::ActorId traffic_light,
450 float yellow_time);
451
453 rpc::ActorId traffic_light,
454 float red_time);
455
457 rpc::ActorId traffic_light,
458 bool freeze);
459
461 rpc::ActorId traffic_light);
462
464
465 void FreezeAllTrafficLights(bool frozen);
466
467 std::vector<geom::BoundingBox> GetLightBoxes(
468 rpc::ActorId traffic_light) const;
469
470 /// Returns a list of pairs where the firts element is the vehicle ID
471 /// and the second one is the light state
473
474 std::vector<ActorId> GetGroupTrafficLights(
475 rpc::ActorId traffic_light);
476
477 std::string StartRecorder(std::string name, bool additional_data, bool stop_replayer);
478
479 void StopRecorder();
480
481 std::string ShowRecorderFileInfo(std::string name, bool show_all);
482
483 std::string ShowRecorderCollisions(std::string name, char type1, char type2);
484
485 std::string ShowRecorderActorsBlocked(std::string name, double min_time, double min_distance);
486
487 std::string ReplayFile(
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);
491
492 void SetReplayerTimeFactor(double time_factor);
493
494 void SetReplayerIgnoreHero(bool ignore_hero);
495
496 void SetReplayerIgnoreSpectator(bool ignore_spectator);
497
498 void StopReplayer(bool keep_actors);
499
501 const streaming::Token &token,
502 std::function<void(Buffer)> callback);
503
506 uint32_t GBufferId,
507 std::function<void(Buffer)> callback);
508
509 void UnSubscribeFromStream(const streaming::Token &token);
510
511 /// Join the streaming threads; no stream callback runs afterwards.
512 void StopStreaming();
513
514 void EnableForROS(const streaming::Token &token);
515
516 void DisableForROS(const streaming::Token &token);
517
518 bool IsEnabledForROS(const streaming::Token &token);
519
522 uint32_t GBufferId);
523
524 void Send(rpc::ActorId ActorId, const rpc::CustomV2XBytes &data);
525
526 void DrawDebugShape(const rpc::DebugShape &shape);
527
528 void ClearDebugShape();
529
530 void ClearDebugString();
531
532 void SpawnCustomMesh(
533 const std::vector<float> &vertices,
534 const std::vector<uint32_t> &triangles,
535 const std::string &material);
536
537 void ApplyBatch(
538 std::vector<rpc::Command> commands,
539 bool do_tick_cue);
540
541 std::vector<rpc::CommandResponse> ApplyBatchSync(
542 std::vector<rpc::Command> commands,
543 bool do_tick_cue);
544
545 uint64_t SendTickCue();
546
547 std::vector<rpc::LightState> QueryLightsStateToServer() const;
548
550 std::vector<rpc::LightState>& lights,
551 bool discard_client = false) const;
552
553 void UpdateDayNightCycle(const bool active) const;
554
555 /// Returns all the BBs of all the elements of the level
556 std::vector<geom::BoundingBox> GetLevelBBs(uint8_t queried_tag) const;
557
558 std::vector<rpc::EnvironmentObject> GetEnvironmentObjects(uint8_t queried_tag) const;
559
561 std::vector<uint64_t> env_objects_ids,
562 bool enable) const;
563
564 std::pair<bool,rpc::LabelledPoint> ProjectPoint(
565 geom::Location location, geom::Vector3D direction, float search_distance) const;
566
567 std::vector<rpc::LabelledPoint> CastRay(
568 geom::Location start_location, geom::Location end_location) const;
569
570 std::string GetActorName(rpc::ActorId actor) const;
571
572 std::string GetActorClassName(rpc::ActorId actor) const;
573
574 private:
575
576 class Pimpl;
577 const std::unique_ptr<Pimpl> _pimpl;
578 };
579
580} // namespace detail
581} // namespace client
582} // namespace carla
float intensity
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)
void OpenVehicleDoor(rpc::ActorId vehicle, const rpc::VehicleDoor door_idx)
const std::string GetEndpoint() const
float GetWheelSuspensionOffset(rpc::ActorId vehicle, rpc::VehicleWheelLocation wheel_location)
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)
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
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)
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 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)
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)
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 &params)
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)
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)
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)
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)
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 &parameter, const rpc::TextureColor &Texture)
void GetPoseFromAnimation(rpc::ActorId walker)
void DestroyTrafficManager(uint16_t port) 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()
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)
A rigid transform in CARLA's / Unreal's left-handed frame: x forward, y right, z up,...
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.
Definition SensorData.h:22
A token that uniquely identify a stream.
Definition Token.h:17
Positive time duration up to milliseconds resolution.
Definition Time.h:20
uint32_t ActorId
Definition ActorId.h:14
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.